Cam moore of you get up to code please?

30 Aug 2018

Yes the title is a barely related pun. Yes this is an informative essay.

Amateur comedy aside, coding standards are an integral part of software engineering - almost if not just as important as the syntax and algorithms that run the code itself. This isn’t because of anything related to the computer; for all it cares you can mash in an incomprehensible mess of spaghetti code, the CPU only cares about the 1’s and 0’s it becomes. Instead, coding standards are essential to modern software engineering because of the human component. The pyramids weren’t built by one man, and neither were any of the quintessential enterprise software that we use everyday. When teams of people are working on a project, having an established ‘language’ between the lines of your code means that your finished product will come out gorgeous and polished, and it’ll be wholly evident.

Bracket positions aren’t that important…

Yes, they are. Or rather, the principle behind them is. When someone else comes to look at your code, if they have to spend any extra time trying to decipher the code they’re looking at, then your team is wasting time, and wasting time is wasting money. Your colleagues need to know exactly where they’ll find the parameters of the method they’re looking at, or the variables used in that method you wrote. Code standards provide a bare minimum for effective collaboration in real-life development environments.

Forget my co-workers! How does this benefit me?

Well, first of all, helping your co-workers does help you, but I digress. Having a strict set of expectations for the way you write your code in whatever langauge provides a fantastic learning structure. More than that, it helps you to understand how the language is designed, and meant to be used. The rules of a particular language’s standard can help programmers to understand the advantages and pitfalls of that language, and the best practices for working around their constraints. For instance, the ESLint standard for JavaScript expects you to declare const if possible for your variables, because not doing so when you can leads to potential reassignments and fatal errors, since JavaScript is not strongly typed.

Do you even use code standards?

Absolutely. Of course, depending on the language and environment I’m working in, things change; I wouldn’t write C code in Vim the same way I write JavaScript code on IntelliJ. My main objective is to make sure I’m doing the most that I can for anyone reading my code, to ensure that what I’ve written not only works and solves the problem at hand, but that anyone who needs to use that source can read it. So, coding standards are important! The end.