When I was a kid, I started playing badminton. I pay it with my families, friends and classmates. And I play it everywhere I can, including playgrounds, corridors, and even living rooms. I love badminton, and I’ve been playing it for years, since I was little. You will probably assume, that I must be good at playing badminton. And you are right, I am. Well, it also depends on what “good” means to you. Even though I grow up playing badminton, I can’t be a professional badminton player, since I never know the rules. All I care about when playing badminton was to catch the ball, then bit it back, in the manner which make it easier to be caught by the opponent, so that we can keep playing without stops. This is exactly why I can’t be a professional, I never play with purpose of scoring and failing my opponent. This analogy applies to coding. We can’t be a professional coder or software developer, if we don’t train ourselves with the rules or purpose predetermined in this profession.
So what is the goal of writing code in this profession? Of course, you would say to create softwares. However, in many cases, software developers are writing code that is part of a program. And a lot of times, we can’t write the program that can do everything we want due to many factors, such as, time limit or inappropiate run time. This means that it’s very likely that we will go back to extend the code, fix the bugs, or improve the algorithm whenever we have more time. Thus, softeware developers also write code with the goal of writing code readable, fixable, and maintainable (by other developers). And this is exactly why we need coding standard. It’s sets the grammar, which make it capable for all the software developers to communicate. It creates strong fundamental structure, which we can easily build onto. And It’s the key toward professional coding practice.
We know that coding standard is important. However, We are always used to do things the old way. My first language is Chinese. So, when I’ve just started learning English, I get used to say English the Chinese way. That’s common, we all do it. But does everyone have English as the second language speak English in the syntax or with the accent of their first language. Nope! I know someone, who can speak English so fluently. And I also know someone who speak English with accent over their whole life. What makes a big difference is whether they correct their mistakes properly in the early stage of a new language learning. This is the same as coding. When we’ve just started programming, we focus much of our attention on whether our programs work. And we simply ignore the coding standard. Most of us started programing by taking a class in school or online. We always think, It’s just for studying, so we don’t need to pay much attention to professional standards, in order to save time. And we also believe we can make an instaneous switch toward professional coding practice in the future. But no! That is not the case. It’s easier to develop a new habit than to fix an old habit. Thus, it’s very important that we can get used to strictly follow coding standard when we’ve just started programming. This can be tough, since we will need to fix a lot more errors than we used to. However, once we get used to it, it takes no effort to do so. It can also do a lot goods to us, since now we can read ourselves’ code more easily. Furthermore, it’s also beneficial to our whole career.