Linked by Thom Holwerda on Fri 15th Feb 2013 10:40 UTC
General Development "Since I left my job at Amazon I have spent a lot of time reading great source code. Having exhausted the insanely good idSoftware pool, the next thing to read was one of the greatest game of all time: Duke Nukem 3D and the engine powering it named 'Build'. It turned out to be a difficult experience: The engine delivered great value and ranked high in terms of speed, stability and memory consumption but my enthousiasm met a source code controversial in terms of organization, best practices and comments/documentation. This reading session taught me a lot about code legacy and what helps a software live long." Hail to the king, baby.
Thread beginning with comment 552610
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE: Code Review
by Laurence on Fri 15th Feb 2013 13:57 UTC in reply to "Code Review"
Laurence
Member since:
2007-03-26

I have a love/hate relationship with articles like these.

On the one hand it's great to promote readable code, but sometimes I think people get too hung up on what they deem as perfect syntax and can sometimes miss the point of those clever optimisations.

It's a bit like grammar Nazi's who love to correct peoples comments but rarely read deep enough into those posts digest the content being explained.

So I guess what I'm trying to say is that it's good to be reminded about preferred programming practices, just as long as we don't forget the other criteria (usability, performance (if applicable), deadlines)

Edited 2013-02-15 13:59 UTC

Reply Parent Score: 11

RE[2]: Code Review
by moondevil on Fri 15th Feb 2013 13:59 in reply to "RE: Code Review"
moondevil Member since:
2005-07-08

After a few sessions of off-shore code review, one really stops caring about code quality as long as what was requested works.

Reply Parent Score: 3

RE[3]: Code Review
by Bill Shooter of Bul on Fri 15th Feb 2013 14:55 in reply to "RE[2]: Code Review"
Bill Shooter of Bul Member since:
2006-07-14

Really? Well,I guess I've never read outsourced code that did what was required...

When companies I've worked for have out sourced work, we just expect to spend a certain amount of time cleaning it up/ rewriting sections.

Reply Parent Score: 3

RE[3]: Code Review
by Alfman on Fri 15th Feb 2013 14:56 in reply to "RE[2]: Code Review"
Alfman Member since:
2011-01-28

moondevil,

"After a few sessions of off-shore code review, one really stops caring about code quality as long as what was requested works."

With all due respect, -10 ;)
I've dealt with too much bad code to write it off as ok as long as it works...

Obligatory link to the obfuscated c contests:
http://ioccc.org/years.html

Incidentally, I wish these contests would focus more on algorithmic obfuscation rather than source code obfuscation. I am not impressed with code that's unreadable because of shortened variable names and whitespace elimination. The best obfuscated code is code which is still incomprehensible even though it uses proper whitespace conventions and comments ;)

Reply Parent Score: 5

RE[2]: Code Review
by bowkota on Fri 15th Feb 2013 17:12 in reply to "RE: Code Review"
bowkota Member since:
2011-10-12

I have a love/hate relationship with articles like these.

On the one hand it's great to promote readable code, but sometimes I think people get too hung up on what they deem as perfect syntax and can sometimes miss the point of those clever optimisations.

It's a bit like grammar Nazi's who love to correct peoples comments but rarely read deep enough into those posts digest the content being explained.

So I guess what I'm trying to say is that it's good to be reminded about preferred programming practices, just as long as we don't forget the other criteria (usability, performance (if applicable), deadlines)


Well said but you have to remember that your first point about readable code has a direct relationship with usability and performance, which you mention at the end. I'm not a programmer but as a scientist I use other people's code for my work and the readability of their code has a great effect on the usability and performance of my work.
This might apply more often to science than game development but I still think it's a relevant point.

Similarly, a well structured post with good grammar and punctuation makes it much more coherent and thus easier to convey your thoughts.

Reply Parent Score: 3

RE[3]: Code Review
by Laurence on Fri 15th Feb 2013 17:35 in reply to "RE[2]: Code Review"
Laurence Member since:
2007-03-26

You're using performance and usability in a difference context to what I meant (I was talking in terms of the end result from a compiled binary). However you do raise a valid point I hadn't considered.

