|
I'm a developer for almost three years, i (like) to think that i'm good, i have deep knowledge of my stack and i can design and implement almost any feature that the seniors at my team can implement, but i have i problem with the final quality of my code. My code is clean and follow the guide-lines, but i feel that i make to much mistakes, there is always a corner case that i don't think about or some test that is trivial to the QA team but i didn't do, and my code end up being broke. This 'behavior' also happen with maths, i know the theorems and the content that i need to know to solve questions but i always miss calculate something and end up with the wrong result, one clear example of this was my last "calculus 2" exam, all the steps were right, but all the results were wrong; TL, DR: I know my stack and the tools but i make silly mistakes that end up breaking my code; how can one get better at this? |
Since making that final walk around a habit, nothing. I started doing final everythings, one last check of the radios, one last check of the instruments, etc, etc. It's amazing how many times you pick up on something so obvious that is wrong.
The key is to change your mindset before doing the final check. Acknowledge you are done, go get a tea, and go through the motions.
Somethings I do related to code.
Use `git add -p` to go through changes one by one. Remove stuff that shouldn't be there.
Do a self code review before submitting the code for others to review.
Obvious one, but always run tests.
For what it's worth, I find the same things with maths. I've been working on SLAM systems, so lots of differential geometry and matrix calculus. I'll spend a morning with my notebook trying to figure something out, go to lunch, then come back and go over what I've done.
In university I was horrible at maths exams, because like you I knew everything but made so many stupid mistakes. I think the problem was that during an exam, I could never dial down my mindset from OMG I need to triple check everything right now!