“Windows XP was the last client version of Windows to include the Pinball game that had been part of Windows since Windows 95. There is apparently speculation that this was done for legal reasons. No, that’s not why.” I love these stories.
“Windows XP was the last client version of Windows to include the Pinball game that had been part of Windows since Windows 95. There is apparently speculation that this was done for legal reasons. No, that’s not why.” I love these stories.
Ha! A good developer knows how to read code. But a good and well placed comment is better than a 1000 page manual.
And it can bring good games to your new OS too!!!
I good developer knows how to write readable code (and still keep it efficient).
Sadly not all developers can be bothered to do so and if they’ve used nondescript variable / functions names as well as weird developer logic, then the code might as well have been deliberately obfuscated.
I’ve worked on plenty of projects where debugging other peoples code worked out just as time consuming than if I had rewritten the code from scratch. Albeit we’re talking smallish projects in those instances.
I love finding humour comments in other peoples code (comments I’d forgotten about in my own code).
I remember once stumbling across the following within one of Oracle’s own APIs for Java / Oracle RMDBS Forms: “This is a terrible kludge”. It pretty much summed up the entire product in one line hehe
Edited 2012-12-19 00:24 UTC
I once had to maintain an old VB6 app, which had features such as a Sub that traversed 12 pages! If that wasn’t enough the original dev used the same handful of (badly named) variables all the way through this epic subroutine for different purposes!
But back to the comment thing; this same dev would insist on adding a comment every third or fourth line, for no reason at all that I could fathom. Highlights included things like:
and my personal favourite:
He would also always (and I mean always) end every Function and Sub with:
When I find him, there will be blood.
My theory is that any “developer” who has unexplainable coding ticks must have suffered some kind of traumatic learning experience. These are people who develop rituals to ward off evil, not people who write code to solve problems.
Don’t get me started in the quality of off-shore code.
One of my daily tasks in many projects is to improve said code to the quality expected by our customers.
So when the off-shore development time + mine adds up, it actually more expensive than having people doing on site to start with.
It’s like no one here knows what a REAL programmer is like… REAL programmers don’t comment. If it was hard to write, it should be harder to read, and impossible to change.
Just remember, script kiddies, REAL programmers don’t eat quiche!
Good thing I’m learning emacs. I expect to master C-x M-c M-buttefly soon.
Nothing beats copy con
Nope, debug beats it hands down:
C:\>debug
-a
17E9:0100
From personal experience, even good devs who have a pretty good idea of what good code looks like can write pretty unreadable code if they are…
1/Coding under strong time constraints, a burst of inspiration, or something else that puts their minds’ focus elsewhere.
2/Not able to notice the mess left around until they try to read through it again after a few months without touching it.
The human brain’s content indexing abilities are truly a thing of magic, but they become a hindrance when you try to distinguish what’s clean from what isn’t.
These clever snippets become much less funny when you try to figure out what the code actually does, though
Edited 2012-12-19 08:09 UTC
3/Trying to manually obfuscate their own code so as to ensure continued requirement for their expensive services.
Or to put it another way – if you understand how it works and you need to maintain it, that is all that matters to many coders. It’s only when new eyes hit the code that cracks will appear. As someone who has worked on a large body of awful code for the last 5 years (inherited from offshore contract programmers) I can attest to this.
The guys I inherited the code from loved to attest inane changes to themselves. I know them all like dear “friends” and when I see specific names I gently weep and comment out the method and start again from scratch.
Some good points but I don’t entirely agree with point 2 on a personal level.
I tend to rewrite code as I code it (usually because I’m mentally debugging it as I’m programming so find cleaner / more optimal designs as I’m writing it). So the mess generally does get noticed (baring when I’m under time constraints, as you mentioned in point 1.
That’s purely my method of programming though. I’m by no means saying it’s better or worse, nor that you were right or wrong with your view
Thankfully that example did go on to explain the routine and the reason the for kludge. I just cropped that out of my post as it didn’t wouldn’t mean much to anyone who wasn’t involved in that project.
I tend to be opposite in these cases. If I’m under time constraints, I’ll write cleaner code, or rather, code with a standard design that translates into idiomatic code. If I get time, I experiment with different designs and end up with clever code.
Well I know I have written stuff that I was ashamed of just to meet a dead line.
I don’t have to look at this link – Raymond Chen. You realise who he is? I think that if he couldn’t work it out, it was pretty convoluted and badly written code. Personally, I’d rate his opinion over yours about 1000 fold.
An from reading the article comments, the code was originally written in Pentium-optimized assembly (oh, the days of U/V pipe dreams), and later backported to C (probably with any comments removed?) Good luck trying to maintain that
I also wanna know why they removed the Vista Calendar and startup manager from Windows 7
is one of my favorite blogs. Its literally filled with little gems like this.
…wasn’t an enemy of Free software.
If they had open sourced the game, it would have been fixed up almost instantly and saved, instead of binned.
It may even have been improved!
Of course, proving the open source model can work well is not something I’m sure Microsoft executives would be keen on.
Read the article – Microsoft doesn’t own Pinball and cannot release the source code. So begin with “If only Microsoft… would own the code”.
Less Linux zealotry, more facts.
Where was Linux mentioned in the comment?
Let’s be real – open source fans that bash Microsoft are 99% of Linux free soul open minders, not WordPress.
Just read Ubuntu forums. “omg so glads i no longer suport war in iraq by buing M $ crappy rotten softwar”. Never found those statements on other open source project forums.
Edited 2012-12-19 05:22 UTC
Let’s be real, so you make things up?
99%?
“Linux free soul open minders, not WordPress”? What does that even mean?
Let’s say all Ubuntu users are crazy. I’m pretty sure Ubuntu does not count for 99% of Linux users.
That quote also sounds made up.
Well you obviously have never been to Ubuntu forums KiwiNZ would certainly not let a thread or even a comment like that pass. In fact one of my issues with Ubuntu forums is that it is too often gushingly pro proprietary software.
I have the feeling that there’s more Open-Source/Free-Software-Phobia from some Windows users than there is Free-Software-Zealotry; in other words, I see more free-software-bashing than vice versa.
And interestingly (my own real life experience), those participating in free-software-hate are also often those ignoring and being ignorant on open-source licenses and their terms, but still grabbing such code (“got that from google”), no matter what.
Why does every article that mentions Microsoft or Windows has some guy droning on about how Microsoft is evil then?
It’s the nature of the beast. We’re all conditioned to take sides, and it takes effort combined with experience to fight that conditioning.
There was a time, when I was in high school and Windows didn’t have a Start button, that I openly derided anything not from Microsoft because that was the culture I was brought up in. Our school had a couple of ancient Apple IIs in the special education lab, and one lonely Mac Classic that belonged to a teacher, but the majority of the school computers were DOS/Windows machines. We were force-fed DOS and Windows as the only solution.
After high school, I wasn’t able to enroll in college right away due to health issues so I took some correspondence courses instead, and that was the first time I’d heard of the new kid on the block, Linux. Fast forward to today and I feel that all major OSes, and quite a few minor ones, have merit and a place on my hardware. Of course, BeOS and Haiku are at the top of my list, but I happily use Windows, OS X and GNU/Linux daily as well.
Of course, no two people have the same experience, so opinions differ and people do tend to become entrenched in a particular platform. I feel the regulars here are much more open minded than at other website communities and forums, but you’ll always have a few zealots.
“feelings” have this nasty tendency of being wrong, which is why we came up with science…
Edited 2012-12-20 01:40 UTC
Oh, but
is just feelings, too; the difference is I admit that those are just feelings (instead of imposing logic where there is none), and strictly speaking, I have the feeling that near to no post in any forum is scienceful and precise.
But generally, I agree.
Edited 2012-12-21 16:26 UTC
The above comment is everything that’s wrong with Open Source zealotry. Holy fuck.
I think you made me invent a new way to scratch my head in disbelief.
Hurry up, you better go patent that.
First time one of your comments makes me laugh because its funny and not sad
I still wonder why it just wasn’t built in 32-bit mode? We play 32-bit mode games all the time. Why not this one?
At least there’s still Visual Pinball and VPinMAME which are far better and more fun.
64-bit Windows is not compatible with every application that runs fine on the 32-bit version, as an example every soft that relies on legacy 16-bit processor modes is out of luck since AMD did some cruft slashing when they designed the AMD64 standard.
Considering that the Windows pinball used to date back from the Win9x era where hacking into the underlying DOS system was the norm in complex software like games, making it run on 64-bit windows was likely more complex than just switching the processor in 32-bit mode and hooking it into 64-bit libraries through wrapper and segmentation magic.
Edited 2012-12-19 06:08 UTC
I’ve just extracted PINBALL from a XP32-SP2 and ran it on my Win7-X64, and it seems to work just fine (reading from the OldNewThing comments you’re not probably not allowed to do that, but whatever).
– http://blogs.msdn.com/b/oldnewthing/archive/2012/12/18/10378851.asp…
I suspect the game was perfectly well commented by the owner but were stripped out due to small license payment, why would MS need to understand code if they were barely paying for it after all it worked on the current hardware.
It was written in asm, maybe it was actually written in C but MS only was given the asm listing.
From the comments in the blog
The asm code was highly tuned to the FPU pipeline, paired ops and all.
As the x86 evolved with ever new FPU opcodes and then AMD64, the FPU bugs became too difficult to figure out.
Payment for the license was only a few thousand $
MSFT actually hoped that devs would pay them to add their games to the Win95 Plus pack for the exposure, didn’t fly so most devs didn’t join the Plus pack.
There are various comments about the game using detection algorithms that were very sensitive to FPU round off errors eventually causing it to pass through solids.
If you read the secondary link, Raymond actually fixed it to work nicely on the NT WIN32 strand. It otherwise consumed 100% of the processor and had a ~1000FPS refresh rate!
My guess is that a pinball game wasn’t an especially hight priority.
Unlike the refresh rate!
Sigh, and people still look at me as if I was a madman when I say that floating point suck and that we should use interval arithmetic..
http://en.wikipedia.org/wiki/Interval_arithmetic
renox,
“Sigh, and people still look at me as if I was a madman when I say that floating point suck and that we should use interval arithmetic..”
Very insightful. Beyond rounding issues, it’s always bugged me a bit too that the resolution of game coordinates become worse and worse the further a player gets away from the origin. Therefor if your running precise mathematical computations in a game (ie object projections), the results inherently depend on which arbitrary digits the mantissa is representing. Using integral/fixed point arithmetic would offer equal precision at all coordinates.
That’s a different issue but you’re right also I remember reading game developers advocating fixed point arithmetic for world coordinate.
One can do interval arithmetic with fixed point computation too..
renox,
Floating point used to be far more accurate than ints when cpu registers were limited to 32bit. Now that we have 64bit registers and SSE’s FP mantissa is only 52bits, fixed point integers can give us more accuracy as well.
I wonder if there are any game worlds that are big enough such that this makes an observable difference?
If each object were tracked to millimetre resolution, then SSE’s 64bit FP is accurate up to half a light year in any direction. 64bit signed fixed point would cover 970 light years in any direction.
So I guess there’s probably not a very compelling reason to switch unless your simulating a large universe.
Nice chart showing breakdown of FP formats.
http://www.monash.edu.au/policy/gpnumacc.htm
transputer_guy,
“As the x86 evolved with ever new FPU opcodes and then AMD64, the FPU bugs became too difficult to figure out.”
“There are various comments about the game using detection algorithms that were very sensitive to FPU round off errors eventually causing it to pass through solids.”
Somehow this doesn’t seem right, even though it’s what the author hinted. And since he didn’t find the bug, he might be wrong to point the finger to FP. How does FP rounding make a difference for a game where the ball’s position is genuinely a REAL number (unlike currency)? What’s it matter if a bit representing 0.000000000000000005% of the full value is a 1 or 0?
AMD64 still has the original 80bit floating point unit & registers used by x86. Some applications have switched to SSE’s 64bit FP computation, but it isn’t necessary and I am wondering if the bug is happening with both FPU and SSE?
My guess is that there’s some timer initialization code that’s buggy in the 64bit version which is causing the in-game motion vector factors to jump up such that the ball “moves” from above the paddle to below it in one game step without ever touching it.
Pseudo example:
intervals_per_second=0;
time = time();
while( time()-time < 1s ) {
ProcessGameInterval();
intervals_per_second++
}
This code determines how many steps the game can handle per second. However if the integer type is too small (say 8 or 16bits), then intervals_per_second will wrap. This would cause the game to *think* that the machine’s is very slow, and ProcessGameInterval might move the ball by such large steps at each interval such that it completely misses the paddle.
Edited 2012-12-20 15:47 UTC
Microsoft is evil. It killed my mother, ate my sister and stole my moose. I hope that everyone involved in the exploits of Microsoft get stabbed by boats. I hope I lie and tell everyone you were a good wife and I hope you die, I hope we both die….
Wait, got confused with song lyrics in that last bit sorry.
Honestly, searching my own feelings I was a much bigger Microsoft hater back in the DOJ days. Now it just looks like an annoyance to install. I don’t mind Aero though. 7 home is on the other partition of this netbook and I visit every once and a while, play a Civ 4 demo and go back home to my Mint 14.
On the note of the blog itself, I love that we live in an age where frigging inane questions like this have honest in depth answers. Think I might peruse bloggy man’s backlog.