Live data from Hacker News

Why was Pinball removed from Windows Vista?

blogs.msdn.com

21–30 of 149 posts

Re: Why was Pinball removed from Windows Vista?

#21

This is an excellent example of why comments in code are so very useful, helpful and in my opinion, necessary. ... nobody at Microsoft ever understood how the code worked (much less still understood it), and that most of the code was completely uncommented, we simply couldn't figure out why the collision detector was not working. Heck, we couldn't even find the collision detector! To all those folks out there who kee…

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.

Re: Why was Pinball removed from Windows Vista?

#23
post #8

Earlier quoted context omitted.

It's an argument for clear code that's readily understandable by other people. It's not an argument for any particular technique for achieving that goal. I've never seen any programmer seriously suggest that code should be deliberately made difficult to understand.

Respectfully, commenting code and making it easily readable don't usually add to the bottom line. So while we all miss playing Pinball, it would be a waste of money to the shareholders. This game was another casualty of maximizing value towards shareholders and away from all other stakeholders.

I would suspect the programmer was lazy or rushed, and wasn't considering shareholder value.

Re: Why was Pinball removed from Windows Vista?

#24
post #8

This is an excellent example of why comments in code are so very useful, helpful and in my opinion, necessary. ... nobody at Microsoft ever understood how the code worked (much less still understood it), and that most of the code was completely uncommented, we simply couldn't figure out why the collision detector was not working. Heck, we couldn't even find the collision detector! To all those folks out there who kee…

It's an argument for clear code that's readily understandable by other people. It's not an argument for any particular technique for achieving that goal. I've never seen any programmer seriously suggest that code should be deliberately made difficult to understand.

I can't agree with you emphatically enough about this. Cargo cult commenting is one of the easiest ways to damage the readability of a codebase.

Comments should be an edge-case solution for explaining unusual quirks, not the go-to approach for explaining the entire codebase. Using comments to explain what the code is up to is like using exceptions for flow of control. A large proportion of the comments I see should actually be function or method names for a more well factored version of the block of code that follows.

Re: Why was Pinball removed from Windows Vista?

#25
post #8

Earlier quoted context omitted.

It's an argument for clear code that's readily understandable by other people. It's not an argument for any particular technique for achieving that goal. I've never seen any programmer seriously suggest that code should be deliberately made difficult to understand.

"I've never seen any programmer seriously suggest that code should be deliberately made difficult to understand." Then you've not worked with some of the people I've worked with. The clever "it was hard to write, it should be hard to read" mantra has been thrown out by a few ex-colleagues trying to be clever, and a couple of them really meant it. Whether it was a hatred for others, or a misguided attempt at "job secu…

One guy I worked with would do it to protect his bailiwick. He was intensely territorial, and knew that writing code so ugly that nobody wanted to even look at it, much less take the time to understand it, was an effective way to make sure that nobody else on the team would ever touch anything he wrote.

Re: Why was Pinball removed from Windows Vista?

#26

This is an excellent example of why comments in code are so very useful, helpful and in my opinion, necessary. ... nobody at Microsoft ever understood how the code worked (much less still understood it), and that most of the code was completely uncommented, we simply couldn't figure out why the collision detector was not working. Heck, we couldn't even find the collision detector! To all those folks out there who kee…

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 clas…

[deleted]

Re: Why was Pinball removed from Windows Vista?

#27

This is an excellent example of why comments in code are so very useful, helpful and in my opinion, necessary. ... nobody at Microsoft ever understood how the code worked (much less still understood it), and that most of the code was completely uncommented, we simply couldn't figure out why the collision detector was not working. Heck, we couldn't even find the collision detector! To all those folks out there who kee…

This is an excellent example of why comments and well documented code should be part of the licensing agreement.

Re: Why was Pinball removed from Windows Vista?

#29
post #28

argh > The source code was licensed from another company. If you want the source code, you have to go ask them. Twice this mystery company is referenced, but never a name is mentioned.

Google to the rescue!

http://en.wikipedia.org/wiki/Full_Tilt!_Pinball

Re: Why was Pinball removed from Windows Vista?

#30

This is an excellent example of why comments in code are so very useful, helpful and in my opinion, necessary. ... nobody at Microsoft ever understood how the code worked (much less still understood it), and that most of the code was completely uncommented, we simply couldn't figure out why the collision detector was not working. Heck, we couldn't even find the collision detector! To all those folks out there who kee…

If they weren't able to find the collision detector, I seriously doubt the comments would've been of a usable quality.
Post reply on HN