Code Standards - developing a manual

I am working on a manual of code standards for my division, and would appreciate input about this. I've incorporated (or adapted) many of the entries from the prolint lists of bugs, style improvement, performance enhancements, etc. Of course this will be a combination of helpful advice, common sense, ways to make the code more readable and re-usable, and ways to prevent problems down the line.

I will appreciate any suggestions or ideas that are sent in.


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tamhas's picture

Negative vs Positive Standards

One more comment that I might make is that building standards beginning with thing like those highlighted by ProLint tends to imply a set of standards where the emphasis is "don't do this". Of course, this might include "do this instead", but it seems to me that there might be a tendency for the overall thrust to be negative in tone. Myself, I would prefer standards which guided people toward best practices, particularly those which "sold themselves" because the programmer would see that they produced more readable, more maintainable, more understandable code.


john's picture

Is 10.1 available?

If 10.1 is available, it would be nice to be able to add to the coding guidelines some recommendations for taking full advantage of the new 10.1 OO syntax, and avoiding old v5-v10.0 language features. I think OO has proven itself well enough, even in the business and database programming world, that it should be embraced and adhered to by OpenEdge developers.

Of course, procedural scripting will always have appropriate uses, but I don't think that enterprise applications are one of them.

This topic of coding guidelines has come up in the past, and I'm sure that others have published theirs online... I just don't know where.

It would be nice if you could create a new Hive book/topic for this, once you have some material available.


tamhas's picture

Source of standards

One could certainly glean many possible standards from discussions on PEG ... many of which would be mutually contradictory! You should consider looking at the documentation for AutoEdge, which has some good standards documents ... although I don't agree with all of them. You might want to look at my own piece on Hungarian notation here on OE Hive http://www.oehive.org/Hungarian .

It could be very interesting indeed to create this as an OE Hive book, structured enough so that it was possible to accumulate alternate opinions as comments on each page. That would be a much richer resource than any one version, although one would obviously have to sort out which variations one was going to use at a particular site.