Doom 3 Source code review
>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 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.