Sans Donald

My nefarious ploy of publishing the status of my code repositories has succeeded, as I’ve forced myself to finally sink some time into Old Lady lest anyone see how dusty the code base had gotten. (Playing video games for several hours is only part of the excuse for that.)

I’ve been cranking through the introductory bridge book I bought, implementing its guidelines for bidding in Old Lady. Thus far, the computer players can handle 1NT openings pretty much all the way through, and can respond once to any other 1-level opening bid before they find themselves in a situation they don’t know how to handle.

Old Lady screenshot

Here’s a screenshot of the most interesting 1NT bidding I was able to produce while playing it for a little while. North (computer partner) opened 1NT, since he had 15 points and balanced distribution. I (playing South) had 13 points and a long (5+ cards) spade suit, so I replied with 3♠. That reply is forcing to game, requiring North’s next bid to be at least at the game level. (His 1NT opening indicated 15-17 points, plus my 13 points meant we had 28-30 points total, and 26 points is the threshold for bidding game.) North could choose between game in spades or game in no trump, depending on whether our hands had enough spades between us. My 3♠ bid indicated I had at least 5 spades, plus his 3 spades gave us 8 total, which is enough for bidding in spades, so he chose 4♠ as our contract.

For the record, we (meaning I, since North was dummy) did indeed collect our 10 tricks.

The Prolog code that handles the computer players’ bidding works pretty well as far as it’s been implemented, though it runs noticeably slowly. The speed problems will be fixed later. I’ve implemented the bidding code as a state machine. The initial state is “opening”, and the bids made after that determine what the new state is. The state determines which set of rules to use when choosing (or interpreting the meaning of) the next bid.

Specifically, the names of the states just happen to be the names of the rules that implement their initial logic, allowing me to use call/4 to jump into the right section of code. The bidding logic itself is spread across multiple SWI-Prolog modules that keep related states’ implementations together and hide the internal details. For example, one module handles opening bids; another handles bidding after a 1NT opening; a third handles responses to a 1-suit opening; etc.

Key to the bidding code is the large set of unit tests for each module that make sure they’re doing the right thing. The vast majority of these are taken from the quizzes in the aforementioned bridge book. I figure if the self-tests are good enough for me, they’re good enough for Old Lady. Automated testing is essential for Old Lady; because of the randomness in each deal, you can’t just keep playing hands manually until the situation you want to test comes up, and then look to see if the computers behave correctly.

