We All Make Mistakes

I had the great pleasure to meet lots of dedicated engineers, researchers, and scientists at the W3C Immersive Web Working Group face to face meeting this week. This is the team dedicated to creating standards for mixed reality so that we can all enjoy future interactive content from the web-browser of our choice.

During one of the lunches I had a lovely conversation with Brandon Jones and several other members, swapping war stories of programming bugs long past. Much laughter ensued.

Brandon told us a story of when he (pre-Google) wrote an app that hardcoded a scrollbar’s width to 17 pixels because he couldn’t find an API to get it from the OS. When Google later released Chrome with a perfectly positioned scrollbar he scoured the source to find the hidden API they had used. In the source was a function to return the value and a comment saying “I can’t find an API for this but 17 pixels seems to work”. :)

I told a story of an old college roommate who wrote a text adventure game for his Intro to Programming class. He made everything an object inside of the room you are currently in. Another friend tried take key and it put it in the bag. Then he tried take north. The game actually put north into the bag. Since my roommate had neglected to implement take out of bag, north was now gone from the game. We imagined a existentialist text adventure you could make with such concepts.

I like that we tell these stories. It teaches new programmers that it’s okay to fail. That computing is hard. It lets them know that even experienced software engineers are still human and make mistakes.

Then Brandon told us a story I had never heard before. In the newest Legend of Zelda game at certain points the game pauses and says “There is a blood red moon, and all of the monsters have respawned”. This sounds like it’s a way to hide pausing the game to save state to disk. Turns out it’s not.

In one of the older Zelda games the developers couldn’t find the source of a memory leak. They were running out of time to fix the bug so this was their solution: save the player’s info then reload the entire world, starting with fresh memory. Their blood moon hack to work around a memory leak became a standard part of the game, such that future games implement the blood moon mechanic even though they don’t need to fix a memory leak.

Even the ‘old masters’ used evil hacks. ’Tis the nature of the world.

z

xkcd: Lisp

Talk to me about it on Twitter

Posted January 31st, 2019

Tagged: programming