Tuesday, January 14, 2014

Munchkin Rules Removed by Request.

The page of Munchkin rules has been removed by request. No hard feelings on this end.

Monday, January 6, 2014

Performance of a shortcut to document.getElementById

I don't like typing document.getElementById (or document.createElement, etc.) repeatedly so for a while now, I've used my own function, I call byId (I know jQuery has $get, but I don't use jQuery, for reasons I won't go into here). This function started out as a simple:

function byId(id)
 return document.getElementById(id);

In Internet Explorer, I could use var byId = document.getElementById, but this didn't work in other browsers. I then tried, what I though was a more elegant solution of binding byId to the document object (var byId = document.getElementById.bind(document)). This works, but it winds up being slower then then simple method in all browsers, but IE. I decided to publish my results on jsperf for anyone interested.

What's really maddening is that the best method is different in each browser. I'm sure any web developers have experienced this themselves.

Sneaky Christmas Music

More and more, it seems that every year the holidays sneak up on me and suddenly it's Christmas. I was thinking about it last night, and I think I figured out why.

For starters, I'm older and time seems to go faster as you get older because a defined period of time is a smaller and smaller percentage of your memories. But it's more than that. I think it's the music.

Back when I was younger, the radio was constantly playing Christmas music. We had to go outside to shop and all the stores were replaying Christmas songs (driving their employees crazy).

This year, I listened to very little Christmas music. Due to the digital age, I had Pandora, podcasts, and my iTunes music library. I rarely ever turn on the radio anymore. I think next year I might try and mix in a little holiday cheer to my auditory experience and see how that affects me.

Friday, January 3, 2014

Munchkin Rules in HTML Format

I love playing Munchkin so much, I decided to translate the rules of Munchkin into HTML format to make them more searchable/linkable/viewable on other devices and post them here as a good way to access them anywhere. Note that I am in no way affiliated with Steve Jackson Games and if they ask me to take these down, I will without hesitation (though I'd ask them to make them available on their own site).

*** Edit: Removed by request ***