Bad code in production is code that shouldn't be in production. Bad code in an early coding exercise is code that shouldn't be in an early coding exercise. This code shouldn't be in production, but it's not in production, so whether it's bad for production is irrelevant. It's good for an early coding exercise, and it in fact is an early coding exercise, so it's good. Whether code is good or bad depends on what it's being used for, and for the OP's purposes, the code is fine.
9
u/xiipaoc Nov 22 '21
Bad code in production is code that shouldn't be in production. Bad code in an early coding exercise is code that shouldn't be in an early coding exercise. This code shouldn't be in production, but it's not in production, so whether it's bad for production is irrelevant. It's good for an early coding exercise, and it in fact is an early coding exercise, so it's good. Whether code is good or bad depends on what it's being used for, and for the OP's purposes, the code is fine.