On Writing Good Code

20 Jul 2014

Whether you are working for a big software company or a small sized startup, writing good code is pretty much critical to your success. But the catch is it is not very easy to achieve without proper motivation from your side.

I have been coding professionally for almost 4 years now. First two years were as a freelancer and I mostly followed Get Things Done mode during that time. It was okay then because it was mostly a one time gig and once done you didn’t had to do anything with it. Though I never wrote really bad code even at that time but the amount of maturity and knowledge required to write code that is maintainable, DRY and has some documentation was clearly not there.

While I joined my first company back in 2013, I really struggled against my bad habits. I was able to solve tough technical problems as problem solving is always close to my heart but there were serious issues with my code quality. Sometimes there was some indentation issue and something there were some code repetition. I was lucky to have my Mentor “Ruben” to closely look at my code and review it sharply and give his most honest feedback. Upon pondering about the review I realized most of the issues were coming because a certain amount of thinking and carefulness that was missing from my workflow. I didn’t had my editor configured properly. Mix of tabs and spaces will obviously come back to bite you and code will look ugly on browser even though it looked fine on your editor. (Sublime Text, I am looking at you).

Now, after almost an year later I am a improved and mature programmer than what I was at this point of time last year. So what changed?

Here is a short summary of things I did in order to get better at writing code:

Tweet me @https://twitter.com/vinitkme if you like this post.

Tweet