For the adventurous, you can check the latest code out of the repository (bzr get http://www.kuliniewicz.org/oldlady/bzr/oldlady) and try it out. There’s still lots of bidding logic to implement, and the AI for the trick-taking portion of the game is still dumb as rocks, but it is at least playable. The configure script should actually make sure you have everything you need to run the program now.

A Tale of Two Doctors

First: did you know that Joss Whedon, of Firefly fame, is working on a musical, Dr. Horrible’s Sing-Along Blog, to be released on the Internet mid-July, for free (initially)? Here is the trailer:

Yes, it’s starring Doogie Howser Neil Patrick Harris. As a pathetic villain. If he’s only half as terrible at villainy as The Monarch, it should still be awesome. Oh, and Mal Reynolds Nathan Fillion is the hero.

Second: You watch Doctor Who, right? Of course you do. Remember last season’s episode The Family of Blood, where The Doctor had recorded a message for Martha before wiping his memories and becoming human? Wonder what he was saying during the parts you didn’t hear?

Browsable bzr repository

I’ve finally set up a browsable web interface to my bzr repositories. Now you can more easily track what’s going on in my various software projects without having to actually check out a copy of the repository. In particular, there’s also feeds that track the latest updates. I’ve also added those feeds to the sidebar of my blog, thus letting you keep tabs on what’s going on with almost no effort on your part.

If it breaks, let me know.

ur doin it wrong

Pew Foundation on Religion and Public Life: 8% of atheists \"absolutely certain\" God exists.

Source: Study by the Pew Foundation on Religion and Public Life, as pointed out by Improbable Research

On On the Rain-Slick Precipice of Darkness

Last weekend I bought Penny Arcade Adventures: On the Rain-Slick Precipice of Darkness: Episode 1, and spent entirely too much time this past week playing through it.

I was curious about the game for two reasons. First, I like Penny Arcade, which happens to be the very first webcomic I was introduced to, way back when I was a freshman. Second, they actually produced a Linux version of the game, which you see pretty rarely in the world of commercial games. It seems like the sort of thing I should encourage.

Since they had a free demo of the game, I was first able to see if the game would actually run on my four-year-old laptop, which meets the minimum specs, barely. It does, albeit with swapping everything else out of RAM on startup and taking a long time to switch between areas. But doing the game itself, performance is acceptable, at least one you get used to the slight amount of lag in areas where timing is important. (Most noticeable in the Vandalism minigame, where I’d need to hit the space bar when the meter was centered over the left or right stack if I wanted it to stop over the center one.) Of course, this is more the fault of my old, ill-suited-for-gaming hardware; the game is indeed entirely playable.

The demo got me hooked, and the rest of the game didn’t disappoint. The battle system is nicely done, encouraging you to do more elaborate things than just “attack enemies until they die” to get the bonuses. There’s no random encounters — in fact, enemies never respawn, period, so there’s no grindiness to be found. Plus, you get to beat up barbershop quartets, which is always fun.

Really, the game is largely devoid of the typical set of annoyances you find in games. No random battles. A “Case Log” that reminds you what needs to be done to advance the plot. Auto-saving after any significant event (including battles). Automatic healing after battles. A tutorial level (the demo) where the tutorial content is both entertaining and skippable. You can tell the game was designed by people who play a lot of games, and decided not to put in the things that make games stop being fun.

But where the game really shines, naturally, is the humor. All the cutscenes are filled with precisely the sort of dialog you’d expect from Penny Arcade. My favorite, for some reason, is when the player tries to get a reaction out of The Silent Pope by singing The Name Game for “mime”, pausing after each line to wait for a response.

The game is fairly small in scope, but the level of detail is impressive. Loads of things on each screen have a humorous description or two to be found when you click on them. It turns out there’s a lot of things you can say about trash cans, or ice cream cones dropped on the boardwalk. It’s also a nice touch to have the little robots — you know the ones — say “01100110 01110101 01100011 01101011″, which means exactly what you think it does.

And for the record, the cat is not worthless. It is possible for its attack to do non-negligible damage, and it happens with greater than the roughly 1-in-2,000,000 probability claimed in-game.

Now they just need to come out with the next episode. My character needs revenge. And a house.

Music Applet 2.4.0 released

Music Applet 2.4.0 has just been released. The main change is that it now supports the recently-released Banshee 1.0, in addition to older versions of Banshee. There’s also improved support for debugging crashes, as well as an updated Czech (cs) translation.

Unfortunately, the new version of Banshee doesn’t provide a way to manipulate song ratings. Once that gets fixed in Banshee, I’ll update Music Applet accordingly.

A few technical notes on Banshee 1.0 support: since this new version of Banshee completely changed its D-Bus interface, there’s now two plugins for Banshee: the old one and the new one. While it’s inelegant to have two plugins for what the user sees as one program, it’s the only reasonable technical solution, given that the two versions of Banshee are completely different as far as Music Applet is concerned. If you have problems with Banshee support after upgrading the applet, check to make sure the new plugin (now called “Banshee”) is enabled. The old plugin has been renamed “Banshee (pre-1.0)”. I have no plans to remove support for old versions of Banshee any time soon.

Dead Duck Day

Somehow, I think some of you might be interested to know that today, June 5, is Dead Duck Day. No, not to worry, the little guy is fine, perched on my printer with that stupid little grin of his and constant shilling of insurance.

In case you aren’t familiar with the historic scientific event that Dead Duck Day commemorates, here’s the abstract from the Ig Nobel Prize-winning scientific paper it spawned, courtesy of the author:

On 5 June 1995 an adult male mallard (Anas platyrhynchos) collided with the glass façade of the Natuurhistorisch Museum Rotterdam and died. An other drake mallard raped the corpse almost continuously for 75 minutes. Then the author disturbed the scene and secured the dead duck. Dissection showed that the rape-victim indeed was of the male sex. It is concluded that the mallards were engaged in an ‘Attempted Rape Flight’ that resulted in the first described case of homosexual necrophilia in the mallard.

Moeliker, C.W., 2001 - The first case of homosexual necrophilia in the mallard Anas platyrhynchos (Aves: Anatidae) - DEINSEA 8: 243-247 [ISSN 0932-9308]. Published 9 November 2001

Science!

Old, but not dead

Wow, it’s been far too long since I’ve posted something here.

Old Lady, my fledgling open-source bridge game, has finally been seeing some updates lately. The main blocker had been me hitting the limits of my knowledge of bridge strategy augmented with the information readily available on the Internet. While Old Lady follows the rules of bridge just fine, it’s absolutely horrid at playing well. And since the computer plays not only your opponents but also your partner, this isn’t as nice as a novice might think.

Anyway, during a recent trip to the library I found an introductory bridge book that does a pretty good job explaining basic bidding and play, along with the rationale behind it. I started implementing its guidance in Old Lady’s Prolog code, but didn’t get very far into it before having to return the book. And since the copy I bought off of Amazon hasn’t arrived yet, things are once again on hold. Briefly, this time.

Old Lady is still pretty much unplayable, but if you’re really curious you can grab the latest code out of its bzr repository at http://www.kuliniewicz.org/oldlady/bzr/oldlady/. At least now the configure script actually checks to make sure you have SWI-Prolog installed, though it still pretty much assumes you have all the modules (both Prolog and Python) installed. That’ll be fixed eventually.

I tentatively plan the next tarball release for when enough of the bidding system is implemented to make at least that phase of the game playable.

You Are (Not) George Lucas

[Editor's note: You knew this was coming eventually. Deal with it.]

Evangelion 1.0: You Are (Not) Alone, the first movie in a four-part “Rebuild” remake of Neon Genesis Evangelion, was recently released on DVD in Japan. And while no distributors have apparently bought the rights to print money release it in the U.S. yet, a little thing like that’s not going to stop me from reviewing it.

As with any remake of something, there’s the question of how closely it will follow the original. Something has to be different about the remake, or else what’s the point of making it? (The answer: shamelessly cashing in.) There’s the opportunity to improve on the original and trim the filler. But there’s also the trap of losing what made the original good, and deviating from what fans liked about the original will lead them to declare that the remake sucks.

In other words, a good remake needs to stick to the original, but do something different, but not too different. And in this case, keep in mind that anime fandom is more, well, fanatical, than a survivor of the Kirk-Picard flamewars wearing a “Han Shot First” T-shirt. Squared. We’re talking about fans that sent the director death threats over how the series ended. Screw up the remake, and you can imagine how they’ll react.

So, does 1.0 pull it off?

Yes.

Blood Rainbow
When it’s raining angel blood, you do (not) want to know what’s in the pot at the end of the rainbow.

The first half of the movie roughly corresponds with the first four episodes of the series. Well, “roughly” might not be the right word, since most of the scenes are virtually lifted directly from it. They’re redrawn and reanimated everything in much higher quality, granted, but the scenes in the movie reproduce the originals almost shot-by-shot.

Of course, squeezing four 25-minute episodes into about 50 minutes of movie means that the scenes that aren’t copied from the series pretty much get left out entirely. Given that the episodes in question didn’t have much filler to begin with, the pacing of the movie ends up being way too fast, rushing from one major plot point to another. Shinji’s relationship with his classmates, for example, is cut to the bare minimum: he gets punched; he rescues them during battle; they apologize. That’s it. If you haven’t seen the series, you’ll wind up wondering why you should even care. Likewise, Shinji running away — the bulk of episode 4 — gets reduced to a few minutes on screen.

As a result, the first half gives you prettier graphics but poorer storytelling.

Once the movie gets to episode 5’s material, however, the pacing slows to something more manageable and the movie starts realizing its potential. The basic plot of episodes 5 and 6 is mostly unchanged, but the scenes start unfolding differently, so it no longer comes across as something you’ve already seen, but rather as a different take on the same story.

The first engagement with the fifth sixth angel, Ramiel, illustrates this dramatically. In the series, Unit 01 deploys, immediately gets the bejeezus lasered out of it, and is promptly (after an end-of-episode cliffhanger) lowered back underground. In the movie, the fight is much more elaborate. Ramiel is no longer merely an animation-budget-saving regular octohedron, but now shapeshifts before each attack like a cross between an evil Rubik’s cube and the Windows flower box screensaver. Now instead of having Unit 01 retreat immediately, NERV raises a blast shield to block the laser, and Ramiel responds by firing a quad laser to melt through the shield. With the launcher melted by the blast, NERV rescues Unit 01 by blowing the supports and lowering the entire city block until Unit 01 is out of sight.

Just about all the scenes building up to the sniping mission at the climax of the movie are similarly “epic’d up” and made more elaborate, which ends up working quite well. The core of the plot stays unchanged, which is good; there weren’t any problems with episode 6 story-wise, but seeing its events rendered on more than a shoestring budget is appreciated.

But given how closely the storyline follows the series, it’s particular interesting to note the ways in which it explicitly diverges from the series, and speculate how they’ll play out over the next three movies. [Spoilers ahead.]

First, as I noted in passing, the angel that attacks the city in the opening scene, Sachiel, is now designated the fourth angel, rather than the third; the other angels that appear in the movie have their enumeration similarly adjusted. (Now I get to look up their names so as to refer to them unambiguously. Yay.) So what’s the third angel going to turn out to be? Hmmmmm.

Then there’s an added scene where Shinji is stuck between mope and angst (i.e., being Shinji) before the final battle against Ramiel. As part of a pep talk, Misato takes him down to Terminal Central Dogma, shows him Lilith, and tells him that NERV is defending it because if an angel reaches it, that will cause Third Impact and wipe out mankind. In the series, everything involving Lilith is a very closely guarded secret; Misato only discovers it when Kaji shows it to her in the second half of the series (and he only found out about it by snooping around being a triple agent), and even then they mistakenly think it’s Adam. The fact that in the movie Misato apparently knows all about it already is interesting to say the least.

Blood on the Moon
SEELE’s space program was funded by cutting the janitorial budget.

Finally (literally), there’s an added scene at the end, immediately following what was the final scene in episode 6, that opens up all kinds of questions. Apparently there’s some kind of secret SEELE base on the moon, where Kaworu (!) and a SEELE monolith make cryptic comments to each other, and we see a Lilith-looking thing in a pit (!) in the middle of a bloody swath across the lunar landscape (!) with Earth and its blood-red oceans (!) hanging in the background.

I mean, in a post-Second-Impact economy, how exactly does an organization, secret or otherwise, manage to construct a lunar base? Especially when that organization had already committed to constructing what are effectively giant fighting robots, and a city that retracts into the ground for them to fight in and only partially destroy with the collateral damage.

Plus, Kaworu’s totally not wearing a helmet. Or, um, anything else. Moving on….

Evangelion Unit 06
Now that the Cylons have an Evangelion, humanity is frakked.

Then there’s the next episode movie preview after the credits, revealing even more surprises. Intermixed with events from the series (Asuka and Unit 02 deploying; Unit 04’s destruction; the fight with the thirteenth whateverth angel, Bardiel) are things without any analogue in the series: Unit 05 deploying, weird ghost-and-halo-looking things bracketed by the text “ADAMS” (!) and “LILIN+?”, Unit 06 descending from the moon (!), and a new pilot. Needless to say, Evangelion 2.0: Division is going to diverge quite a bit from episodes 7 through 18.

(If you’re wondering how quick the pacing the movie would have to be to cover all that, keep in mind that episodes 7 through 13 have a lot of filler and you could safely cut entire episodes without too much damage to the story.)

Here’s my theory: the secret backstory from the series is the cover story used by NERV in the Rebuild continuity. Misato doesn’t actually know the truth about Lilith, because it’s a different truth this time around, thus suckering fans of the original series into thinking they know what’s going on as well. I don’t know what the truth is going to be, but a hint might lie in a comment one of the SEELE monoliths makes to Gendo about needing to fulfill a “contract with Lilith”. Whether that’s literal or metaphorical, I don’t know.

Or, as Gendo said in End of Evangelion, “The truth is, _____________.”

Moon Pit
Whiskey Tango Foxtrot or lookin’ at a thing in a pit.

Another theory: the creature in the pit on the moon is the as-yet-unnamed third angel. Kaworu makes a cryptic comment about “the third again, huh?” while looking at it. Though “the third” could refer to Shinji (the third child), since Kaworu’s next line mentions him while looking up at Earth. If that’s the case, than the thing in the pit would be a naked Unit 06, before its armor/restraints have been put on. But why would SEELE be building Unit 06 on the moon in the first place, unless there were a very good reason for it, such as cloning it from the as-yet-unrevealed third angel, if it’s also there somewhere? We’ve seen Lilith (the second angel) under NERV headquarters, and presumably Adam (the first angel) was in Antarctica and caused the Second Impact, just as in the series.

“Presumably.” But by my first theory, the secret backstory in the movies are different, so Second Impact could’ve had some other cause, since none of the details surrounding it have been mentioned in the movie yet. Hmmmm.

Or, a less out-in-left-field theory would be that Kaworu has been designated the third angel this time around (instead of the seventeenth), but that doesn’t explain what’s on the moon, or why Unit 06 would come from there, or why NERV would know anything about Kaworu to begin with — in the series, SEELE sent him to NERV as a replacement for Asuka, and they didn’t realize he was an angel until he took over Unit 02 and took it down to Terminal Dogma in episode 24, thinking he’d find Adam there.

So, even though the movie closely follows the storyline of the first six episodes, streamlining and possibly simplifying it, there’s just enough changes and added material to launch rampant wild speculation among fans of the series to try to figure out what’s really going on. The director, Hideaki Anno, managed to figure out a way to cater both to newcomers and the existing fanbase, and did so without ruining any of the classic scenes in the first set of episodes in the series.

Well played.

Ewwwww

I finally got around to cleaning off all the bird droppings on my deck. I learned a few things in doing so:

  • Over time, the piles of bird droppings form a histogram of where the birds like to perch.
  • Birds prefer hanging out on the rafter above the north end of my deck.
  • Individually, bird droppings don’t have much of a smell. En masse, they do. Here, en masse means about one and a half dustpans’ worth.

Now you know.

I Wanna Be The Plumber

If you’ve ever wondered what life would be like in the mirror universe where Shigeru Miyamoto is evil, try playing this fiendish knockoff of Super Mario Bros. (Hint: use Up to jump.)

Or, for the morbidly curious but not masochistic, take a look at this series of videos that show someone trying to play through it:

Disloyalty Card

One of the things I used to like about my local grocery store is that, unlike seemingly all the other chains out here, it didn’t have some asinine loyalty card you needed to have to get the sale price on discounted items. So much for that.

I really don’t see why it’s even in grocery stores’ interests to have loyalty cards in the first place. If they want to track customer spending habits across visits, they could just key their database by your credit card or debit card number (or even checking account number), instead of inventing their own card. After all, how many people these days regularly use cash?

(On the other hand, I kid you not, I once had the person in front of me at the checkout pay for their groceries solely in rolls of coins. And not even handing the cashier enough rolls once the total came up, oh no, but one at a time, bringing yet another roll out of her purse each time the payment came up short. But I digress.)

The other theoretical benefit a store could get out of a loyalty card program would be to better direct marketing efforts towards individual customers. But it’s not as though the store does any validation of the information you put on the application form, or does anything to prevent you from giving the extra copies of the card to other people, say, then-current roommates.

In fact, when my current grocery store started their loyalty card program, the cashier would grab an application, scan the card attached to it, hand you the application, and ring up your purchase. Further visits to the store confirmed that yes, they aren’t even bothering to check if you turned in an application for the card at all; it works anyway. Way to not bother doing even the most basic validity checking. I’m sure the aggregate marketing data you get with that will be ever so useful.

Speaking of which, the marginal benefits to the store have to be weighed against the costs of running the program: making and distributing the cards, training cashiers to ask for the card during checkout, the extra time needed during each checkout to process the card, maintaining the extra database of card activity, etc.

Maybe there’s some fantastic benefit the store gets out of this that I’m missing, but the way I see it, the store would be lucky to do much more than break even with the program, especially compared to the marketing data they could have mined from their pre-loyalty-program database. Is the average customer really enamored with carrying yet another card in his or her wallet, or worse, sticking a miniature card on an already cluttered keychain?

Rest assured, if by some bizarre series of events I ever find myself in charge of a chain of grocery stores, there will be none of that.

Lazy Fibonacci

OK, maybe I’m not quite done with computing Fibonacci numbers. I’ve been playing around a bit with Haskell lately. Here’s what the Haskell equivalent of the C code I posted earlier is:

module Main where
 
import Control.Exception as C
import System.Environment
import System.IO
 
fibonacci = 0 : 1 : zipWith (+) fibonacci (drop 1 fibonacci)
 
main = do argv <- getArgs
          name <- getProgName
          if not (null argv)
                then let which = head argv
                         result = fibonacci !! read which
                     in (putStr $ "Fibonacci number #" ++ which ++ " is " ++ (show result) ++ "\n")
                                `C.catch` (\_ -> hPutStr stderr "Must give a nonnegative integer\n")
                else hPutStr stderr $ "usage: " ++ name ++ " number\n"

Most of the volume there is trying to mimic the same error handling I was doing in the C code in main. However, the code that computes Fibonacci numbers is much shorter. In C, I had to write a whole function. In Haskell, it’s a one-liner. Here it is again:

fibonacci = 0 : 1 : zipWith (+) fibonacci (drop 1 fibonacci)

If you haven’t been exposed to Haskell before, that might make your head explode. Note that it isn’t a function at all. It’s a list of all Fibonacci numbers.

Yes, the Fibonacci sequence is infinitely long. Haskell is fine with that.

Yes, my definition is recursive. Haskell is also fine with that.

This works because Haskell is lazy: it only computes things at the point when the result of the computation is actually used. At runtime, it only actually computes the elements of the list up to the one that’s requested by the user, instead of trying to create an infinitely large list and then indexing into it. That’s also why the recursive definition works: each element is defined solely in terms of the elements that come before it, and I provide the first two elements explicitly.

Specifically, what’s going on in that line is this. zipWith takes two lists, performs an operation on pairs of elements taken from each list, and returns a list of the result of that operation. Here, the operation is (+), plain old addition. The two lists are the Fibonacci sequence we’re defining (fibonacci), and the Fibonacci sequence with the first element dropped off (drop 1 fibonacci).

For example, the first element produced by the zipWith expression takes the first element from fibonacci, which is 0, and the first element from drop 1 fibonacci, which is 1, adds them together to get 1, and returns that as the third element of fibonacci. For the fourth element, it takes 1 and 1 and returns 2. For the fifth element, it takes 1 and 2 and returns 3. And so on, as long as it needs to.

For the visually inclined, try this:

   0   1   1   2   3   5   8  13  21  34  ...   (fibonacci)
+  1   1   2   3   5   8  13  21  34  55  ...   (drop 1 fibonacci)
------------------------------------------------------------------
   1   2   3   5   8  13  21  34  55  89  ...   (drop 2 fibonacci)

Infinite lists aren’t unusual in Haskell. In fact, the standard library (called the Prelude), has several functions designed to help you create infinite lists.

Needless to say, trying to do this in a non-lazy language is a recipe for disaster. Your program will run until either the heat death of the universe or it runs out of memory (whichever comes first) building the infinite list and will never get around to actually using it.

This is at the core of why it’s worth studying other programming languages, even if you don’t expect to use them. You can often learn new ways to look at problems that you’d never even consider if you stick with a single language. No C programmer would ever compute Fibonacci numbers by constructing a list of all of them, but in Haskell, it’s downright natural.

New WordPress hotness

Since I finally went ahead and upgraded the site to the latest version of WordPress, I finally made a few tweaks to my ugly-but-functional theme to take advantage of some relatively new features. In particular, the sidebar over to the right is being managed as a series of widgets, instead of all being hard-coded into the theme. Doing that also gave me the opportunity to put up a tag cloud, which I believe all the cool kids started doing a couple years ago. Note that only posts I’ve made since upgrading to 2.3 have been tagged (since that’s when WordPress added native support for tags), so don’t think the cloud is going to give you an extensive archive.

And since I was mucking about in the theme, I also added some CSS that plays nicely with Vim’s :TOhtml command (with let html_use_css = 1 somewhere in your .vimrc). The result gives me an easy way to syntax highlight the code I post, like this:

#include <stdio.h>
#include <stdlib.h>
 
static unsigned long long
fibonacci (unsigned int which)
{
        unsigned int i;
        unsigned long long a = 0;
        unsigned long long b = 1;
 
        if (which < 2)
                return which;
 
        for (i = 2; i <= which; i++)
        {
                unsigned long long tmp = a + b;
                a = b;
                b = tmp;
        }
 
        return b;
}
 
int
main (int argc, char *argv[])
{
        if (argc >= 2)
        {
                int which = atoi(argv[1]);
                if (which >= 0)
                        printf("Fibonacci number #%u is: %llu\n", which, fibonacci(which));
                else
                {
                        fprintf(stderr, "Must give an nonnegative integer\n");
                        return EXIT_FAILURE;
                }
        }
        else
        {
                fprintf(stderr, "usage: %s number\n", argv[0]);
                return EXIT_FAILURE;
        }
 
        return EXIT_SUCCESS;
}

Yeah, hardly the most exciting code for a demo, but easy syntax highlighting will come in handy later.

As with most upgrades, if something broke, let me know.

Stowaway!

The Duck

You see, there’s this duck.

It’s a little stuffed Aflac duck. When you squeeze it, it says “Aflac. Aflac. AFLAAAAAAAC!”

Back when Benji and I were roommates, we used to find creative ways to pass it back and forth. For example, one time Benji came back from class to see The Duck sitting on his laptop’s keyboard, looking at duck porn. Another time I found that The Duck had hung himself in my closet, complete with suicide note. (Which eventually led to the infamous Naked Yogurt Time incident, but that’s another story.)

But that was all two years ago, during my final year at Purdue, finishing my Masters’ degree. These days, several hundred miles of separation kind of makes it harder to do that sort of thing.

Anyway, upon returning from a recent business trip, I found that my checked bag had won the TSA lottery. Aside from having the mandatory “yeah, we looked in your bag, deal with it” note (I’m loosely paraphrasing here), everything seemed pretty much how I left it. However, after unloading the clothes, I noticed that the garment bag that I normally leave unused in the bottom look a bit higher than normal. I lifted it up to reposition it, and underneath I discovered…

The Duck.

I can only assume that when I visited Purdue last month, someone snuck The Duck down there when I wasn’t looking. I didn’t notice anything when unpacking from that trip, since the way the bag is shaped, there is a little space beneath where the garment bag goes. Which means The Duck spent several weeks in my luggage, in my closet, with me none the wiser, and if not for TSA it’d still be there.

I can only imagine what the TSA guy rummaging through my bag must have thought when he found The Duck in an otherwise painfully dull bag. (Clothes, shoes, more clothes, toiletries, and wait, something’s hidden down here, aha, it’s… a stuffed duck?!)

Actually, The Duck does have a funny story about that, but I’ll let The Duck tell it for himself.

[And since I couldn't resist the pun in the filename, you can also listen to The Duck with lossless audio compression, fully capturing the richness of sound provided by the cheap little microphone that came with holly.]

Now The Duck is out of my luggage, and perched atop my backup hard drive. I told him he’s welcome to stay as long as he likes, as long as he stays away from those two pidgeons that hang out on my balcony. They’d be a bad influence on him. I mean, you can’t make a mountain out of a molehill, but you can make a mountain out of the mounds of pidgeon droppings they’ve been leaving. Seriously, it’s three-dimensional, and I can’t have The Duck pulling that sort of thing indoors.