in reply to Re^3: Seeking Best Practices - does your company follow a standard?
in thread Seeking Best Practices - does your company follow a standard?

You are correct on all points:

1. I believe we're speaking about judgement (common sense, or practicality) , and I don't think you can codify these things. Instead, we must rely on standards/guidelines combined with peer code reviews.

By "peer code review", I don't mean "pressure"; rather, I'm thinking of it as idea exchange. The image I have is similar to what we see here in the monastery. Folks offer up code samples and others have a look and offer alternatives with an explanation of why they think their's is the better way to go. Very often, there are valid reasons to use the alternative. And of course, sometimes, it does come down to personal preference.

2. No, I have not spent much time explaining the difference between 3 or 4 spaces indented, but I have spent way too much time explaining why not indenting at all is unacceptable in producton code intended to be maintained by others.

I agree with your rant about the silly things. My point was not so much about how much one indents as it was about them just indenting, and doing so in a consistent manner.

  • Comment on Re^4: Seeking Best Practices - does your company follow a standard?