Reply Parent Score: 2

RE[2]: Code Review
by phoenix on Fri 15th Feb 2013 17:40 in reply to "RE: Code Review"
phoenix Member since:
2005-07-11

It's a bit like grammar Nazi's who love to correct peoples comments but rarely read deep enough into those posts digest the content being explained.


Since you brought it up, it should be "Nazis" and "people's" and you missed a "to" in "those posts digest". ;)

Reply Parent Score: 6

RE[2]: Code Review
by bassbeast on Sat 16th Feb 2013 00:52 in reply to "RE: Code Review"
bassbeast Member since:
2007-11-11

To me the measure of whether code is "good" or "bad" is really VERY simple: Does it do the job as intended? Does it waste resources or use them well? is it stable?

And I would have to say no matter how "pretty" the code is Ken Silverman's Build engine, which not only powered Duke but 2 of my fav games of all time, Redneck rampage (who couldn't love a game where you shoot a titty gun and fling dynamite while drinking beer and eating moonpies while listening to Mojo Nixon?) and BLOOD, which riffs all the cheesy horror tropes of the 80s (you even start in the Phantasm funeral home) while giving in both insanely huge levels with tons of secrets

I'm sure everybody has seen that diagram showing the diff between today's shooters and the games then, how then it was huge expanses filled with secrets while today you are led by the nose from one set piece to the next in a straight line? Well anybody who likes the former should BUY NOW Redneck, duke 3D and Blood, they can be had from GOG quite cheaply and just for joining you can get something like 6 games for free just as a thank you for trying them out which includes warsow and Ultima 4.

These games are still a blast, I still fire up all 3 and have a blast, and since its GOG and DOSBox you can run it on Linux and Mac and anyplace else DOSBox will run so go and get 'em and have a ball!

Reply Parent Score: 2

RE[3]: Code Review
by zima on Fri 22nd Feb 2013 19:16 in reply to "RE[2]: Code Review"
zima Member since:
2005-07-06

I'm sure everybody has seen that diagram showing the diff between today's shooters and the games then, how then it was huge expanses filled with secrets while today you are led by the nose from one set piece to the next in a straight line?

I think reasons for that are varied... might be also technical, the old-style engine necessitating more "compacted" (more ~square) maps. Or it reflects what players mostly want, just to kill monsters and bad guys; also more varied scenery (instead of going back and forth on one map all the time - more quickly boring scenery in a way).

But I remember reviews from 2 decades ago - mostly filled with walkthroughs, and... lists of secrets (even worse with adventure game walkhroughs). That wasn't the best way to game.

Overall it's what... we wanted back then, the general public acceptance of our games, for them to have mainstream appeal. And/or you're getting old - old times are always better ;)

GOG [...] just for joining you can get something like 6 games for free just as a thank you for trying them out which includes warsow and Ultima 4.

Warsow was always a free game BTW.

Reply Parent Score: 2

RE[2]: Code Review
by ebasconp on Sun 17th Feb 2013 01:16 in reply to "RE: Code Review"
ebasconp Member since:
2006-05-09

When looking at code of running software, it is generally "ugly"; but at difference of the beautiful code, it showed it works and scales.

We always forget the fact that we are reviewing code that has been several times modified by several people in order to add new functionality, fix some issues, work in other scenarios or improve the performance.

Reply Parent Score: 2

RE[2]: Code Review
by azrael29a on Mon 18th Feb 2013 18:47 in reply to "RE: Code Review"
azrael29a Member since:
2008-02-26

It's a bit like grammar Nazi's who love to correct peoples comments but rarely read deep enough into those posts digest the content being explained.

"Grammar Nazis"! (no apostrophe needed here)


Regards,
Grammar Nazi ;)
(you didn't see this coming, did you?)

Reply Parent Score: 2

RE[2]: Code Review
by f0dder on Mon 18th Feb 2013 22:27 in reply to "RE: Code Review"
f0dder Member since:
2009-08-05

grammar Nazi's

*twitch*. You did that one purpose, didn't you?

Reply Parent Score: 2