Last summer, I took two classes that required a lot of writing. One class was a writing intensive course and the other class had a research paper. There were specific instructions for each paper. For instance, there was a particular margin that we needed to follow, the style for the papers, an assigned font and size of the word, contents, and so forth. In order to get the points for the papers, or for teachers to read my papers, I needed to follow those instructions first.
As writing a paper requires a writer to follow the given instructions, coding also requires being in line with “coding standards.” Writing a code is not only for ourselves, but also for a person to read our code. One professor said that a code that looks so complicated and cannot understand by looking it is actually bad code; however, a code that looks simple and easy to comprehend what it would do is a good code. I think this is so true. When we write a paper, we try to make a point clear so that a reader would understand what we are talking about. Coding is the same thing as writing a paper. We should write a code clear so that a person who reads it would have an easier time following the code. Coding standards will help us get a readable code to everybody.
This is my first week using IntelliJ and ESLint. ESLint corrects a code based on coding standards. It was painful but was useful at the same time. I was used writing a code like
function Hello()
{
console.log('Hello World');
}
But I was corrected to
function Hello() {
console.log('Hello World');
}
The minor correction is changing let
to const
. It was painful when I needed to correct the style of the code even though it was working correctly. However, thorugh this process, I was able to know where to fix and how to correct my writing style and to shift my coding style to coding standards. I am starting to get used to it and want to have a habit of writing clear and readable code for everyone.