The Importance of Standards

Tweet

The working world would be nice if we could only develop and maintain our own code. The reason being: we would inherently understand the concepts, work-flow, and logic within it. But like every working developer I’ve ever known, including myself, our days are filled with maintaining existing programs – sometimes a process not for the feint of heart.

As a long-time programmer, often with a staff of other programmers to watch over, I learned early in my career how important enforcing programming standards is in contributing to the overall success of a project. Not only do standards affect an individual’s production of code, but they ensure that anyone else who may contribute code later can do so with a reasonable expectation of consistency.

My own experiences have shown that while the practice of non-standard coding appears across the entire spectrum, from beginner through the seasoned professional, the vast majority of violations seem to happen with beginners, entry level or least supervised programmers. Why, one might ask? Simple! The developers’ supervisors did not live up to their responsibility of encouraging standard coding practices.

Exactly what are standard coding practices? There is no one book; no one Internet site; no one master plan that describes such standards. Oh, there are formatting standards used widely within certain circles. But for most of the on-site projects I’ve seen in my 35+ years of analysis and design there usually only exists a semi-formal standardization plan that was decided by someone, somewhere, responsible for the production of the project. It doesn’t matter what the standards are as long as they convey the expectations for coding and documentation. While rules sometimes exist to be broken, standards should change only for the better to assure the application yields even better and more consistent results.

And so, what should be standardized? The simple answer is… everything! From a project manager’s view this would include program naming conventions, field names, function names, report layouts, database layout, testing procedures, development platforms, etc. You’ll see how standardization efforts will link all the components of a project, in time, to form one homogeneous entity which becomes much more easily understood, easier to understand in the future, and also much more easily maintained.

So what does one do when there is no existing standards? Two words: create them. I will admit that creating a new standard for everything is no trivial task, but you’ll will find that the efforts will yield productive results. You don’t have to create them from scratch – many open source projects have published their standards and guidelines online and you are free to use them as the basis for your own; you can adopt one wholesale or pick and choose elements from several, whichever makes the most sense for your team. It’s not as important as what the standards are, but rather that there are standards in place.

If you are a lower level programmer, always follow any established standards. If a standard can be improved or expanded, discuss it with your supervisor who should greet your comments with enthusiasm. If you are a supervisor, welcome such suggestions. Even if you are a single person programming shop, you will benefit greatly if you take the time to create your own standards then adhere to them throughout the development of the project.

Hopefully this information will not fall on deaf ears (or eyes as the case may be). Industry experience has proven that establishing standards and adhering to them yields better production results and make day-to-day life easier because of the order that comes with them. My personal experience also tells me that once one implements and works with standards, they never turn back.

Image via oconner / Shutterstock

Free book: Jump Start HTML5 Basics

Grab a free copy of one our latest ebooks! Packed with hints and tips on HTML5's most powerful new features.

  • Naveed Hasan

    Great article. I have very little programming experience, and whatever software I have developed in this time, I have realized this too. Something as simple as a function’s name could hinder the progress of a project if not handled well enough.

  • http://www.kabelkultur.se pa

    Amen :-)

  • mario

    Standards are great. Faux standards are not. Whenever a group collaborates in isolation to cement an implementation to their own benefits, it does not always further progress or interoperability.

  • Hardy

    Article would be more useful if it pointed to some actual standards. I realise they differ between outfits, but for novice programmers and coders, is there not a starting block of suggestions out there on the interweb somewhere? If not, why not… Hmmm off to do some googling ;)

  • Tchule

    A good IDE like Eclipse or Zend Studio already does a lot of work to ensure naming and indentation standards and some external tools can help too :
    http://pear.php.net/package/PHP_CodeSniffer
    http://code.google.com/p/phpcheckstyle/

  • http://www.maltblue.com/ Matthew Setter

    Hi Robert,

    I agree that coding standards are an absolute necessity – if you want to keep your sanity and enjoy a healthy balance between working and living – as well as delivering software to a high quality and on time.

    All too often, in various organisations, I’ve seen scant regard for standards and met with some blank faces when I suggested that they be implemented. Periodically I’ve seen programmers in senior positions be against implementing them also. I can only infer that this was because they’ve never used them themselves and so don’t see why they should. This isn’t a rant, but a reflection on my experiences.

    I don’t see an excuse not to implement standards, especially when there are such well debated and developed ones, such as the Pear (http://pear.php.net/manual/en/standards.php) and Zend Framework (http://framework.zend.com/manual/en/coding-standard.html), in the PHP arena at least.

    Now, we may not agree with every part of either standard, but as you well said at least when standards are used – by all the developers, including the senior ones – then code is easier to follow and to learn for new code maintainers coming on to take over the project. It can be extremely difficult and unduly time consuming to take over a project when you have to navigate multiple approaches to coding. Having a mish-mash or complete lack of standards is just not a practical or efficient way of developing high quality software.

    Thank you for sharing your experience.

  • Jaco Nel

    When developing in a team standards are a must have. As mentioned we already have a quite a few great examples out there for php, why not grab one of them and adapt them for your team/orginisation.

    One more important thing to remember when setting up coding standards fro your team is to actually allow your team to participate and recommend certain standards. The team will have to follow the standards and it will be alot easier for them if they know they contributed to the creation of it.

    Would you just follow standards if you did not agree with them?

  • Chris Griffin

    Bravo. I hope many programmers and managers take your message seriously.