Doom 3 Source code review
fabiensanglard.net
Doom 3 Source code review
1–10 of 64 posts
Re: Doom 3 Source code review
#2Re: Doom 3 Source code review
#3Seriously ? There may be reasons to think Visual Studio is an inferior product, these are not among them.
Re: Doom 3 Source code review
#4> the variables highlights and the "Command-Click" to reach a definition make the experience superior to Visual Studio. Seriously ? There may be reasons to think Visual Studio is an inferior product, these are not among them.
Re: Doom 3 Source code review
#5>Dmap source code is very well commented, just look at the amount of green: There is more comments than code !
You know, in my experience that's not a good thing. I work on similar, heavily-commented code and find it extremely painful. At some point it becomes a burden to see the code behind the comments. (And just so no one misinterprets me: I am not against comments /per se/.)
It's like when you read code written by someone who simply loved whitespace and who appended a useless "banner comment" after each real comment[1]:
// If x is less than 3, do stuff 50 times.
// -----------------------------
if ( x {
// While i goes from 0 to 50.
// --------------------------
for ( int i = 0; i {
// Do stuff.
// ---------------
doStuff ( ) ;
}
}
So what would've fitted in one screen of text, if written in a sensible fashion, now requires one and a half screen and lots of scrolling.
[1] The comments in the example are actually both crappy and pointless. Sadly, the program I work on is riddled with them. Please don't write out what the programming language constructs do in English.
Re: Doom 3 Source code review
#6Re: Doom 3 Source code review
#7>In some part of the code (see dmap page) there are actually more comments than statements. >Dmap source code is very well commented, just look at the amount of green: There is more comments than code ! You know, in my experience that's not a good thing. I work on similar, heavily-commented code and find it extremely painful. At some point it becomes a burden to see the code behind the comments. (And just so no one m…
Re: Doom 3 Source code review
#8> the variables highlights and the "Command-Click" to reach a definition make the experience superior to Visual Studio. Seriously ? There may be reasons to think Visual Studio is an inferior product, these are not among them.
Also, XCode has a nice feature where you can switch between .h and .c files with CMD+Up. This is missing from VS, but you can add a macro and map it to a key, for me it's ALT+O. See here:
http://www.codeproject.com/Articles/2223/Switch-between-Head...
Re: Doom 3 Source code review
#9>In some part of the code (see dmap page) there are actually more comments than statements. >Dmap source code is very well commented, just look at the amount of green: There is more comments than code ! You know, in my experience that's not a good thing. I work on similar, heavily-commented code and find it extremely painful. At some point it becomes a burden to see the code behind the comments. (And just so no one m…
Then use an editor/IDE that can automatically hide or fold the comments?
Re: Doom 3 Source code review
#10>In some part of the code (see dmap page) there are actually more comments than statements. >Dmap source code is very well commented, just look at the amount of green: There is more comments than code ! You know, in my experience that's not a good thing. I work on similar, heavily-commented code and find it extremely painful. At some point it becomes a burden to see the code behind the comments. (And just so no one m…
At least in that case you can attribute it to well-intentioned stupidity. Here's my favourite short example you must instead attribute to malice: [1] a closed-form implementation of fibs(n). Follow along with the comments! 1. https://gist.github.com/eb02e9546102594e8bf7