
The stereotype of coding standards is far from reality. It’s not just about where you place your curly braces or how many new lines you have between sections of code. Coding standards cover those aspects, but they go beyond that. They enforce specific rules on how your code should be structured because, first and foremost, they improve readability. When your code follows a consistent structure, it becomes easier for both you and anyone else reading it to understand each part. It also makes it simpler to identify specific sections when reviewing or debugging, as it’s clear where each section starts and ends. Coding standards ultimately save time—because in programming, you will NEVER not have errors. Debugging is inevitable. But if your code is structured consistently every time, you’ll quickly recognize potential mistakes due to the clear, organized format of your work.
Before taking ICS 314, I had only encountered strict coding standards once—back in ICS 212 with Professor Ravi Narayan. There were three key rules to follow: include header comments for each file and function, use only one return statement per function, and always place brackets on a new line. We were required to follow these rules for every coding assignment, and at times, it was challenging to ensure we adhered to them. But now, with ESLint, the process is a bit easier. Instead of trying to remember all the rules and manually checking if the code follows the standard, ESLint instantly points out mistakes, making it harder to miss errors. While fixing these issues may take extra time, it’s worth it because it builds a habit of writing cleaner, more structured code. Eventually, it becomes second nature, and in the long run, it saves both us and our future peers time when reviewing or maintaining code.
Coding standards, as mentioned previously, drastically improve the readability of one’s code. But how, you might ask? Well, let’s start with the basics. If you don’t use proper spacing between functions or classes, it becomes difficult to clearly identify where one ends and another begins. This means you’ll waste extra time searching through your code instead of focusing on actual problem-solving. Another common issue is inconsistent placement of curly brackets—without a standardized format, it becomes harder to quickly distinguish different code blocks, especially in larger projects. When code lacks structure, debugging becomes frustrating, and collaboration suffers. Imagine working on a team where everyone writes code their own way—without a standard, you’d spend more time deciphering messy code than actually developing new features. That’s why coding standards aren’t just about following rules for the sake of it; they create an organized system that helps developers work efficiently and makes maintaining a codebase much easier in the long run.
The essay above used ChatGPT for spelling and grammar corrections/suggestions