Nov 27, 2015

A Good Reader Makes a Good Developer

When I first began coding, I felt documentation was boring: I used to dive right into coding. As a result, I spent countless hours troubleshooting and writing unmaintainable code.

Since then, I’ve learned to strive for better code. A big part of my improvement is reading documentation, best-practices and blog posts. It can be tedious, but it gives me in-depth knowledge of my tools which is important for writing good code.

I remember being so excited on my first project that I began coding right away. I followed a few tutorials and jumbled the code together to get my app running as soon as possible. Deep into the project, I realized that my code had become too difficult too maintain. I came to the point where I had to choose to either keep pushing through or rewrite everything from scratch.

When I started learning front-end development, I knew I had to minify my JavaScript and CSS files. I had heard that programs like Grunt could automate this but I didn’t think I could learn it. Instead, I would upload my files to online minifiers and then copy and paste them back into my code. It quickly became annoying. My laziness pushed me to learn Grunt and that was the last time I minified by hand.

I once wrote a small web app in vanilla JavaScript with hundreds of lines to handle DOM manipulation. I spent days working on it only to discover I had reinvented the wheel when I found out about AngularJs.

These mistakes taught me to spend time researching and planning my projects. In exchange for the time I spend in the beginning, I end up saving many hours later on. For example, I learned better ways to better structure my code by reading blog posts on organizing Laravel projects. I saved a lot of time by learning Grunt to avoid monotonous actions. I also learned AngularJs so I wouldn’t have to do complex DOM manipulation on my own. All these actions have helped me improve and now I can focus on building great applications. Ultimately, I learned that reading and researching has a great return on investment.