Code merges and other fun problems
by Matt Webster · in General Discussion · 03/19/2002 (5:42 pm) · 14 replies
Now I really like the idea that the project is essentially going to act like an open-source game, but with it would bring some major hurdles.
What is the standard that would be used for variable naming?
For commenting?
For change logs?
For code merges?
For replacing others' code? (if it proves to be inefficent or easily improved upon)
I really would like to help out with this project in any way possible, but these are some things we really need to get solidified before we start handing out tasks to multiple coders.
What is the standard that would be used for variable naming?
For commenting?
For change logs?
For code merges?
For replacing others' code? (if it proves to be inefficent or easily improved upon)
I really would like to help out with this project in any way possible, but these are some things we really need to get solidified before we start handing out tasks to multiple coders.
#2
*Remembers his friend's Cobol program*
Impossible to read.
04/16/2002 (5:29 pm)
Agreed. All hell would break loose if we don't have rules and coding standarts.*Remembers his friend's Cobol program*
Impossible to read.
#3
We've done these sort of things in the past at Dynamix, but you really have to be willing to clamp down and refuse code that doesn't conform. This is a lot easier if it's all being "filtered" through a small group of people rather than everyone having write access. Still, a lot of work for the guys who have to deal with it.
04/16/2002 (5:46 pm)
Definitely need a coding "style" guide. We were planning on putting something together for the Torque engine itself as well... so at least any future enhancements and submissions can conform to something ;)We've done these sort of things in the past at Dynamix, but you really have to be willing to clamp down and refuse code that doesn't conform. This is a lot easier if it's all being "filtered" through a small group of people rather than everyone having write access. Still, a lot of work for the guys who have to deal with it.
#4
Coding standard template/example
When you define your (personal/group) coding standard, you might not want to define it too restrictly as it will make the standard harder to follow.
04/16/2002 (8:56 pm)
Here is a example coding standard following the template defined by humphrey. Coding standard template/example
When you define your (personal/group) coding standard, you might not want to define it too restrictly as it will make the standard harder to follow.
#5
04/16/2002 (10:18 pm)
That's a pretty poorly written coding standard there by humphry (who is he?)...
#6
Unfortunatly, his original document of coding standard is not subjected to public release (which was the original link i provide). The above link is just an example of a customized personal/group coding standard that uses his coding standard template.
who is watt humphrey?
04/16/2002 (10:59 pm)
Watt. S. Humphrey is one of the guru in software engineering field. Most of his publications are surved as fundation in many S/E research areas, includes 'Software Quality management', 'Personal Software process', 'Team software process'. He also played an active role in define CMM/SW-CMM. If he were to speak in a room full of software engineers, everyone else in that room would shutup instantly. Thats how well respected he is.Unfortunatly, his original document of coding standard is not subjected to public release (which was the original link i provide). The above link is just an example of a customized personal/group coding standard that uses his coding standard template.
who is watt humphrey?
#7
I despise underscores in variable names.
D-E-S-P-I-S-E!
I also don't like Hungarian notation when used almost entirely.
Personally, I've coded for a while with standards similar to that used by Dynamix with Torque. Heck, I gotta admit I've changed some of my variable naming schemes due to the Torque code.
Member variables begin with m (not m_ like Humpy said) so it's easy to identify at a glance what's a member variable without need that rather annoying _ character.
Another thing he does, which I Can understand it's usefulness is the use of "p" to precede pointers. Sure, it's nice... but with so many pointers it becomes pretty tiresome. I started always doing ptrVariableName, but now I've just dropped the ptr altogether.
Oh, and no underscores in other types of variable names. No "the_cow_is_hungry_" instead I do: "theCowIsHungry". It's easier to type, and just as easy to read (personally, I think it looks "cooler" but don't even try to ask my to explain why I think that)
I'm no coding expert, but I think we need to base the standard around how Torque was built. Tim said Dynamix had standards, so I'm sure their "plan" for Torque and Realm Wars will be based around that since there's no need to reinvent the wheel.
On a tangent...
I don't know if I'd shut up when he'd talk. I have a tendancy not to really show respect "just because". Either I have to know the person and respect them, or their efforts have either impressed me or has helped me in some way.
Just because most everyone else respects them, I don't feel I have to. Sure, it might seem rude... but I think it's rather rude to expect people to bow down "just because". Isn't that something reserved for a monarchy?
04/16/2002 (11:39 pm)
YUCK!I despise underscores in variable names.
D-E-S-P-I-S-E!
I also don't like Hungarian notation when used almost entirely.
Personally, I've coded for a while with standards similar to that used by Dynamix with Torque. Heck, I gotta admit I've changed some of my variable naming schemes due to the Torque code.
Member variables begin with m (not m_ like Humpy said) so it's easy to identify at a glance what's a member variable without need that rather annoying _ character.
Another thing he does, which I Can understand it's usefulness is the use of "p" to precede pointers. Sure, it's nice... but with so many pointers it becomes pretty tiresome. I started always doing ptrVariableName, but now I've just dropped the ptr altogether.
Oh, and no underscores in other types of variable names. No "the_cow_is_hungry_" instead I do: "theCowIsHungry". It's easier to type, and just as easy to read (personally, I think it looks "cooler" but don't even try to ask my to explain why I think that)
I'm no coding expert, but I think we need to base the standard around how Torque was built. Tim said Dynamix had standards, so I'm sure their "plan" for Torque and Realm Wars will be based around that since there's no need to reinvent the wheel.
On a tangent...
I don't know if I'd shut up when he'd talk. I have a tendancy not to really show respect "just because". Either I have to know the person and respect them, or their efforts have either impressed me or has helped me in some way.
Just because most everyone else respects them, I don't feel I have to. Sure, it might seem rude... but I think it's rather rude to expect people to bow down "just because". Isn't that something reserved for a monarchy?
#8
-Tim aka Spock
04/17/2002 (2:11 am)
My coding standard is a mixture between Microsoft's standard (Hungarian Notation) and java's standard if Im doing C/C++...otherwise its usually java.-Tim aka Spock
#9
His stuff is fairly useful; I have a book of his on the PSP which I like. However, I suggest people go with Weinberg or Pressman, I think they're more practical, and up-to-date.
04/17/2002 (7:03 am)
Oh right, *the* Watt S. Humphrey, not some guy named humphrey (egg on my face). Hard to believe that he is the author of that document. Still a poorly written document. Just take look at Matt's pet peeve about underscores - in that doc that is linked, those capitalized defines wouldn't compile in C/C++. He uses *minus signs* (reflecting his days as COBOL programmer ?).His stuff is fairly useful; I have a book of his on the PSP which I like. However, I suggest people go with Weinberg or Pressman, I think they're more practical, and up-to-date.
#10
The original document is part of chap 5 of his "A dicipline for software engineering"
04/17/2002 (7:20 am)
Maybe i should say again that is not his original document, as I was not suppose to re-post it publicly. It is an **example** of "defining your coding standard using the template supplied by W.Humphrey", or a "tailored" personal coding standard. The original document is part of chap 5 of his "A dicipline for software engineering"
#11
04/17/2002 (7:31 am)
ahh - gotcha. The template is Humphrey's, and the actual content isn't ... ?
#12
but the 'minus' define is a direct 'copy and paste' from his original document.
04/17/2002 (7:35 am)
exactly.. :Dbut the 'minus' define is a direct 'copy and paste' from his original document.
#13
- rjp
04/17/2002 (7:50 am)
I've come to believe that you won't please everybody. Not with anything ... not even coding standards. Just come up with a way that represents the data best, and use it :-). Don't worry about underscores, etc. Whatever is used, I think it should be standard!- rjp
Quote:everything I eat is from the earth, right?
I am what I eat, straight up earth, right?
nothing but a walking sack of earth, nice to meet you
how do you do, guess what, yeah you're one too
#14
It makes no sense if your/your team were have to follow someone else's standard. The template is just providing a framework for one to define his/her coding standard. Remove items that make no sense to you, add item you needed.
The important thing is you/your team should have defined standard (whichever way you define it, as long as it makes sense to you, and it's reinforcable). All your/your team's source code should follow the defined standard fully.
04/17/2002 (8:11 am)
exactly my point. It makes no sense if your/your team were have to follow someone else's standard. The template is just providing a framework for one to define his/her coding standard. Remove items that make no sense to you, add item you needed.
The important thing is you/your team should have defined standard (whichever way you define it, as long as it makes sense to you, and it's reinforcable). All your/your team's source code should follow the defined standard fully.
Torque Owner Yacine Salmi
Maybe we the code lead or the project maintainer (whoever will check code before committing it) should take a look at some large open source projects, like KDE or Gnome. I know that specifically for KDE, there is a very strict set of rules on commenting, variable naming style, and other stuff, which must be followed before your project is allowed to merge with the main KDE stuff.
This really needs to be etched out carefully, or it's gonna be hell to work on this code. I think proper documentation is very important.