Archive for the ‘Random Thoughts’ Category

The Global Object Model

Levi and I came up with a real-life equivalent to the Document Object Model (DOM).  It’s called the Global Object Model (GOM), and it can be used to organize, reference, and manipulate elements around the globe using simple JavaScript statements.

Where the DOM limits you to window and document, the GOM opens the door to bigger and better things.  For example:

var idiot = world.countries['USA'].currentPresident();
alert( idiot.approvalRating() ); // outputs 3%

The GOM supports event handling.  The following code would guarantee that I alway have Taking Back Sunday tickets as soon as the band goes on tour:

world.musicians['TakingBackSunday'].onTour = function() {
world.people['cory'].buyTickets();
}

Error catching is easy with the GOM:

try {
world.people['cory'].fartInPublic();
} catch {
alert('Excuse me!');
}

I’m even working on a jQuery port so we can minimize the amount of code and the time it takes to write said code.  Now, you can reference multiple people, places, and things with simple CSS selectors.  To make it snow in Las Vegas, Phoenix, and Albuquerque, we say:

$('#las_vegas, #phoenix, #albuquerque').weather('snow');

To invoke uproar in every U.S. city simultaneously, we could use:

$('#USA .city').pandemonium();

Standard jQuery functions still work:

$('#reportCard').hide(); // for kids with bad grades

$('.breasts').show(); // at Mardi Gras

$('#g_w_bush').replaceWith('#mr_t'); // a better choice

And, of couse, chainability.  Here’s how I would wake up every morning:

$('#cory').onWake( function() {
$(me).shower().brushTeeth().getDressed().goToWork();

});

And, in case you’re wondering, within a few minutes I’ll be doing something like $(‘#cory’).sleep();

Ramen Haiku Revisited

In the beginning of the month, my snack drawer inspired me to write a Haiku about a lonely ramen. Now, my snack drawer is empty and, once again, I have been inspired:

An empty drawer
No more snacks for me to eat
Wish I had ramen

One day, my greatness will be recognized.

Ramen Haiku

My desk at work has a snack drawer.  Oftentimes I sit there with it open, gazing at the helpless snacks just waiting to be consumed.  And then I think, I should write a haiku about them.  And so it was.  A colorful haiku about those oh, so tasty ramen noodles:

one lonely ramen
sitting inside the drawer
eat me you bastard

So now you know.  Yes.  I do have a creative side.

Handwriting

I’ve come to the harsh realization that I may never write legibly again and, if I ever have to resort to a pen and paper as my only means of communication, I may become incommunicationable! Yes, I know that’s not a real word but that’s where my written skills are headed – to indecipherable lines of scribbles and text! Without a keyboard I am simply not a written communicator.

I know this is true because of the final exam I was administered today. Almost the entire test was comprised of essay-style questions that required a pen and paper (GASP!). The difficulty of this exam had gone from elementary to an all out physical challenge. Sure, I had studied the material, but I was nowhere near prepared for an epic handwriting battle! Over 10 pages…four of which required more than just a bubble or circular marking. By the time I was through I had blisters on my fingers and blood on my knuckles. I didn’t think I would make it out alive. I saw my educational career die right there with that abominable test. But, with the click of a pen and the turn of a page, it was all over. Victory was mine! The Great War was fought and I had survived the wretched experience without any permanent damage to my hand. The only problem is, I’m not sure if anyone will be able to read my handwriting. I wonder if that matters?