The Power of Spaces

22 Sep 2016

White spaces, though they may seem insignificant, have helped me tremendously in making my code more readable. Having well-formatted code can have a significant impact on productivity. I typically code using a visual editor in the shell and do not adhere to a single formatting standard. I’ve had many situations where I’ve had difficulty visualizing what is encapsulated within code blocks such as for loops, while loops and HTML tags. This confusion and inefficiency could have been easily avoided by using indentations. I find that ESLint is a great tool for developing well-formatted code and enforcing good coding practices.

I initially had a bit of trouble setting up ESLint in my development environment, IntelliJ IDEA. Configuring my settings took a while but with a few searches on the internet, I was up and running with ESLint. With this new tool, I found that I was writing much cleaner and understandable code. I got a few errors at first while using ESLint but getting the green checkmark became increasingly easier as I developed the habit of writing code formatted to the ESLint standard.

Another great thing about ESLint is that it promotes the development of consistent and readable code that everyone on a project or trying to understand the code can easily track. This is very valuable especially in the software engineering world where the same program can be worked on by different people. In this context, it is extremely important for everyone to adhere to the same coding standard so that everyone on the project has an easier time understanding code written by another team member. By simply editing the config file, .eslintrc, a group can define a uniform set of rules for their coding styles which the ESLint plugin will enforce.

Although ESLint takes time to configure, I think it is well worth the intial time investment of setting it up and understanding how to use it. It definitely pays off in time not wasted dealing with poorly-formatted code.