> My “trick” during that final year was simple: I always tried to write correctly, not just when I was asked to, but all the time. After a year of subconscious improvements, I aced the exam.
Practice makes permanent. Perfect practice makes perfect.
Practice makes permanent. Perfect practice makes perfect.
It just takes a lot of work. No shortcuts.
But that WFM. YMMV.
If the goal is to make a program, I make sure that my thoughts about the program are sound before actually building it. If I need to play around a bit to understand the problem domain then I additionally need to be prepared to throw out the play-work. If I run into a bug, I remember it and proactively avoid it in the future. I think about the limitations of my design before I start building. This is my implementation of writing "without bugs"; it doesn't have to be perfect, it just can't be something which I know to be wrong.