Could You Read Your Code Tomorrow?

10 Feb 2021

Life Before Knowing About Coding Standards

In high school, I didn’t know anything about coding standards. I just started learning Java and the only thing that mattered was preparing for the AP exam in May. I only focused on being able to solve a problem at that moment so I never paid attention to coding standards and man would that kick my butt the next day. Since some projects took a few days, I would have to revisit code but because it didn’t have any comments or follow standards, I spent too much time trying to read old code instead of adding on to a file. Those were rough days.

Learning About Coding Standards

I was first introduced to coding standards in my ICS 211 class. There were many new habits I needed to fix that ranged from spacing, indentation, CamelCase, etc. but for that class, the most important thing I learned was how and when to properly comment. Commenting allowed me to leave little notes for my future self so that I would know what each method would do and what each variable was for. Because I made commenting a habit, I was less confused when I continued working on a project that I left to the side. Now that I’m taking ICS 314, the amount of coding standards I need to follow increased exponentially! The coding standards we are following for this class is the Airbnb JavaScript Style Guide which is concise and informative. In addition to that guide, I needed to install ESLint which would be help me conform to the standards in IntelliJ IDEA.

I Thought ESLint Hated Me

You may think this title is weird but I truly believed this at first. I spent 3 hours trying to install ESLint and it still was not enough. I woke up extra early the next day to try again and I finally figured out that my package.json file had an extra dot in the front. I was in tears (on the inside); all those hours… wasted. Anyways, now that ESLint works, it is actually very helpful. In the beginning, it took me some time to address each error and learn why it needed to be changed but as I continued to use it, the work flow became smoother. Personally, the green checkmark is both fun to see and useful because it makes me feel accomplished and it also lets me know that my code is legible and easy to parse through for future me.

Final Thoughts on Coding Standards

Learning coding standards and applying it to all your projects is beneficial for time management as well as productivity. Following coding standards allows one to code faster and produce higher quality code because the coder will not have to worry about problems that could have been easily preventable in the future. It is important to keep up with commenting too so that you know the purpose of each function, method and variable in your code.