Pro tip if you're just starting out, before you ever make a change to try to fix something, you should have a mental model of exactly what you expect your change to do. If you don't, step through the code over and over again until you do think you can predict the result of your change. Then verify your change does what you intended and repeat.
Blindly changing stuff or adding guards is never good enough, even if it's actually correct or fixes the problem. In code review if I ask why you made the change you did and you can't explain in detail what was causing the bug and why your change fixed it, I'm going to have to do that work myself.
Software isn't black magic, it's 100% predictable and hiding bugs with "fixes" just causes more harm in the long run.
1 comment
[ 2.7 ms ] story [ 24.4 ms ] thread