The Coder No One Understands

08 Feb 2024

Embracing Change: Transitioning to IntelliJ and ESLint

This week, we started using a “new” system when it comes to our WODs (workouts of the day), and I have to say, I was not the most keen on the switch when we first started. With the switch to IntelliJ, our new IDE of choice, we also had to tag along and implement the ESLint coding standard, which is used to maintain coding quality and consistency in syntax and formatting problems.

The Love-Hate Relationship with ESLint

Let’s just say, my first impressions of ESLint were 50-50. I admired how ESLint corrected me when I was wrong, such as unused functions and parameters, and making variables that weren’t const, const. However, my habits of ‘incorrect’ spacing and other formats that ESLint enforced were being pointed at heavily. Things such as not being able to have any extra line at the end of the code, making sure there is a space before the parameter when writing a function, etc.

Squiggly Lines and Green Checkmarks

Within IntelliJ, we implemented ESLint to indicate at the top right of the screen whether there are any mistakes in our code or indicate a green checkmark if there aren’t. This feature to me was quite a nuisance when we first started. Within writing code, you are bombarded with red squiggly lines almost instantly. These lines are practically yelling at you, saying the code’s format is not correct. Well, of course, ESLint, I just started! During the first couple of sessions of using such, and seeing the rain of squiggly fire, it would make me second guess myself completely! This at first was extremely bothersome and quite the pain. However, after correcting all the errors ESLint was telling me I had for the first couple of practice sessions, I saw a big difference in the readability and overall format of my code. Now I strive to trust the process of writing my code, and push for that green checkmark!

The Importance of Coding Standards

Now, the question that some people may be wondering is whether or not coding standards help one code. It is a great tool that provides great guidance when one KNOWS where to start and is coding something. I would say that coding standards are good at reinforcing learning as it shows you the right way to write and format code, but you need to know what to write and code to even take advantage of the coding standards by ESLint. If someone with no coding experience downloads IntelliJ, puts ESLint on their device, and has all the resources to get started to code, how will they be able to write a function? So to answer this question, I think it’s a great tool for reinforcing and pairing with previous/known knowledge to further strengthen one’s ability to code. Just like how we can use a calculator to help us (derivatives, integrals, etc), but we need to know what to put into it first!

Do Coding Standards Make a Difference?

Overall, coding standards are a valuable skill to have. It’s a standard that forces one to adapt to a cleaner, readable code, which is important, especially in joint coding projects, and team settings. I think learning coding standards and implementing them with ESLint, while at the beginning a pain, is a very valuable skill that will greatly benefit us, coders, in the future. Who wants to be known as the coder that no one can understand?

- ChatGPT used for paragraph headers