Live data from Hacker News

Why was Pinball removed from Windows Vista?

blogs.msdn.com

51–60 of 149 posts

Re: Why was Pinball removed from Windows Vista?

#51
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.

What other technique do you have at your disposal in a code originally written in assembly and then translated to C, and then refactored several times without rewrite?

I personally didn't hear of one that would be usable in this case.

Also, I'm starting to think I should write a script to cut out every comment here that has "code" and "comments" in it - among with several other phrases that signify neverending debates.

Re: Why was Pinball removed from Windows Vista?

#52
post #24

Earlier quoted context omitted.

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

I agree that comments should not be the "go-to approach for explaining the entire codebase." I hope you didn't think I was insinuating that in my comment. I was only trying to illustrate that in the absence of clear code, which many developers are guilty of sometimes, comments can be very helpful.

Nah I didn't think that at all, it was clear from the way you said "minimal commenting". I just have an axe to grind when it comes to comments of the form

    // assign the integer value 10 to the variable x
    x = 10

Re: Why was Pinball removed from Windows Vista?

#53
post #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 charact…

What are the consequences of your preferred approach for legacy code? While there are certainly disadvantages of duplicating APIs in terms of cruft, I think that many customers appreciate that old code continues to run (and compile) against newer versions of the OS.

Re: Why was Pinball removed from Windows Vista?

#55
post #24

Earlier quoted context omitted.

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

I agree that comments should not be the "go-to approach for explaining the entire codebase." I hope you didn't think I was insinuating that in my comment. I was only trying to illustrate that in the absence of clear code, which many developers are guilty of sometimes, comments can be very helpful.

Sadly, I fear that comments won't help in that situation. They could, except that the solution depends critically on the developer realizing they're writing garbled code during the time they're writing it. I don't know about anyone else, but my code's never garbled when I write it. It only becomes garbled by magic, and only when I don't look at it for a few weeks. Or, strangely enough, the moment someone else looks at it.

Still haven't figured out a reliable enough garble detection mechanism that my employer's willing to pay for.

Re: Why was Pinball removed from Windows Vista?

#56
post #52

Earlier quoted context omitted.

I agree that comments should not be the "go-to approach for explaining the entire codebase." I hope you didn't think I was insinuating that in my comment. I was only trying to illustrate that in the absence of clear code, which many developers are guilty of sometimes, comments can be very helpful.

Nah I didn't think that at all, it was clear from the way you said "minimal commenting". I just have an axe to grind when it comes to comments of the form // assign the integer value 10 to the variable x x = 10

What's really annoying is that most of the time you see this kind of comment there is no explanation why 10 was chosen.

Re: Why was Pinball removed from Windows Vista?

#57

The best part of this article is in the comments. An original programmer on the game explains the reason that the bug was occurring and also why the code was unreadable (hint: they did it in assembly) Ah, the quantum tunneling pinball! We ran into this while writing the original code at Cinematronics in 1994. Since the ball motion, physics, and coordinates were all in floating point, and the ball is constantly being…

I'm so happy you posted that - otherwise I would not read down more than a couple first comments and would miss this!

Re: Why was Pinball removed from Windows Vista?

#58
post #24
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 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 a…

"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."

I share the same experience.

Re: Why was Pinball removed from Windows Vista?

#59
post #23

Earlier quoted context omitted.

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.

Rushed is really the same thing, even if the words "shareholder value" weren't in their minds at the time.

Re: Why was Pinball removed from Windows Vista?

#60
post #49
post #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 charact…

MS implemented NT, which only worked in Unicode. They had to add a compatibility layer to run Ansi apps. Which is MS's separate OS for 64-bit? OS APIs are distinct from kernel APIs. You're comparing a kernel (Linux) with a distribution (Windows).

Which is MS's separate OS for 64-bit?

I believe you'll find it to be Windows 64-bit Edition.

A quick googling suggests that Windows 7 retail copies have both 32-bit and 64-bit editions, but I'm guessing you still have to pick the right edition when you go to install it. And if you don't have a retail disc, then you probably only got one of the two architectures.

Compare this with Mac OS X, where there is no "32-bit edition" or "64-bit edition", there is just "Mac OS X". Everybody installs the same OS, and it transparently works for both 32-bit and 64-bit machines. The only time when you really have to care is if you're installing a 3rd-party kext (kernel extension), as 32-bit kexts won't work on a 64-bit kernel, but that's pretty rare and any kext that's still being maintained today will support both architectures.

Post reply on HN