Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are some readability problems that stem from a lack of comments, and there are other readability problems that stem from exceedingly poorly-written code.

Heck, we couldn't even find the collision detector!

This sentence tells me that the big problem here comes from the latter, much worse, source of of readability problems. The fact that they couldn't find the collision detector implies that the code had no class named CollisionDetector, no procedure named DetectCollisions, nothing of the sort. Which implies (if not conclusively) that there was a whole lot spaghetti code floating around in there. Or at least a whole lot of very poorly-factored code.

I do think that comments are an important part of making code readable and maintainable. But comments are there to handle less drastic readability concerns. Documenting what units a parameter should be in, for example, or saying, "The following code implements X algorithm with Y and Z optimizations applied." Comments should never just be a substitute for using language-level code organizational and structuring constructs to organize and structure one's code.



The fact that they couldn't find the collision detector implies that the code had no class named CollisionDetector

The fact that it was written in assembly and then C makes a stronger implication that they had no class named CollisionDetector.


To me that fragment says that the story is a bit more colourful than what really happened. This quote comes from Raymond Chen. The guy who includes ISA bus, interrupts and starting up a debugger in one post (http://blogs.msdn.com/b/oldnewthing/archive/2007/01/30/15574...); or analysing chip issues and software workarounds for them (http://blogs.msdn.com/b/oldnewthing/archive/2011/01/12/10114...).

Maybe the code was really messy and hard to work with... but it's hard to believe that he couldn't find the collision detector ;)


A programmer from the original game commented on the article and said much of it was done in asm then later ported to C by msft, so it probably was really that messy.


This smells like automatically generated procedure names based on dataflow analysis.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: