Coding standard or best practice? I have witnessed so many attempts to set up some coding standards in a team and failed. There are still coding standard proposed every day and I bet there are some emails flowing around now. I can't say all of them, but most of them, will fail miserably. I have seen quant code, dev's code, system admin's code, etc. It seems that everyone has its own coding standard. Every industry has its own way to practice the software development. Is there a general coding standard, or should a coding standard exist at all?
Now days, I feel those standard or effort to push such standard does not make much sense. Programming language is a way human tell a computer how s/he understand and solve the problem. It is like human language. Is there a standard way or "best practice" to say something? Do you have the "best" way to describe how solar system works for a 10-year-old boy? Is the "best way" still the best when facing a 20-year-old?
For me, I think the best way to set up the "best practice" to understand your team. if my team has quant or physics background people. They want to use single-character variable name, it should be fine. Take a look at those mathematics paper they read every day, it is not difficult to understand why single-character variable name is the best choice for them.
If I had a team whose members are all system admins, should I ask them to define interface or introduce complicated inheritance? Definitely not. Does this mean my project will fail? No.
My job is to have my team to tell the computer how to solve a business problem. My team will use a programming language + framework to describe the solution. As a tech manager, my job is to choose the right technology for my team. That technology should be the most efficient and convenient way to
- understand and communicate among team members
- communicate between a human and a computer
The diversity of technology is the outcome from innovative person and team to serve different people in different business environment. If you are pushing for innovation and still enforce a rigid coding standard, think twice.