|
|
#1 |
|
Member
Join Date: Apr 2002
Location: Brisbane Australia
Posts: 74
![]() |
While browsing through some old code at work (not MUD code, but relevant none the less) I came accross an attrocious cpp file, the various authors had come from different coding backgrounds (4 of them, an engineer used to fortran, a java programmer, a C prima donna - not an attack at C users just this guy, and an amateur VB *shudder* user). 2 of them used a consistent style (alas, only within their own code, and not with each other) and the others were inconsistent even within their own functions *boggle*. As you can imagine this makes for very hard to maintain code. Since then the company has begun to enforce a style, and once you are used to it, it seems logical and easy to follow. Now I look at the CircleMUD code, and I can see the same thing, inconsistant styles, and hard to follow code in places.
I was wondering how many other coders follow some sort of standard (obviously not just your own personal one) and if anyone out there (in the appropriate position) enforces a standard on their coders. When I write code, I aim to leave it maintainable by someone with no previous experience with that code (note THAT CODE! not no experience coding), do others try to do this too, or is "get it working" good enough? |
|
|
|
|
|
#2 | ||
|
Member
|
Quote:
Quote:
However, I think that if you want to leave your program in a state suitable for a maintenance programmer to come along and understand it, you need documentation. Without it, it's only the maintainer's best guess as to the explicit semantics of your work. Kas. |
||
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2003
Posts: 23
![]() |
Obviously there are no 'title standards' ("codong"...heh)
On Zeb, we having a review system, where every new area or other project is marked by other coders under various categories - balance, bugs, and coding. Coding requires code review, which usually involves randomly looking at some rooms and objects, making sure to look at anything complex. Code review involves 1) making sure code is readable, indented properly, commented where anything complex is going on 2) making sure standard mudlib objects are used where appropriate A reviewer gives the project a pass in each area. When the project has enough passes under all areas, it goes online. It means it takes longer to get areas up, and sometimes there is a backlog of reviews to do (I am guilty at the moment of having 7 areas to review! And most importantly, coders buy into this system - i don't get any huge complaints about having to follow it. |
|
|
|
|
|
#4 |
|
New Member
|
Hello,
Even though now I am not into muds I do look back on the forums see if anything interesting shows up. What I do, is set up a coding standard for every project I am starting and include it in my project as a text file. It goes from how many spaces indentation should be, to naming functions, variables. It is quite successful as if there is somebody new to the project they just read that file and all of a sudden the code can be a lot more readable even though the standards set for every project are pretty straight forward and easy to read and comprehend. At least in my opinion It is extremely important to set standards for every project, it makes your code reusable and your project looks consistent. - Lodes |
|
|
|
|
|
#5 |
|
Member
Join Date: Apr 2002
Location: Brisbane Australia
Posts: 74
![]() |
Yes I do have to apologise for the codong thing, and IF I can find a way to fix it I will.
I find the review idea interesting Tamsyn, and I think used in combination with a document setting out the standards as mentioned by Lodes should end up with consistent and maintainable code. We already have a basic review system in place but a more indepth one would be better. I originaly proposed the Java/Sun or GNU coding standards, but it seemed people did not actually read them (boring I know, but...) let alone follow them. Has anyone else run up against a prima donna coder (or indeed in general) before, are they as irritating for others as for me? |
|
|
|
|
|
#6 |
|
Member
|
Dealt with them, am one, yeah. We're all pains in the ass, but occasionally (and happily) some of us end up creating legible, maintainable code that can be used without too much screaming and cussing.
If you're looking for a more structured way of developing your code, the above comments are ones I'd never thought of before, and I have to say they're pretty good ideas. I'm more of a free-form chaotic coder, and most of the people I've worked with like it as fragmented and crazy as possible; probaby why we work together. But yeah, prima donna programmers in general are a serious pain in the ass. On the other hand, occasionally they have the skills to back up the attitude, and with those you can usually find a happy middle ground; if they're smart enough to be useful, they might just be smart enough to be rational as well. -Visko |
|
|
|
|
|
#7 |
|
Member
Join Date: Mar 2003
Posts: 70
![]() |
Yeeh Tamsyn, what are you doing on here? Go review my area damnit! That Elder Wyrm aint gonna eat any legends when he is sat in the review system!
Work doesn't enforce coding standards, although it tries too. Every year we get a new 'lets follow the new new revised proper coding standards' speech and then everyone carries on as per normal. Zebedee has basic coding standards - but its just on the 'indent your code, use sensibly variable names' level rather than a full style guide. |
|
|
|
![]() |
| Thread Tools | |
Codong Standards - Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Personal Standards as a Builder | Miyamoto | MUD Builders and Areas | 16 | 06-29-2002 05:43 PM |
|
|