Code Conventions

The main reason to have code conventions within your developers group is that it can stop the discussion about code conventions. For some reason those discussions never converge on mutual agreement. In my environment the topic has not come up for a while, I like to keep it that way, but secretly I try to stick to some my own code conventions.

I have been following these rules

1) If you work on existing code adopt whatever conventions they seem to be using2) If code conventions differ from file to file use the conventions of that file don’t work toward conventions throughout the library.3) If you start anything new, go with the flow. Do whatever the majority is doing (spaces not tabs) or what big guys do (for c# I try to stick to the Microsofts guidelines, see this too).4) If for some (maybe good) reason you defer from the convention, do not invent a rule why you did this, just say you were lazy.

BTW, so please don’t tell anyone this, because it could start the discussion again.