Indelible Blue Pen

Jason C. McDonald (CodeMouse92)


December 31, 2012

Einstein would have had a panic attack.

sciencecat

I never really realized how quickly numbers add up when you’re dealing with exponents until today. I was trying out an idea in programming, but as soon as my estimations reached about 14 zeroes and my TI-83 graphing calculator threw an overflow error, I realized that I had a problem.

Perhaps I should explain…

One problem at my game company that I’ve been turning over in my head involves the user profiles for our software. The game core ensures that the save file is not edited outside of the program – if it is, it has to be repaired, an automatic process which rewrites the file to say that the changes were from the game, not external editing.

Of course, this presents a problem. A teacher would have to catch and fix changes before repairing, which leaves a lot of openings for human error and plain old oversight. So, I came up with a solution. I thought it was brilliant: Have the computer try all the possible combinations of data, and find the one that the game core accepts.

A few weeks ago, I had created a little program called Redstring, which lists out all possible combinations of elements from a maximum of eight columns. So, to test out my aforementioned brilliant idea, I put numbers 1 through 100 into each column and hit “compile.”
Twenty minutes later, the program is still running. I decide to calculate how long it would take to come up with all the possible combinations, which first involves finding how many combinations there were: a mere 10 quadrillion (10,000,000,000,000,000).

A few quick calculations on my TI-83, and I discovered that my computer was creating combinations at a rate of about 20,000 per second. Meaning that Redstring would be done with its task on June 26th, 3598 at 8:42 am.

Meaning that to figure out a single activity’s worth of scoring data in a user profile would take over 30,000 millenia. (No, really, I double-checked my calculations.)

I can totally see that now…some poor teacher decides to run the user file recovery utility. By the time it finishes, she has not only retired, she has expired.

Actually, I think Christ will have returned by that point. With God’s sense of humor, he’d probably move the computer that I started testing the utility on up into heaven. I can hear a little bell ringing across eternity, followed by God calling out “Jason, your calculations are done. Next time, just ask me to do it.”

One down, 24 activities to go. That poor kid is never going to get to play the game at this rate.

Does it surprise anyone that I’m playing “The Dummy Song” by Louis Armstrong on Spotify right now? For my next trick…

Okay, so that wasn’t my brightest programming moment, but at least I did the math and cancelled the attempt before my computer committed some act of desperation. It honestly just reminds me of The Hitchhiker’s Guide to the Galaxy, where the supercomputer takes a million years to arrive at the answer “42.”

Hannah-Barbara Cartoons lied to us – they showed us a space age in which massive mainframes complete such calculations in mere seconds, while still running from 8 inch floppy disks (seriously, have you watched the Jetsons recently?)

So, two things I’ve learned this week: computers are not intended to calculate 10 quadrillian combinations, and cartoons are not based in reality. Still better than week before last, when the only thing I learned is that you have to take the lid off of a travel mug before pouring the coffee in.

Here’s to learning!

 

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Leave a Reply

Your email address will not be published. Required fields are marked *