Pro Programmer
Linting And Task Automation

Linting and Task Automation

If you have to drive alone on that long trip, you can still make your journey safer by relying on tools. A map is a tool. The GPS is a better tool. Cruise control is another tool.

Tools that automatically warn you if you do something wrong while driving are similar to linting tools for coding. In JavaScript, the best linting tool today is ESLint. It will warn you about so many wrong things you should not be doing while coding. Best of all, it can do that even before you run your program.

Examples of tools that warn you while you are driving are evolving in modern cars. Cars can now warn you when you cross a lane line unexpectedly or when you try to turn or change a lane while not seeing that hidden car in your blind spot. Additionally, they warn you when you drive over the speed limit or when you are about to hit something while trying to park in a tight spot.

Linting tools also evolve to provide more accurate and helpful warnings. ESLint always surprises me with very accurate warnings. Additionally, its default recommendations are getting better with each upgrade.

Another analogy that I love in modern cars is automation. Any task that you repeat often should be automated once its purpose and value are clear. Instead of restarting that program every time you save the file, have a monitor process that automates that. Rather than running a format command on your code before you share it with others, have a command that automatically does that every time you commit your code to source control.

Modern cars automate so many things as well. The obvious example here is adaptive cruise control, but other subtle examples include automatic windshield wipers and automatic high beams at night (my favorite!).