Consistency is Key

26 Sep 2019

Everybody does things in their own way and have a unique style of completing tasks that is personal to them. From handwriting to the way we talk, everyone has their own way of doing something. The same can be said about computer science because every developer has their own style of code that is distinct from the way other programmers would code and solve problems. This is why I myself and other people struggle with following coding standards, I want to have the freedom to code things my way and solve a problem by typing out code in any format that works and is easy for me. Regardless of personal preferences coding standards are a necessary attribute to apply when your coding in the professional realm of computer science. The first question is why do we have coding standards? Evey computer science class I’ve taken the instructor has implemented some form of coding standards that they desire for the class. The reason for this is so he and the TA can read and understand your code efficiently. So that everyone who is submitting code follows the rulesets of indentation and other syntax styles. Coding standards not only have a place and purpose in the academic sphere of computer science but also in the professional workplace because many computer science jobs will involve you working on a team with other computer scientists collaborating on a large project together. This entails that you will be working on and sharing the same pieces of code and will also share and use other teammates code. This is why coding standards are so vital, if everyone had their own rules and preferences and produced sloppy code it would would create an inefficient work environment for your coworkers. Causing them to spend extra time to learn and understand you’re style of syntax and messy code. Using coding standard alleviates this problem by requiring everyone having similarly formatted consistent code allowing others to easily understand and implement the code with theirs. Coding standards can also have the added benefit of improving your knowledge of a language learning what format works best and makes the language the most legible to you and others. My current personal experience with coding standards has been with IntelliJ an IDE and ESlint which is a pluggable linting utility for javascript. Intellij will give its own suggestions and let you know if a line of code is syntactically invalid before running the code. This kind of code style checking is very helpful because it lets you know that certain lines of code will not work before you waste time running it. It cannot catch logic errors but at least makes sure your code style is correct and valid for the language. Which also helps you become more familiar with the rules of the language you are using. ESlint is a javascript plugin we use with the Intellij IDE that checks for and follows even more code style suggestions and changes.My first experience with this so far is that it can be a little obnoxious at first because of how strict it is and how many code style checks it has. But overall functions to make your code better and to avoid sloppy or incorrect code. ESlint will give suggestions about all sorts and types of errors and may seem tedious at first but it’s a good way to optimize your code and keep it in a reliable format. Over time though hopefully Intellij and Eslint coding style checking helps to shape my code and stye into a more consistent format which I can utilize professionally.