Practice: Coding Standards
  • Team building exercise [case vs lookup]

  • Every team has its own coding culture

  • Tabs are 8 spaces

Notes:

If you can't agree on the coding style, you probably can't agree on more important things. Use the coding standard as a way to build the team. Everybody has to buy in or it won't be used.

[case vs lookup] One of my most memorable debates about coding standards was with Jeanette Symons (CTO, Zone Technologies). Jeanette and I were both fresh out of school and we had a heated debate about whether you should use a case (switch) statement or a lookup table with procedure dispatch. The point is moot today, but it was very important to both of us at the time. We eventually came to terms, but it took us hours to resolve our differences.

The culture of coding is critical to any software team. All teams develop their own language with its idioms, acronyms, and metaphors. The coding standard should formalize as much of the culture as possible.