Just another WordPress.com site

Those Who Don’t Learn From The Future Are Doomed To Repeat It

“Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying ‘End-of-the-World Switch. PLEASE DO NOT TOUCH’, the paint wouldn’t even have time to dry.” – Terry Pratchett

[House of Grant]

Grant and Mephisto were sitting at Grant’s computer, both focused on the computer screen.  Between them was a half-full bowl of popcorn.  Laughing among themselves, watching Oben’s day before and during the hospital visit, on the screen showed Oben now entering his house.

“He’s booting his computer now!”, Mephisto said gleefully, “What did you put in it?”

Grant smiled, “There’s a runme.exe file that just send what he types in to the outer interface of this program, and a readme.txt that contains a message from God.  I’m sure he will find it humorous!”

A pause.

Mephisto turned his head slightly to the side, “Was he supposed to run the runme before reading the readme?”

Grant leaned back in his chair in triumph, “I knew he would do that! Nobody ever reads the readme first.” He turned towards Mephisto, “The runme, while being an interface to this program, also changed a few settings on his computer to make the readme look cooler when he opened it.”

“You didn’t — red font?”, Mephisto laughed.

“Okay, he’s reading it now.”

“You signed the letter with Love?”

Grant grinned, “Don’t question my motivations.”

They passively ate small amounts of the popcorn as they watched Oben’s neck descend, reading down through the message.  All three eyes were glued to their computer screens.  Oben switched back to the command window and typed something.

Mephisto nodded, “Well, a System out println of this is how I would have started too.”

Grant, teasingly mocked, “You’re joking, right?  He’s using the Universe class right now, do you know how long it would take his computer to print all the data in his universe?”

“Well…”

“Watch,” Grant wore a smug expression as a flood of symbols washed over Oben’s screen. “Grant One, Mepho Zero.”

“So how long does it take to print it?”

“A long time.  Like, a few trillion millenia. Or more,” Grant said, taking a handful popcorn.

“Well, he closed it.”

“Ah, he’s smarter than I believed he was!”

“Reopening.”

“What’s he going to type now?”

“Looks like another System out print line.”

“I withdraw my previous statement about his intelligence.”

“Wait, he making it this dot get class!”

“Ahh, good.  He knows reflection.”

“He knows that he’s sending code to the universe class now.”

“He would make a great detective, I’m sure.”

“What’s he doing now? It that a-”

“No! He’s not!” Grant fumbled across the keyboard to press control S to save the state of the simulation before Oben could run the code, but he was too slow.  The System exit was sent, and the simulation window closed, leaving a fuming Grant staring at a desktop background, and a Mephisto who was laughing maniacally.

One lunch later, the two were back at the computer, and Grant reopened the latest save file, dated to a day ago.  They fast-forwarded through Grant’s medical procedure but this time, before Grant opened the flash drive on his computer, Grant typed into his interface,

this.memoryCardForOben.readMeAgainText=this.memoryCardForOben.readMeText+”\n\nP.S. Don\’t, under any circumstance, type System.exit(0)”;

Mephisto, on seeing this, sulked his head into his hands in disappointment and said softly, “You made it a global variable.  You made it a global variable!”

Grant quickly, trying to chance the subject, “Don’t worry about it.  I added a P.S. this time to tell him not to ever use the System exit.”

Mephisto, still not satisfied, repeated, “Global variable, universal variable. Oh my God, Grant.  Global variables.”

“I earn my duct tape programmer title.  He’s opening the message now.”

On Oben’s screen, showed the red fonted message, with the P.S. Grant had just written.

*****

[House of Oben]

Oben stared at the message on his screen with the red font, staring at the last line which said not to use System.exit in the program.  Apples and stories of forbidden fruit floated into his thoughts, and meandered through his mind.  He decided to try, before any System.out.printlns, to see just what would happen if he typed System.exit(0);

And so, he did.

System.exit(0);

*****

[House of Grant]

“He did it again,” howled Grant, clearly frustrated.

“Remember when you told that guy not to eat the apple in the middle of the garden?”, said Mephisto, amused.

“Psychology is too complicated,” Grant slouched into his chair, “I need to actually code a special condition into the interface to prevent it from running the system exit.  And I forgot to save yet again.”

*****

[House of Oben]

Executing the statement promptly closed Oben’s terminal window, making the file explorer window the active one.  Still two files there, runme.exe and readmeagain.txt.  Read me again?  Oben opened the file in notepad as it told him to.

You sir, ought to be ashamed.  You’ve wasted two hours of my time using that silly System.exit(0) command.  Do you not know how to run any other line of code besides the exit?  I specifically told you not to, and you did it anyway.  Don’t do it again!
Love,
God

Thinking for only a small amount of time, Oben resolved to reopen the program and type something else.

System.exit(1);

Again, the program closed, and behind it, in the readmeagain.txt window, the text changed.

I knew you were going to try to do a System.exit(someOtherNumber) after I told you not to do it for 0.  Stop trying to crash my program.  It’s not worth your time.  It will not work.  It’s not worth my time to write all these message in response to your attempts at breaking the system.  
Love,
God

Deciding that direct methods of crashing the program would not work, Oben decided to find out what kinds of variables and methods there were inside the Universe class.

import java.lang.reflect.*;

Class universeClass=this.getClass();

Field[] universeFields=universeClass.getDeclaredFields();

for (int i=0;i<universeFields.length;i++) {

System.out.println(universeFields[i]);

}

The result of this was the printing on the screen of the variables in the Universe class.

Time time

Space space

Folder memoryCardForOben

Taking interest in what this memoryCardForOben variable was, Oben decided to continue his exploration in the anatomy of this code.

Folder myFolder=this.memoryCardForOben;

Field[] folderFields=myFolder.getDeclaredFields();

for (int i=0;i<folderFields.length;i++) {

System.out.println(folderFields[i]);

}

This printed the contents of the flash drive that Oben had.

Application runMeExecutable

String readMeAgainText

Already having an idea of what the readMeText String was, Oben decided to confirm it.

System.out.println(myFolder.readMeText);

Printed to the screen was an exact replica of what was in the readMeAgain, except in black font rather than red.

I knew you were going to try to do a System.exit(someOtherNumber) after I told you not to do it for 0. Stop trying to crash my program. It’s not worth your time. It will not work. It’s not worth my time to write all these message in response to your attempts at breaking the system.

Love,

God

An idea quickly struck Oben as another possible way to crash the program, by erasing the program completely.

myFolder.runMeExecutable=null;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Tag Cloud

%d bloggers like this: