Building Good Habits

23 Sep 2024

The Importance of Coding Standards

Small details such as the number of spaces used for indentation, placement of spaces within our code or even having a new line at the end of the file seem like such insignificant details. Due to this, following proper coding standards can be seen as such a trivial task. However, when these little details are implemented to our programming or code, it can create a world of difference. When we incorporate proper coding standards into our code, we also greatly increase the quality of our code and build good habits that can be very beneficial in our careers. When working in software development, it is more than likely that we are working in a team environment and implementing good coding standards can greatly increase efficiency in collaborations. It ensures that everyone in a team writes code that is consistent and uniform throughout which boosts the readability of the code and could prevent many errors from occuring. Overall, although coding standards can be viewed as a trivial detail, it is vital when it comes to software engineering.

Learning With Coding Standards

Adhering to the practices of coding standards can be very beneficial as well when it comes to learning new programming languages. When it comes to naming a function or method, it is important to create a name that can properly explain the purpose of said function or method within a few words. This can greatly increase our understanding of what we are trying to implement which can in turn help us in learning new programming languages. On top of that, practicing proper coding standards require us to write code in a consistent manner making it much easier for us to read and understand the code along with the syntaxes and structure of the code we want to learn. Finally and most important is that it helps us to build good habits which can be useful in any programming language we decide to use.

My Experience With ESLint

In my short experience of ESLint, at first I thought it was a pain to use, but after using it for a bit, I learned that it can also be very useful. My first introduction of ESLint was through an assignment where we took a small block of code consisting of no more than 40 lines, yet there were over 30 errors in total. The whole block of code was red and it felt like such a trivial task to go through each line and fix every little detail of the code. The following assignments were to write our own code and following the coding standards I was taught so far, I still got a few errors through ESLint, and again it felt like such a trivial task to go through my code and fix every little mistake. However, in the more recent assignments, I took those small mistakes into consideration and wrote my code in a way that there were no errors within ESLint. Tt felt so satisfying to not see any red lines after writing out my code and my code also looks much better as compared to before. Through my short experience of ESLint, it helped me to fix some of the bad habits that I have been doing so far and fixing them with new and healthy habits.