Learn The Rules Like A Pro

24 Sep 2020

Pablo Picasso once said "Learn the rules like a pro, so you can break them like an artist," which to me brings about images of escape artists breaking free of their shackles or con-artists worming their way out of getting caught by the law. Much like these artists, software engineers have to learn to work with the rules that they are given to produce the type of art that they can call their own code. Too much freedom leads to bad design, spaghetti code, and convolution. On the other hand, restrictions can lead to greater creativity and even be inspiration to produce even better code. One such restriction is a coding standard like using ESLint in IntelliJ.

ESLint

Working with ESLint has given me greater insights into how to write more precise and concise code by doing away with some fluff while making the code easier to read. ESLint can also be a useful aid in teaching someone about the ECMAScript coding standard to ensure their code will work properly across various platforms. The tool helps one catch not only syntax errors, but even some logical errors that one might have missed in their code. It helps to catch those pesky missing closing brackets and parentheses that we often miss when blazing forward with our logic. It helps drastically in letting one be creative with their work as opposed to worrying about the syntax. After you're done getting your ideas translated into code, then you can worry about whether or not your syntax was right at the time. Writing code out in that method seemed to greatly speed up my coding time, as well as allow my mind more freedom to think on the fly.

IntelliJ

Another great addition to the coding standard was being able to integrate it into an Integrated Development Environment (IDE) such as IntelliJ, allowing me to have ESLint running in real-time in the background without having to run a command after every function or section of code. On top of having ESLint running, IntelliJ would also automatically fill in my closing brackets/parentheses/quotes/tick marks, providing me with that gentle reminder to close off my functions, logical blocks, and text segments. This added even more freedom to think about the logic instead of the syntax. While all of these features may be great, they may also prove to be an annoyance or hindrance to some people. Those gentle reminders can add up to be great annoyances, especially when you were already thinking of doing something and IntelliJ augmented with ESLint was putting a red squiggly line there telling you that you needed more whitespace. Overall though, I welcome the reminders more than find them an annoyance.

Coding as an Artform

Much with anything in life, being able to accept the pickiness of a coding standard in your IDE requires an open mind and a willingness to try new things. I feel like the autocomplete features and syntax checking of IntelliJ with ESLint helped me to learn Javascript even more than with something standalone like JSFiddle. While I did appreciate the portability of JSFiddle, I can definitely feel the power behind IntelliJ with ESLint, and I look forward to unlocking more of it. It is in my opinion that mastery of the greatest of tools will only allow one to code as effortly as an artists draws their 10,000th painting.