We (those who develop software) still argue over coding standards. I do not refer to meaningful discussions over clarity, readability or group/project management. I mean crazy, ranting and aggressive behaviour towards one another over a ‘trivial’ matter.
Before anyone jumps on my face for using the word ‘trivial’, I offer the following advice:
- If you work at a place with a compelling reason to adopt a style, adopt it and join in on constructive discussions about its use at the appropriate time.
- If you have a personal preference, then apply it consistently and bask in the loveliness of your own code.
I do not think code standards are trivial and pointless. I think they are important and create clarity. I think arguing about code standards is unimportant. Actually, I think arguing about code standards is more than unimportant, I think it can be destructive for communities in general. It really does not matter what the requirements are, we have programs to format source code at the speed of a key stroke.
PHP, for example, has a number of standards to consider:
That list is not exhaustive, there are many other code standards to consider and they are usually related to various application frameworks. Big choices, big decisions – so big that I can configure my IDE of choice (PhpStorm) to convert my source code to any of them, almost instantly. I can also configure hooks to format code according to a project specifications, which can even be done automatically before commits. Unless you are pair-programming and decide on a mutually acceptable standard, code in whatever standard you like and simply convert it for your needs.
Why argue? Get along with each other and create software instead; you might even catch yourself smiling more!