id Software's amazingly clean code (Rant)

K.I.L.E.R

Retarded moron
Veteran
Sorry but I have never seen code that clean in my entire life.
Especially when it comes to C++ developers.

There is no weird crap/hacks in the code and it is very easy to follow unlike some devs who squash everything up into 1 little class with 2 or 3 methods/functions/processes/whatever you call them.

id didn't comment anything except under necessary circumstances but they don't need to. Everything is named so perfectly that you just know what's occuring by looking at the code.

I wish more developers coded like id Software's dev team.
I think that is one thing which seperates good coders from bad ones.
 
i always heard carmack was a sloppy programmer, unfounded rumors?



(edit ) the end justifies the means , not saying he's not good, but sloppy, like how hendrix played ..
 
Beafy said:
What code are you refering to?

Did I miss something? :?:

OMG, did I miss the SDK release?! :oops:

Nah. An SDK would make it much quicker to edit stuff though.

Any idea when it's coming?
 
K.I.L.E.R said:
Sorry but I have never seen code that clean in my entire life.
Especially when it comes to C++ developers.

There is no weird crap/hacks in the code and it is very easy to follow unlike some devs who squash everything up into 1 little class with 2 or 3 methods/functions/processes/whatever you call them.

id didn't comment anything except under necessary circumstances but they don't need to. Everything is named so perfectly that you just know what's occuring by looking at the code.

I've worked with a few developers who were into the whole "clean code" thing, and the view is that if your code is well written and uses sensible names, you don't need to comment what you are doing - the code itself should make it evident.

The only comments you should need are *why* you are doing things or what you are addressing - not the actual explanation of what the impenentrable code you've written actually does.
 
muted said:
i always heard carmack was a sloppy programmer, unfounded rumors?
He did say at the recent keynote speech at 'QuakeCon' that this was his first engine written entirely in C++ (rather than C). He did mention, though, that due to time constraints that he still ended up using structures rather than pure objects a lot of the time. He went on to say that he finds plain C better for 'hacking around' at ideas, though concedes that the OOP approach is better for building an extensible, modular engine.
 
Bouncing Zabaglione Bros. said:
K.I.L.E.R said:
Sorry but I have never seen code that clean in my entire life.
Especially when it comes to C++ developers.

There is no weird crap/hacks in the code and it is very easy to follow unlike some devs who squash everything up into 1 little class with 2 or 3 methods/functions/processes/whatever you call them.

id didn't comment anything except under necessary circumstances but they don't need to. Everything is named so perfectly that you just know what's occuring by looking at the code.

I've worked with a few developers who were into the whole "clean code" thing, and the view is that if your code is well written and uses sensible names, you don't need to comment what you are doing - the code itself should make it evident.

The only comments you should need are *why* you are doing things or what you are addressing - not the actual explanation of what the impenentrable code you've written actually does.


Yes the problem with code comments in general is they are more often of the form

Code:
 a = 3;     // Set a equal to 3

or after a few cut and pastes even less usefully of the form

Code:
 a = 7;     // Set a equal to 3

Where they should be explanations of why you are doing something.

Personally I'm a big advocate of good architecture, it's difficult to control line by line code quality when you have 20+ programmers on a project. But if you can have them work inside a clean framework, you can keep the overall codebase relatively clean.

Generally speaking IME all things being equal codequality is inversely proportional to the number of authors. The best codebases I've ever looked at have been written by 3 or less people who aren't under a hard deadline.[/code]
 
ERP, those are the comments that just bloat up the code.
I see people doing that often.

I only comment a part of code if it isn't straightforward and if I need the comment to remember what I was doing.
 
Bouncing Zabaglione Bros. said:
I've worked with a few developers who were into the whole "clean code" thing, and the view is that if your code is well written and uses sensible names, you don't need to comment what you are doing - the code itself should make it evident.

That's the way Microsoft has also taken.
 
The only Carmack engine that I've personally been told has been badly coded was the original Wolfenstein 3D's engine.

About 6 years ago, somebody I knew was messing with the source code and said it was just incredibly sloppy.
 
K.I.L.E.R said:
ERP, those are the comments that just bloat up the code.
I see people doing that often.

I only comment a part of code if it isn't straightforward and if I need the comment to remember what I was doing.
You'd be amazed at how useful comments like that are when writing assembly.
 
Back
Top