Standardized Programming

Miscellaneous Forums/General Discussion/Standardized Programming

I find it very interesting that 4 different programmers have a developed a programming standard for themselves with very similar rules.
No they haven't. For starters many things (like indention) is just plain common sense. Secondly because functions have similar sounding names, does not automatically imply that they have the same function. Thirdly not using shorthand type specifiers is a matter of readability - the average person can remember 7 things give or take 2 at any given time - if you need to remember which is integer "#" or "%", that leaves you 6 other things you can remember. Explicitly using :int or :float simply frees up one of your memory "slots" so you can have more of the language idiosyncrasies in memory at one time.

All of the things mentioned so far are fairly benign things that any sufficiently competent programmer would consider common sense, including CS_TBL's poor naming of throw away variables.

What about things like chaining methods? Should every method explicitly "Return Self" at the end? So you can do stuff like blah.update().draw().reset() in one line? Some would say yes, some would say no. Some would question whether it's even always possible.

Another thing is indentation of assignments. For instance do you assign variables like this:
Local Name:String = "FlameDuck", Rank:String = "Private", Number:int = 1337, ChallengeRating:String = "Poor"
Like this:
Local Name:String = "FlameDuck"
Local Rank:String = "Private"
Local Number:int = 1337
Local ChallengeRating:String = "Poor"
Or like this:
Local Name:String            = "FlameDuck"
Local Rank:String            = "Private"
Local Number:int             = 1337
Local ChallengeRating:String = "Poor"

Also do you use CamelCase (ChallengeRating) or Underscores (Challenge_Rating). Do you use ALL CAPS for constants and if so, do you use underscores to separate words, and how do you simulate type-safety in a language that doesn't have TypeSafe Enumerators (like Blitz3D and BlitzMAX)?

Do you use Hungarian Notation, and if so, how is your bastardized variant (because the traditional variant is woefully inadequate)? Do you have some sort of name manging in place to prevent symbol clashes between your code, and someone else's code (or worse, DLL)?

What about unit tests? Are you using ad-hoc tests, in-line tests or separate tests? Are these part of your standards, or imposed by 3rd parties (like JUnit for instance)?

Now, if only they could all come together and AGREE on a single Collobrative Framework.
I'm not quite sure what you mean by Collaborative Framework, but Trac, MediaWiki and Sharepoint are all rather popular. Wow. Can't even agree on one standard for collaboration. Do you think that's because different people have different wants and needs?

Programmers have different values, popular ones are productivity (how long would it take me to do task A), functionality (how well does task A work), usability (how easy is it to do task A), performance (how long does it take to perform task A), supportability (how much time does it take to change task A into task B), reliability (what happens if task A fails). No matter what task at hand, corners are going to have to be cut, so you prioritize which are most important to you, and your coding standards (and to some extent choice of language and platform) are going to reflect these priorities.