Standards Are A Universal Language

13 Feb 2020

Coding Languages Are Like Any Other Language

Recently, I have been taking a linguistics class and although there are almost 6000 different languages in the world, they all have some form of standard that they must follow. Every language follows their own rules, i.e. English follows a subject, verb, object sentence structure (SVO) while other languages like Korean or Japanese follows a subject, object, verb sentence structure (SOV). Although they are different, these languages must follow those standards or else people won’t understand each other. This same idea also applies for coding standards as well. You can make a very long and intelligent strip of code that you and the computer understands, but without proper coding standards, it will just look like a jumbled strip of mess that no one else could understand. Coding languages are like written languages. With English, you must finish sentences with a period, and with coding like Java, you have to finish coding thoughts with semicolons, or brackets. Without these standards, are we truly using a language correctly?

Learning Through Trial and Error

Standards are needed as they make code look organized and with those coding standards, you will notice how certain parts of how the coding language works. One example of this that I found with ESLint is whenever I use a variable, if I’m not manipulating its values, the inspector would make me change it from ‘let’ to ‘const’. Before, I would think it is unnecessary to do so for most of the code that I would make, but I realized it is necessary because there will be a time that I will need to maintain the scope of variables for long strips of code. With each error like this, you get to see a bit of why each part of a code is used and with time it will could definitely teach you the programming language as a whole.

ESLint: The Strict Parent of Coding

Initially, ESLint was annoying to work with, as it would constantly give technical errors for my code in places that I don’t think are needed and it would just throw them even before I could finish. But, I realized that the more I worked with this code inspector, that these errors gave a good checklist for what I must do for each step of my code. If I make a variable, ESLint would throw an error to use it within the code. If I make a function, ESLint would throw an error to have a return value. With reminders like this, my code won’t miss a step. Lastly, I think that ESLint is perfect for catching small mistakes that could deem to be major errors within the code. One perfect example of this was during the first WOD, I was having trouble with my code as it wasn’t running, despite me thinking that I made the code exactly right. After a bit of inspection, I realized it was because I misspelled ‘function’ as ‘fnuction’, which was hard to catch as the coding platform that we used (JSFiddle) didn’t really notice this error. This mistake happened again to me during one of the practice WODs with IntelliJ, but because I had ESLint, the inspector instantly caught the typo and I didn’t have to deal with the heartache of sifting my code for a mistake like this ever again. Overall, not only is ESLint great for teaching coding standards, it’s an excellent inspector to help clumsy coders like me catch simple, but crippling mistakes.

Coding standards allows us software engineers to maintain quality within our code, as well as help organize ideas better. Coding languages are like normal languages so they must follow strict rules, and coding standards should be a set of rules that we must follow as well. It might be tedious at first, but with a little bit of practice, I do agree that it will learn programming languages more easily and create ease of accessibility. Code is still like any other written language, so must maintain some standards or else we aren’t using it as it should.