Live data from Hacker News

Why was Pinball removed from Windows Vista?

blogs.msdn.com

31–40 of 149 posts

Re: Why was Pinball removed from Windows Vista?

#31
post #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.

//Collision detector logic starts here

^That might have helped a little.

Re: Why was Pinball removed from Windows Vista?

#32

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…

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 ;)

Re: Why was Pinball removed from Windows Vista?

#33

Wait, can't 64-bit windows run 32-bit programs?

Yup. All you've got to do is copy it over from a Windows XP machine, if you have one laying around.

Aside from the explanation others have quoted, I'm guessing some of it was also an aesthetic decision. They could probably still go and bring it back using WOW64, but it still looks like a Win95-era program, whereas all the other games have been replaced with better-looking rewrites. That and I think it only supports a resolution of 640x480.

Re: Why was Pinball removed from Windows Vista?

#34

Too bad it wasn't open source, then someone would have fixed it for free.

Someone asked that in the comments, and he responded that it was licensed from a 3rd party company.

Take the argument a step further: Microsoft "should" have required the 3rd party to provide the code under an open-source license.

Re: Why was Pinball removed from Windows Vista?

#35
post #30

Earlier quoted context omitted.

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

//Collision detector logic starts here ^That might have helped a little.

You don't understand. The kind of person who writes an undetectable collision detector will never write a comment like this. He might write some other comment, but it will be as obscure as his code.

Re: Why was Pinball removed from Windows Vista?

#37
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 haven't heard the argument about making code deliberately hard to understand either.

I agree that clearer code and/or commenting would have been suitable.

I only latched on to the example because they specifically mentioned that the code wasn't commented. In this case, a few lines of comments might have helped them find what they were looking for. Even if they original programmer was one of those people who just can't stop writing code like:

  $a = ($b)?($ab):$c;
  d($a);
Maybe some amount of convincing could lead them to leave a comment every once in a while so we can at least get:

  // Detect collision
  $a = ($b)?($ab):$c;
  d($a);
Since it seems like both clear code and comments were absent, either one would have been helpful.

Re: Why was Pinball removed from Windows Vista?

#38
To me, the lesson is: Do not duplicate code! and keep it simple stupid

When implementing Unicode, MS said "hey let's copy all of our API functions to new names". Now they have two problems.

When implementing 64-bit, MS said "hey let's have a completely different OS for 64-bit." Now they have four problems.

Compare this to Unix/Linux/MacOS where Unicode is just implemented as a standard way (UTF-8) of encoding characters into the existing API. And there need only be one shipping OS which supports both 32-bit and 64-bit process types equally since there are only a handful of kernel APIs compared to thousands for Windows.

Re: Why was Pinball removed from Windows Vista?

#39
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 haven't heard the argument about making code deliberately hard to understand either. I agree that clearer code and/or commenting would have been suitable. I only latched on to the example because they specifically mentioned that the code wasn't commented. In this case, a few lines of comments might have helped them find what they were looking for. Even if they original programmer was one of those people who just ca…

I don't think comments are any kind of substitute for clear, well-structured code. In your example, "Detect collision" still doesn't give me any kind of epiphany about the code. At best, it gives me a slight hint about where to go to get more information. Chances are I'm trying to fix a bug or change the behavior, so I still need to figure what $a, $b, $ab, $c, and d are and what their purpose is.

In other words, I have nothing against good comments, especially on obscure code, but I think they're only marginally useful even in those cases.

Re: Why was Pinball removed from Windows Vista?

#40
post #39

Earlier quoted context omitted.

I haven't heard the argument about making code deliberately hard to understand either. I agree that clearer code and/or commenting would have been suitable. I only latched on to the example because they specifically mentioned that the code wasn't commented. In this case, a few lines of comments might have helped them find what they were looking for. Even if they original programmer was one of those people who just ca…

I don't think comments are any kind of substitute for clear, well-structured code. In your example, "Detect collision" still doesn't give me any kind of epiphany about the code. At best, it gives me a slight hint about where to go to get more information. Chances are I'm trying to fix a bug or change the behavior, so I still need to figure what $a, $b, $ab, $c, and d are and what their purpose is. In other words, I h…

Definitely. I wasn't trying to say that they were a substitute. I specifically said both could have worked. In the example they cited, they couldn't even find where to begin. A small comment could have done something about it.

When you can't have both clear code and commenting, you could at least try to do one every once in a while. How can that be a bad thing?

Post reply on HN