The Ingenuity Behind Autocorrect

21 Sep 2022

Standards of Coding

Have you ever gone through a program where it is extremely difficult to read? There is no spaces between words and operators, the indentation is non-existent, the code has many unnecessary and unused variables? The simple fix to this problem is to follow a coding standard. Coding standards are a great way to help someone learn a programming language, this is because it makes the code much more understandable and is much easier to read. Coding standards also help with assigning variables and assigning the correct data type.

The benefits of using ESLint

ESLint is a coding standard used for JavaScript and can be used to show indentation errors, when to reassign variables, warnings of unused variables or functions and many other things to improve your coding style. This is my first time personally using ESLint and I think it is a very useful tool and I would use it for many of my coding problems. One thing I like about it is it tells you when you have errors in the code, for example if you have written a program with hundreds of lines and it has problems compiling and running because of a typo in some function it is sometimes very difficult to find without ESLint. However, being able to use ESLint helps to solve this problem as it alerts you where you have a typo and you are able to go back and fix them before they become a problem.

Attempting to get the green check is something that I find both painful and useful when working with ESLint. The painful part comes when you see there is an error on a line but are unable to figure out exactly what to fix before realizing it was just a missing letter. Having not used coding standards for many other coding problems it is a bit difficult to go through and avoid having various errors throughout each problem. However, having to work towards getting the green checkmark is also very useful as it helps me to improve the readability of my code and helps to improve my variable assignment. Overall I find ESLint to be a very helpful coding standards as it helps improve the overall quality of the code I write.