Saturday, December 09, 2006

NaN? That's Far Too Easy...

This thread on TheDailyWTF linked here and much hilarity ensued. Basically this guy has taken existing concepts (NaN, division by zero, infinity, etc), rewritten it slightly in a way that makes things basically suck and called it his amazing new invention that will revolutionalise everything in maths, computing, etc. He's even taken it upon himself to teach it to children at school. Here are some choice comments (and bear in mind the Wikipedia article on his new maths was put up for deletion barely 2 hours after its creation):
So, in order to avoid causing math errors from division by zero, this idiot has created a new batch of entities which requires special rules which are even more complex (which means less intuitive and more difficult to implement) than just "don't divide by zero". Obviously a major human accomplishment.

If math were medicine, this guy just invented a special new pill which, if you take it, one Planck Time unit before you die, puts you into a coma-like state in which you do not eat, breathe, communicate, or think, and in which you eventually decompose. Your legal status becomes hopelessly confused, and your doctor has to spend twenty times as much effort to deal with it as he would have to sign a death certificate. But it sure beats dying!

[...] the "inventor's" example of the calamity that would ensue if an autopilot system were to crash because of a divide-by-zero. Now, if instead we received a null, how would this carry through the equations/program used within the autopilot? Then the settings for the thrust, alerones, elevators, and everything else would become null. What do you do with a null? Nothing! It's just as indeterminate as the divide-by-zero you were originally stuck with. So if the resulting values are of no use, then what was the point of continuing with the calculation? You gain nothing by continuing past the null condition.

In CS, we have a term for this: an exception. When something happens that stops the show, you back out and try to recover from it. How does a null change this? Instead of immediately backing out (as the divby0 interrupt on any processor would do), you have to constantly check the "nullity" of your return value and manually back out. Congradulations, you've reinvented the square wheel.

What really scares me though, is that he's teaching this to his high school class. This isn't yet an accepted mathematical representation, let alone part of the curricullum that he is required to follow. So why is this being taught to high school students who will blindly accept his useless nonsense?

The part mentioned above is this:
"Imagine you're landing on an aeroplane and the automatic pilot's working," he suggests. "If it divides by zero and the computer stops working - you're in big trouble. If your heart pacemaker divides by zero, you're dead."

So how does he suggest it deals with a nullity condition then? Should the heart rate be increased? Lowered? Should the plane bank? Dive? Eject the motherf***ing snakes?


This theory is full of fail.

No comments:

Post a Comment