All Red

13 Feb 2025

Why it Matters?

So why do coding standards matter?

Before you can answer this question, you need to understand what coding standards truly are. Often people think of coding standards as a rule telling them where to put the curly brackets or how many empty spaces they need for each line, etc. Although these are part of the coding standard, the bigger picture is often overlooked by many students like myself. In reality coding standards are an important foundation in programming. It helps programmers write understandable and organized code that is easy to read, not only for themselves but for others who might read their programs. Writing a well-structured code could help with debugging if your program crashes. When following coding standards you know where to expect brackets and semicolons, and missing or having an extra of either one of these is a notorious cause of program crashes. Following proper name for your functions will also save time and help other developers who may work on your existing files, understand what you wrote and the purpose of the program.

My Thoughts and Experiences

At first, I thought this whole coding standards thing was full of nonsense when I copied my code from Typescript playground to VScode and saw my whole program highlighted in red. Seeing all these warnings made me feel that something was wrong with my code so I ran it again on the playground, where it successfully ran. I searched for what could be the error online and found that restarting VScode fixed the red underline for others. I quickly restarted my VScode just to be welcomed by the same red underlines. That’s when I realized that the problem wasn’t my code, but my coding style. I then proceeded to remove extra indents and that fixed 80% of the red underlines. A couple of curly brackets moved to their proper spots later and my code was error free. It wasn’t hard at all to fix my program. It just took a little bit more effort to go back and clean everything up.

I will admit that I have not fully adapted to the coding standards and am still learning new things every WOD to fix errors. Just in the last practice WOD for Tuesday, I finally solved what is wrong with my functions being underlined blue. Although it didn’t affect the functionality of the program or the compiling, it irritated me how my code wasn’t error free. I learned that the reason for the blue highlight was that the keywords I was using, which was “Nums”, needed to be added in the VScode’s settings. I am hoping that after a few more WODs I could finally be fully adapted to the coding standards.

Why You Should Learn and Implement Coding Standards Now

Imagine yourself in a few years, you finally got the interview from the company you always dreamed of. You spent years focusing on improving your problem solving and learned all sorts of programming skills and languages. You started coding and it ran perfectly, solving the prompt given to you. Then your interviewer suddenly asks you, “Why is your code so hard to read?” You’re speechless and don’t know how to reply. You never really focused on coding standards other than what is necessary for your classes. Coding standards aren’t just classroom rules that you should follow only in school, they are necessary in the professional world. Writing a readable and maintainable code is a must, especially when working in a team of developers where files are shared and often modified. By adopting the coding standards now, you can save yourself from troubles in the future.