Organize With JavaScript

10 Feb 2022

More than just readability

How do you code? — do you have your formatting style like how you want your essays to look or your notes are written?

  let i=0;
  if(i==fail){
  return "I want to" +cry;}

DISTURBING!! However, if it gets really busy, I also end up writing my code that way.

Personally, I like having color-coded notes to keep organized, even though I barely could do it since I’m way too busy figuring out how to do it rather than making it happen. Same thing with coding. I like seeing my code indented and commented so I can keep track of my code and I understand what it is. Fortunately, there are IDE’s or software like ESLint that would automatically format your code for you.

But why do we prefer having our code or even our notes be “organized”?

  let i = 0;
  if (i == fail){
      return "I want to" + cry;
  }

I think it is more than just for the sake of our own readability but also helps in practicing a standard that will help everyone understand what we did. This will keep our code strong and readable. The same goes for our notes which can help us understand the materials we wrote.

ESLint

When I first started playing around with IntelliJ by JetBrains, I also got to use ESLint which I think is a cool tool that helps in organizing our code. This also helps in identifying errors that I would sometimes forget about. However, it is quite tedious to activate them every time I have to make a new project in IntelliJ. I know that IntelliJ already can format our code, but ESLint helps linting codes in more JavaScripts.

Conclusion

I think that if you are organized with your things, it will help in your productivity. Having coding standards applied in your studies will also help in learning programming languages better and understanding them more clearly.