Why Can't i++!? Coding Better With Coding Standards

09 Feb 2017

Learning the coding standards from the airbnb guide was a pain in the butt at first. “Why can’t I use var?” and “What’s wrong with i++?” went through my head as I read through it. But, when we look at the reasoning behind the style choices, the stubbornness starts to wear off, and you start writing clean code. Seeing that I’m beginning to learn Javascript, I base my code off techniques from languages that I’ve learned already. My mindset was writing code that was fast and easy for me to write. In the professional world, this is a bad habit. It’s just like any sport, following good form and technique will optimize your performance in the long run.

Your code should should be written in a way that allows other people to easily read, understand, and change it. With the coding style ingrained in my IDE, I don’t make room for bad coding practices because I’m never allowed to. The bugs that could’ve happened from the result of a bad line of code is prevented.

As much as the green checkmark in IntelliJ pains me like the Microsoft Word paperclip, it’s a useful feature that’s making me a better coder. And who doesn’t want to be a better coder? The green checkmark helps to ensure that my code has less risk for bugs. I’d rather spend a few minutes making my code up to standard than spending hours finding the line that broke my code. I think the best way for students to get sold on coding standards is to have them look at each other’s code and try to build upon it. Those who get code that follows no coding standard will have a harder time reading and understanding it while the others cruise through it.