I've been doing more work on running coding dojos and as part of that I've been thinking about compliance to published coding standards and what the purpose of those standards are. Some of the rules have a very clear purpose: doing it in a certain way is just plain better. Other rules have a more subtle intentI think: essentially they are brown M&M's.
Let me explain: Van Halen arranged notoriety for having a rider than insisted on having all brown M&M's removed on pain of forfeiture of the show. Most people put this down to rock star arrogance, but actually the reason for this clause is a lot more interesting. This is from David Lee Roth's autobiography:
Van Halen was the first band to take huge productions into tertiary, third-level markets. We'd pull up with nine eighteen-wheeler trucks, full of gear, where the standard was three trucks, max. And there were many, many technical errors — whether it was the girders couldn't support the weight, or the flooring would sink in, or the doors weren't big enough to move the gear through. The contract rider read like a version of the Chinese Yellow Pages because there was so much equipment, and so many human beings to make it function. So just as a little test, in the technical aspect of the rider, it would say
"Article 148: There will be fifteen amperage voltage sockets at twenty-foot spaces, evenly, providing nineteenamperes . . ." This kind of thing. And articlenumber 126, in the middle of nowhere, was: "There will be no brown M&M's in the backstage area, upon pain of forfeiture of the show, with full compensation."So, when I would walk backstage, if I saw a brown M&M in that
bowl . . . well, line-check the entire production. Guaranteed you're going to arrive at a technical error. They didn't read the contract. Guaranteed you'd run into a problem. Sometimes it would threaten to just destroy the whole show. Something like, literally, life-threatening.
So maybe that's what some of the style rules in coding standards are. Brown M&M's. A way to see if whoever wrote the code was paying attention and thinking about what they are doing.
