How I’ve become a better programmer

December 27th 2009

I’ve been programming for about 3 years. I’ve learned quite a lot just from working on personal projects. Perhaps the most important thing I’ve learned is to not start over from scratch.

I used to feel like rewriting my projects at times and starting all over again. I used to feel like my code was messy and poorly written, and that it needed a rewrite. Eventually I thought, “I will probably need to rework code at some point, even if it’s sloppy, so I might as well learn to rework the code rather than trash it.” So I did. I fought the urge to rewrite my code whenever I felt stuck. I learned so many things from just being patient with what I was working on. I learned the importance of test suites, version control, documentation, password management (so I don’t have to waste time getting development environments set up again simply because I forgot a password), bookmarking, and asking questions (stackoverflow) when feeling stuck.

The most valuable lesson I’ve learned from not starting over from scratch is: There is nothing wrong with my code. It is only an illusion. My code looks messy because reading code is harder than writing code, and starting over from scratch is a huge time consumer.

Last but not least, I’ve become keen to the idea of code debt. Before I understood code debt, I used to be a perfectionist. I wanted everything to work perfectly on the first attempt, and if it didn’t, I would get discouraged, and as a result I’d want to throw my code away and start from scratch.

blog comments powered by Disqus