My face when someone breaks the build.
Nope.
Nothing to see here.
-
2012-02-14
-
2012-02-13
Stupid Terminal Tricks: Dubstep Edition
Today I learned that the terminal is capable of crankin’ out some dubstep. Whodda thunk it?!
“Preposterous!”, I hear you say, but lo! It is quite possible, my friends. To bear witness to this feat of modern technology, simply open a fresh instance of Terminal. In that window, open two tabs. In one, put the following:
yes "wub" | xargs say -v "Zarvox"
In the other, put this:
yes "tsjik" | xargs say -v Whisper
In your face, non-believers!
Alas, I cannot take credit for this earth-shattering discovery; this secret was divulged unto me by a coworker’s dying breath*, who found it somewhere on the Twitters. If you know who should take credit, let me know and I shall due so, as I am a true gentleman.
* not really
-
→
We must all suffer from one of two pains: the pain of discipline or the pain of regret. The difference is discipline weighs ounces while regret weighs tons.
— Jim Rohn
-
2012-02-08
Who knows, this might come in handy some day.
-
2012-02-07
Yep.
-
2012-02-03
It has occurred to me…
-
→
How Another World Works
I found a link on CodeSlinger that provided some insight into how Another World (one of my most favoritest games of all time) works under the hood. I may not be a “real” software engineer, but I have the feeling that it involves some pretty clever monkey business. And I mean that in the best way possible.
So, without further ado… Another World Code Review
-
2012-01-30
Getting IE drop shadows to suck LESS
I’ve started working on a project where I have to implement drop shadows cross-browser (except for IE6, thank jeebus). I did some investigation and found some things that looked promising for taking care of this in IE7+: CSS3PIE and LESS Elements (because I’m too cool for regular CSS).
After using the Javascript implementation of CSS3PIE (because I’ll be damned if I can get the .htc file to do anything), I was overjoyed because something actually worked in Internet Explorer! However, the creative director wasn’t very pleased because, while it worked, it didn’t exactly look good:

So, I put on my thinking cap, and promptly I identified a series of issues:
- PIE requires drop shadows to be specified with rgba color values.
- In my project’s style guide, shadow colors were specified with hexademical values
- the .drop-shadow mix-in in Elements did not take a hex color as a parameter (instead using alpha values of black)
- IE (or Pie) did not seem to respect the alpha parameter and just went full-on black all the time.
So after a little bit of research, I found that you could convert hex to rgba using some LESS magic. I changed a few lines of and came up with this modification of Elements’ .drop-shadow mix-in:
.drop-shadow(@x-axis: 0, @y-axis: 1px, @blur: 2px, @alpha: 0.1, @color) { @msColor: @color + rgba(0, 0, 0, 1); // Convert hex to rgba for compatibility with PIE -webkit-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha); -moz-box-shadow: @x-axis @y-axis @blur rgba(0, 0, 0, @alpha); box-shadow: @x-axis @y-axis @blur @msColor; }This way, we can specify a hexadecimal color value that will get converted to an rgba value that is compatible with PIE, and looks a hell of a lot better. See for yourself!

Placeholder images courtesy of PlaceKitten.
-
2012-01-28
-
2012-01-27
You will not survive the Zombie Apocalypse, part 1
I know what you’re thinking.
“But Jan - I saw all the movies, played all the games, read all the books! Of course I will! As a matter of fact, I will survive so good and so hard that I will become the Emperor/Empress of the United States of the Living Dead!”
Sorry to burst your bubble. Let’s break this down to a tactical level, shall we?
If the vector of zombification is nuclear, biological, or chemical, you’ve got that covered by the $20 Russian military surplus gas mask you bought, right? I hate to break it to you, but no, you don’t. The filter is probably old, or bad, or both - and you probably only have one. Even if you stocked up on filters, did you know that, in order to be effective, gas masks have to applied and properly sealed within 8 seconds of exposure?
“Puh-leeeez. Tell me something I don’t know. I’ve got a gasmask that I know how to put on, and I have a whole bunch of guns!”
While helpful, those won’t save you. According to the Tueller Drill, an average person can close a distance of 21 feet in under three seconds.
“You gotta shoot ‘em in the head!”
If you’ve ever operated a firearm before, landing a bulls-eye at a head-sized, stationary target at 21 feet isn’t the hardest thing in the world, but it’s not a trivial task. Also, I’m willing to venture that you’ve probably never even seen a gun in real life.
But anyway - consider that target is moving, is a person, and can close that distance even faster, because they want to eat your brains.
Now imagine that this “person” running at you, salivating at the mere thought of chewing open your abdominal cavity and gorging themselves on your entrails, is your grandma. Could you shoot your grandma in the face?
But wait, there’s more - more rabid grandmas than you can shake a stick at. Or a gun barrel, or a bayonet, or an axe handle or chainsaw. And that you are trembling violently in fear and possibly defecating yourself.And that’s before you run out of bullets.

