Bring Your Own Code

The goal of BYOC is simple: provide an outlet for you, the enquiring software developer, to sharpen your programming skills on a problem a bit more interesting than the normal, boring stuff. That, and to put your code where you mouth is, so to say.
Despite the eighty-hour weeks, the relatively low pay, and the constant threat of being whipped if you don’t code fast enough, there’s something appealing about developing videogames professionally. After all, if videogames are superfun, then being immersed in them fourteen hours a day is basically heaven.
It's been quite a while since the last Bring Your Own Code. It's mostly because I haven't thought of any coding quandaries that fit in the "totally fun and doable over a quick break" difficulty; everything has been either hello world easy or graduate-level comp sci homework hard. If you've got any ideas, please do send them to me.

Krypto and 24

2010-05-05
As a kid, I was never a fan gambling away my hard-earned allowance. Heck, even playing poker with M&M’s meant that maybe — just maybe — I’ll walk away with less chocolate than I came to the table with, and that was an anxiety worth not experiencing. Fortunately, I’ve since come to my senses, but I’ll never forget the game my risk-averse friends and I would play when we came across a deck of playing cards.

The Key Lock Box

2010-03-31
Nearly two years ago, I set out on the quest for a new house. Well, not new by any stretch of the word "new", but more foreclosed and dilapidated. It was 2008 and the market was flooded with homes, especially those of the not quite livable variety. As I explored house after house after house, I became intimately familiar with a device known as a key lock box. Generally used by realtors, key lock boxes are a convenient, low-tech way to provide combination code access to a lock that would otherwise require a physical key for access.

Avoiding the Splice

2010-01-20
One mistake that rookie carpenters will often make is to measure for trim molding – baseboard, casing, crown, etc – by the linear foot. Take the casing on a 7’ door, for example. Each leg of the door requires 84” of trim and the header needs 32”. If your house has 16 doors, and each side of the door needs 200” of trim, then that adds up to 533’ 4” (16 x 2 x 200”). And since you can get casing in 16’ boards, you’d need to order 34 boards to get the job done, right?

Kirkman's Ladies

2009-09-16
Well over 150 years ago, the Reverend Thomas Kirkman posed an interesting problem in The Ladies' and Gentlemen's Diary for 1850. The curiously-named publication was in fact a mathematical journal and, as such, Kirkman's problem was mathematical in nature.

Sliding Around

2009-09-02
Andy Hertzfeld is a bona fide Software Wizard. I'm not kidding: it was his official job title, codified on his business card. And not just any old business card, but one from Apple Computer. You see, not only was Andy a key player on the Macintosh team, but he also had a knack for doing the impossible. One his feats was described in the September 1995 issue of Byte Magazine. Besides everything else he did to help get the first Macintosh out the door, Andy Hertzfeld wrote all the first desk accessories. Most of these were written in assembly. However, to show that desk accessories could also be written in higher-level languages, Hertzfeld wrote a demonstration puzzle games desk accessory in Pascal. Like its plastic counterparts, users moved squares around until the numbers 1 to 9 were in order. As time began to get short, the decision was made that the puzzle, at 7KB [7KB = 7168 bytes], was too big (and too game-like) to ship with the first Macintosh. In a single weekend, Hertzfeld rewrote the program to take up only 800 bytes. The puzzle shipped with the Mac.
Not too long ago, I went up to Windsor, Ontario with my lawyer, Mr. Van Dress. Like my netbook, I never like to leave town without legal representation. Since there are really only three things to do in Windsor – drink, gamble, and buy Cuban cigars – we picked up some stogies, drank until we were confident we’d win, and headed over to the casino.
Long before the advent of software, computers, or even electricity, Wolfgang von Kempelen debuted one of the world’s most spectacular technological marvels ever invented, even by today’s standards. Inspired by the then-famous illusionist François Pelletier, Kempelen wanted to build something so incredible that it would top Pelletier’s – and all others’ – illusions, and that he did. The year was 1770 and the machine was a chess-playing automaton known as The Turk.
Mr. Zargas was the zany math teacher at Cliffmont High that everyone seemed to love. Whether you were a nerd or a jock, he made mathematics interesting, challenging, and fun to learn. That, in and of itself, was impressive enough, but Mr. Zargus took it one step further. When it came time for his frequent "Mathematical Battle of Wits," he would let the jocks use their brawn instead of their brains. The nerds never stood a chance, especially when it came to his "locker challenge."

Josephus' Circle

2009-07-29
With nearly 750 responses, and solutions written in everything from ABAP to MUMPS to XSLT, I’d say that last week’s Programming Praxis (Russian Peasant Multiplication) was certainly a success. The comments are most certainly worth a read, if nothing else but to see things like the circuit diagram solution, something done entirely using regular expressions, and some obscure childrens' language called Baltie 3. That said, I'm excited to present this next Programming Praxis.
Ever since the first OMGWTF Programming Contest, I've always wanted to bring back some element of "coding challenges" to the site. Ideally, this would be in the form of a second contest... but considering that contests require a ton of work, and the fact that interns around town have come to learn that interning at Inedo basically mean means shipping mugs, mailing stickers, testing contest entries, and acting as human ottomans, we'll have to go with something a bit scaled back. And that's where Programming Praxis will come in.