views:

530

answers:

3

I am in the process of writing (down) our companies coding standards for Delphi programming, so what would anyone suggest to have as a basis, anything that you would recommend to use / not use ?

+11  A: 

I used Delphi Language Coding Standards Document as a basis for an internal document.

The Object Pascal Style Guide could probably be termed the "official" one, I think - as far as there is such a thing.

dommer
I've looked at both these documents and they are both awfully formatted and out of date with Delphi 2009. What I don't want to do is enforce 'style', just a set of rules to operate within.
Mmarquee
+15  A: 

Be careful not getting too anal about forcing standards. You might want to collect a few sample examples from your most experienced programmers, get them to agree, and use those as templates for everyone.

Jeff Atwood recently had an interesting Blog entry about just a single aspect of standards: "Death to the Space Infidels!" and in there he says: "It doesn't actually matter which coding styles you pick. What does matter is that you, and everyone else on your team, sticks with those conventions and uses them consistently."

lkessler
I wish I could upvote this more than once...
Mason Wheeler
A: 

Coding standards are a classic bike-shed topic. People argue and fight about this stuff BECAUSE it's little, and ultimately not as important, as good design. Clean, readable code is worth having, and clean readable badly designed code is very little better than unreadable badly designed code. Maybe the most readable bad code makes it easier to figure out that it needs throwing away.

Efforts to encourage team members to contribute clean readable code can include the promotion of style guides. Style guide reviews where you bash someone repeatedly for using the wrong style, are counter productive. If someone has trouble using an acceptable style, introduce them to the joys of using some tools. Do not make a highly competent programmer buckle under the strain of too much criticism over very minor points.

Warren P