Coding Craftsmanship

25 Sep 2024

Coding Standards: More Than Just Rules and Curly Braces

Coding standards are oten seen as picky little details, like whether your curly braces should be on the same line or the next, or if your indentation is off by a space. These rules might seem like nothing than just a distraction from real code. But for me, coding standards are more than that. I think they’re an important part of writting code that’s clean, easy to maintain, and helps others understand what’s going on. If I had to pick one thing thing that had the biggest impact on the quality of code formatting, it would be sticking to solid coding standards.

Things like adding comments may seem small, but I’ve learned they play a huge role in making code understandabl–both for me when I revisit it and for anyone else who might look at my code. I think of it as a story: if you want other people to get what you’re saying, you’ve got to organize your thoughts. In the real world of programming, coding standards are like the grammar and structure that make your code readable and easy to work with.

Learning a New Language? Well, Coding Standards Got Your Back

You woudn’t necessarily think of coding standards as something that helps you learn a new programming language. A lot of people see them as rules for after you’ve already mastered the basics. But I’ve found that following coding standards actually makes learning a language easier.

When learning something new, it’s not just the syntax that messes me up–but it’s to figure out how to write code that’s both efficient and easy to maintain. That’s where coding standards come in, as they provide a framwork–almost like cheat sheet–for writting code that works well with the langauge’s strengths. When I started learning Typescript, learning from scratch really helped me understand itts whole ‘type’ system, and because it’s a revist to Java. Eventually, following these rules are familiar, and my overall skill with the language improved.

It is not only Typescript, though for every language that has its own set of coding standards that I practice. Sticking to them, I’ve been able to learn not just how to write code that works, but how to write code for that language. While coding standards may not seem like a learning tool at first, they’re actually a huge help in understanding how a language is really meant to be used.

Teamwork Makes the Code Work

One of the biggest lessons I’ve learned about coding standards is how they make teamwork a bit easier. It’s a nightmare to read, let alone merge all the pieces come together. Coding standards solve this nightmare by making sure everyone’s code looks the same, which helps everyone in my group work on the same code.

In group projects, following coding standards saved us a lot of time. Instead of complaining about whether to use tabs or spaces, or where to put curly braces, we followed the agreed-upon standards and got on with the coding. If someone’s logic was a little tricky, it was easier to grasp since the formatting and style were consistent. This is espicially important when projects get bigger and more complex. When my group members and I stick to the same coding standards, the whole code feels like it was written by one person. This would just mean fewer misunderstandings, fewer bugs, and more easier time making changes when we need to. Overall, coding standards made working in a team feel a lot more smoother as we can collaborate with others efficiently.

Tedious but Totally Worth It: Long-Term Wins

Codings standards feels like a chore. We are required to fix endless amount of errors, and it can be seriously annoying when all you want to do is finish your code and move on with your day. Coding standards–as tedious as they may seem–are doing us a favor in the long run.

As assignments and projects get more complicated, it’s easy for code to turn into an unmanageable mess. When we follow coding standards from the beginning, we are setting ourself up for success later on, as the code stays neat and oraganized. Coding standards also make sure we’re not introducing small errors or bad habits that could turn into bigger errors throughout the code. Those kind of tools that warn you about the errors might be frustrating since they flag every tiny mistake, but they’re there to help us write a clearner code from the beginning to the end.

Final Thoughts: Coding Standards Aren’t Just for Show

At the end of the day, coding standards are more than just nitpicking over indentation or where to place curly braces. They’re an essential part of writing good code that’s easy to maintain, easy to scale, and easy for others to understand. It may feel irritating when we’re dealing with endless style of erors, but embracing coding standards is worth practicing. For me, it has help me to learn new languages, better collaborate with my classmate on assignments, and keeping my code clean. I’ve come to appreciate them as a tool that not only makes my code look nicer, but also ensures that every piece contributes to the bigger picture on my growth as a developer.

My experience with coding standards has been a mix of challenging and rewarding. While they are a hassle at first, they’re actually an important part of being a good software developer. Making code easier to understand, help me work in a team, or forcing me to think carefully how to write my code, coding standards became an essential part of how I approach every project.