[ Content | Sidebar ]

isolated podcast episodes

June 9th, 2007

I recently ran into a couple of interesting episodes (if that’s the term) of podcasts that I don’t regularly listen to. Hanselminutes had an interview with Martin Fowler and David Heinemeier Hansson; great stuff. Lots of good talk about design, beauty (I didn’t know that Japanese Ruby code apparently has a rather different aesthetic than American and European Ruby code), constraints.

One of my favorite moments was in a talk about naming: my understanding is that, in general, the Rails codebase is quite small, but apparently they spend some time on automatically generating plurals of English words, handling various exceptional cases, just to get table names and the like right. The reason why this struck a particular chord with me is that I actually have lines like this in my code:

  class AuthorWriter < Writer
    names(:authors, "AUTHOR")

Here we have various forms of “author” showing up three separate times; tomorrow, I’ll probably get around to adding a fourth time. Some of this is me being needlessly varied in my naming conventions, and maybe I’ll clean that up once I have the codebase converted from Java to Ruby and can get back to altering the database; having said that, I do want a table named “authors” and a class with “author” in its name, so some duplication will remain that would go away if I had a pluralization engine around!

The other neat one-off podcast was an interview by John Udell with Leonard Richardson and Sam Ruby. The two of them just wrote a book on RESTful Web Services, and I’d been thinking I should check it out from the library; I’m now thinking that I should buy a copy and read it sooner rather than later, because I’m starting to think more about that sort of thing, and am realizing that I have a lot more questions than answers.

The above are two of the podcast episodes that I’ve enjoyed the most over the last month or so. But I’m not going to subscribe to either podcast: most of the episodes are on topics that I’m not interested in, and iTunes doesn’t provide a particularly good mechanism for me to subscribe to a podcast feed but only grab isolated episodes. (You can do it, it’s just not natural.)

What I’m doing (at least for now) is subscribing to the podcasts in Reader, so the feeds get mixed in among my regular blog reading; if I see individual episodes that I like, I can copy them over to iTunes. Which also doesn’t work very well with iTunes: if the podcast is available through the iTunes store, then it’s easy enough to grab individual episodes once I’ve decided I’m interested in them, but if not, then iTunes sticks the episodes with my music instead of my podcasts, with various unsatisfactory consequences. Sigh.

Anyways, the main thing that I’ve learned is: I need to keep my antennae open for podcasts that I’m not interested in most episodes of, but that have occasional episodes that I’d quite like: I’m sure there are a lot of such podcasts out there, I just don’t know about them. Unfortunately, it’s not so clear how I’ll learn about them—I learn about new blogs by reading articles that are linked to from other blogs, but blogs don’t link to podcast episodes as often. Still, now that I’m actively looking for them, I doubt it will take too long before I have a reasonable stack of podcasts to choose from.

At which point, I suppose, I’ll have to prune my list of podcasts that I listen to every episode of, because I don’t have a whole lot of slack in my iPod listening time. (In fact, my queue was pretty out of control between the time I got back from vacation and three or four weeks ago.) But I’ll deal with that when it becomes a problem…

bad fsck!

June 9th, 2007

I just rebooted my computer, and it decided that some of my filesystems needed to have fsck run on them. (It had been more than 20 reboots since they were last checked.) And fsck decided to hang 4.6% through the initial check on one of them. Rebooting didn’t help: after every reboot, it noticed that it hadn’t checked the filesystem recently, checked it again, and hanged at the same place. (To be fair, I don’t know if it’s an fsck problem, a kernel problem, or what.)

No idea what went wrong, or how to fix it; I’ve e-mailed the author, and perhaps he can give me some suggestions. (It’s reproducible, and I’ll be happy to go through a few rounds to try to debug the issue.) Fortunately (I suppose?), the filesystem in question is where my backups live, and it doesn’t even include (either of) the backups of my home directory, so I can live with potential corruption indefinitely if necessary. Still, it doesn’t make me happy.

If anybody else finds themselves in this situation, a workaround is:

  • Make sure your computer has a root password, and you know it! (Not always the case in this sudo world.)
  • Type Ctrl-Alt-Delete when you notice the hang, and log in with the aforementioned root password.
  • Edit the line in /etc/fstab for the corresponding filesystem and set the sixth column (fs_passno) to zero
  • Reboot.

If you don’t know the root password, hopefully you have some sort of recovery DVD that you can boot from to get to where you can edit the fstab.

punch-out

June 7th, 2007

Punch-Out (or rather, Punch-Out!!, which actually apparently came in two versions, Punch-Out!! Featuring Mr. Dream and Punch-Out!! Featuring Mike Tyson, identical except for the sprites and perhaps sounds of the final opponent) is an NES game that I’ve been hearing about for a long time. So when it showed up on the virtual console and I was running a bit low on games to try, I thought I’d give it a try.

The virtual console buying experience was a little tedious, though I suppose it wasn’t any more tedious than necessary for a credit card purchase through your TV. (I don’t think I even had to enter my full mailing address, though I did have to enter my county.) I hope Nintendo is remembering most of that information on a secure server somewhere, so I don’t have to re-enter all of it the next time I refill my points. The download itself was very fast, which in retrospect is completely unsurprising given the size of NES ROMs.

And then there’s the game. It was fun. Nominally a boxing game, but it was mostly about pattern recognition. To start off, you have simple patterns: your opponent might be just standing there blocking most of the time, so you can’t do any damage. (And vice-versa.) But sometimes he pulls back his arm. If you just stand there, you’ll get hurt. But if you dodge, he’ll miss, and then you can punch him four times in a row before he’ll managed to block you again.

As you progress, of course, this gets more elaborate. In particular, later opponents often have special moves that knock you down with a single blow if you don’t do exactly the right thing (which can take a while to guess and can require precision to pull off), but if you do do the right thing, you’ll typically knock them down with a single blow instead.

I played through the first two series of opponents. By the end of the second series, I was getting a bit tired, though. That series was four opponents long; it took me ten minutes or so to get to the last opponent, and if I lost to him, I had to go back and fight the next-to-last opponent again. And if I lost three times, I had to start the series over. This meant that I only got a few chances each hour to try a new counter to the last opponent’s special move. Which was okay, actually, but when I got to the next series, and learned that it was six opponents long with the average difficulty higher than before, I could read the writing on the wall, so I stopped there.

Still, I can see why people speak favorably of the game. I enjoyed the time I spent on it; if I’d had more free time and less spending money, and was living in an era of primitive video game design, I doubtless would have finished the game. Sure, it’s no Super Mario Bros. 3, but what is? As it was, it was a fine way to spend a few bucks and a few hours; and I’m pretty sure I stopped playing at the right time.

more memory

June 6th, 2007

I finally got around to upgrading my Ultra 20 from .5GB to 1.5GB. Sun’s web site wasn’t very useful in trying to understand the machine’s somewhat picky requirements (something about the Opteron memory controller requires matching DIMMs, I believe), but fortunately Crucial’s excellent memory finder was up to the task.

As with the x2100, the DIMM slots were pretty stiff; I would have been nervous I was about to break either the DIMM or the motherboard if I hadn’t gone through this before.

Kind of amazing that I’ve survived more than a year with only .5GB of memory and with rarely running into much swapping, especially given that I run it 64-bit native. Or maybe not: it’s not like I’m doing much with the computer that I wasn’t doing with computers a decade ago. And .5GB of memory is 10,000 times as much memory as my first computer, though that one was admittedly not up to running Emacs or a web browser.

good pitching

June 6th, 2007

A couple of months into the season, I was not expecting the Harden-less A’s to have the 1st, 3rd, 11th, and 18th slots in AL starting pitcher ERA.

I am not, however, surprised that, despite that pitching performance, the only reason they’re four games over .500 is that they’ve won their last five…

The Indians are suffering from no such unbalance, fortunately.

this american life; iraq

June 5th, 2007

When I first started listening to podcasts, I checked to see if This American Life had one: I very rarely listen to the radio, but it is one show where I regret reaching my destination if it’s on the radio while I’m driving. Unfortunately, a podcast wasn’t an option: you could listen to the show for free over a streaming player, or you could pay to download episodes, but neither of those was a solution that I was willing to use.

I checked again recently, and I was pleased to discover that they’d added a free podcast. They only make the last week’s episode available at any given time, so you can’t use it to delve into their back catalog, but that’s okay with me.

The episode that I listened to on the way to and from work today, The Center for Lessons Learned, had some really striking moments. (It’s already vanished from the podcast feed—I didn’t get around to listening to it last week—but there’s always the streaming version.) The title is taken from an Army office whose job is to learn from the past; what a neat idea! In general, the episode is about things we might or might not have learned, taken from issues surrounding our current war.

About which, some random thoughts.

It seems to me that there might have been two defensible reasons to support going to war in the first place: either you thought it would be good for the American people, or you thought it would be good for the Iraqi people. I didn’t support the war at its inception because I didn’t believe either of those reasons: “good for the American people” in this context basically meant some combination of fighting terrorists plus preventing WMDs, and even at the time you could see Bush’s active dishonesty behind his claims to that effect if you just poked around a bit. (Saddam Hussein and al Qaeda working together? Give me a break. The Democrats still have a lot to answer for, in my opinion.)

Good for the Iraqi people was a bit harder. (And almost entirely absent from the administration’s original justification, though they’ve tried to stick it in there retroactively.) I’m quite willing to believe that Iraq was very much not a place where I’d want to live, and that the Iraqi people would have been better off with another government in place. From a pragmatic point of view, though, I wasn’t particularly convinced that we’d do a great job of bringing in a better government. I wasn’t sure, though, and the truth is that the pragmatic argument wasn’t what was important to me: it didn’t seem to be my job, or my government’s job, to tell the Iraqi people that they’d be better off with us changing their government. If I had reason to believe that the Iraqi people wanted to be invaded, I would have supported it; in the absence of such a belief, the idea of invading them for their own good seemed patronizingly paternalistic (at best).

Still, I didn’t have any particular foresight as to how things would actually turn out. Before the war, I read some articles saying that it could turn into another Vietnam; I didn’t seriously consider that the authors could be right, and was surprised at how quickly we won the war. And then things got worse, and I started to be more impressed by those articles. Now, my feelings are a bit more complex: it’s turning into a remarkable misadventure, and I’m sure many productive analogies with the Vietnam War could be made, but (from my naive point of view) the details seem quite different: here, we’ve conquered a country which is now fragmenting and descending (has descended?) into civil war, while there we never managed to defeat our single, well-organized opponent.

That is the past; the question now is: should we stay or should we go? Again, the possible justifications are the same. This time, though, few people seem to be able to take the “good for America” argument seriously. (Other than in the sense of “our ego would be bruised if we left”, a justification for war and occupation that I consider morally abhorrent.) The “good for Iraq” argument gets more plausible, despite our amazing attempts to undermine that. (Free tip to future occupiers: if you claim that you’re invading a country to save its people from being tortured in its dictator’s prisons, you should avoid torturing its people in the prisons that you set up!) While things are awful now, it seems plausible to me that if we leave, matters will get even worse in the short term, quite possibly a lot worse, and who knows about the long term.

But I still have the same misgivings about that justification as I did when starting the war. What it basically comes down to now is “you broke it, you bought it”. The problem with that here is that I don’t think the Iraqi people consider their country to be for sale. I’ll listen with respect to any case for “you broke it, you make it right”, as long as the discussion for what it means to do to make it right is focused on what Iraqis actually want. If they want military support, sure. If they want police support, sure. If they want training, sure. If they want goods, money, sure. But it has to be about what they want, not about what we want, not about assuaging our guilt by continuing to occupy their country over their desires. (And, it goes without saying, not about a desperate attempt by our president to cover his ass while simultaneously burying his head in that same ass.)

But what do I know about what the Iraqi people want? For one thing, they’re individuals, not some collective hive mind. For another thing, being human, they doubtless have conflicting desires; what if they want both to avoid further chaos and to not be occupied, and what if we can’t figure out a way where our departure won’t make things worse? Not good. Despite which I continue to think that the contradiction is the Iraqis to resolve, not ours. And that an urgent issue is to figure out what a cross-section of Iraqi society thinks would be best to do next. (And no, a puppet government doesn’t count as an adequate representation of a cross-section of Iraqi society.)

Having said all that, I can understand why others might say that, if we’d managed to get Hussein out and a good government in place, even over the Iraqis’ protests, it would have been worth it. Sometimes people need to get extricated unwillingly from a bad situation through an outside intervention, and if that’s true for people, why can’t it be true for countries? After all (as always, based on my admittedly shoddy understanding of history), we’ve done occupations and reconstructions successfully before: as far as I can tell, our postwar reconstructions of Germany and Japan worked out great. (Except for the whole partitioning Germany thing; I’ve been given reason to believe that we might have been able to avoid that, but I’m not an expert on the details.)

One of the sad things about the podcast was listening to people talk about how it could have gone better, if we’d just spent some time learning about what we were getting into and about similar situations in the past. Of course, prediction is always easier when it’s about the past, but there were people who had spent a lot of time studying what happens after wars end, and what actions lead to better outcomes, what actions lead to worse outcomes. But those in charge were too full of their messianic dreams to admit the possibility of imperfection (let alone disaster): in such situations, planning, learning, thinking is shunned as evil.

Can we do anything now to salvage outcomes? What lessons can we still learn from the past? I wish I knew; I wish much more that the people who are making decisions knew. But the debates seem completely uninformed by such studies, as far as I can tell. And I’m too lazy to do much digging on my own; so I to will fall back to my default position that being there isn’t good for us, and (much) more importantly the Iraqis don’t seem to want us there, so we should respect their wishes, get the hell out of there ASAP, start trying to heal our country and let them try to heal theirs.

puzzle quest

June 4th, 2007

Puzzle Quest is a combination of two genres that I quite enjoy separately, but never expected to see together: RPGs and puzzle games. Seemed like just the thing for me and, probably for Liesl; which latter guess proved correct, as evidenced by the fact that she’s sitting on the sofa playing it as I write this.

I liked it, too. The core gameplay mechanic is based on Bejeweled, an apparently phenomenally popular puzzle game that I’ve missed out on because of my console focus. There’s a screen full of different objects; you have to swap adjacent objects to make three (or four or five) in a row or column, at which point they disappear and the objects above them shift down, with new objects appearing at the top to take their space.

You use this mechanic to battle enemies, alternating turns on the same grid. One of the kind of objects is special: if you match skulls, you damage your enemy. Also, if you get four (or five) in a row, you get an extra turn. So the basic algorithm is pretty mindless: if there are any four-in-a-rows you can create, you match those first. Otherwise, if there are any skulls to match, you match them. Otherwise, you match something else.

And the something else is where more of the fun comes in. Some of the other objects to match are kind of boring: extra gold, extra experience. But there are also four colors of spheres that you can match to build up “mana”, which you can use to cast spells. And these spells are built into the gameplay: no matter what type of character you choose, you still have access to a wide range of spells (the fighter’s spells are just more focused on doing damage than, say, the mage’s spells), and you can get access to more via other means (capturing monsters, riding a mount). My favorite spell, for example, was one that did some damage to my oppenent as well as causing it to lose a turn. I tried to always have enough mana in reserve to be able to cast it: when I saw a move that looked great except that it would set up an attack for my opponent, I cast that spell first, giving me two moves in a row.

All in all, a good puzzle game. Not Tetris, or even Bust-A-Move, but enough to keep me happy for a while. As far as the RPG elements go, though, I was pretty nonplussed at first. The plot is, to be gentle, less than compelling, and there’s no wandering around towns. Or dungeons or overworld: you just move from area to area on the world map. Which is, of course, a time-honored tradition in alternate forms of RPGs (strategy RPGs and the like, e.g. Ogre Battle or Fire Emblem), but not what really draws me to RPGs.

Still, it was fun, and once I got twenty levels or so into the game, I was pretty well absorbed. (Not as much as Liesl: I had to wake up early in the morning on weekends to get to the DS before her.) A solid gameplay mechanic, enough plot trappings to hold my interest. And they made some good choices: for one thing, if you lose a battle, you can simply fight the same battle over again. So there’s no extra state that they try to preserve, no arbitrary penalties thrown in: you start every battle with full hit points. Also, they mix up the gameplay: battles aren’t timed (by default), but you get timed battles if you level up mounts, there’s a logic puzzle mode to capture monsters, there’s an endurance mode to learn spells from captured monsters.

And then, as I got into the final series of quests, I noticed that I’d stopped leveling up once I hit level 50. And my class’s level 50 spell, together with the spell I mentioned above, made me pretty much unbeatable. By this time, I’d put enough time in the game (20 hours? 30 hours?) that I was happy to just see it to the end, without finishing off every side quest. (Liesl’s finished them all off, though, and liked them.)

Quite good game. Which fits in well on the DS, too: no reason not to play it on a portable system, and it uses the screens and stylus well. (Having said that, apparently it works just fine on the PSP, too.) Nice to see niche games like this not only getting published but apparently turning out to be surprisingly popular.

i love ruby

June 2nd, 2007

Recent non-work programming projects: I’ve been getting back to working on dbcdb, converting the database editing part from Java to Ruby. And, last Tuesday, BayXP had a hands-on session where we all did some pair programming getting us exposed to Behavior-Driven Development in Ruby. (See the RSpec web page.)

I don’t have much to say about the details of this (BDD in particular I can take or leave), but I really enjoy programming in Ruby. I missed the previous month’s BayXP meeting, where they did BDD in Java, but I can’t imagine that the code they came up with was as simple as what we came up with this month. (Even setting aside the fact that Ruby makes implementing BDD easier by letting you add methods to Object.)

And the more I program in Ruby, the more I wonder how I could have been so blind to the fact that internal iterators are so much better than external ones. Or, in general, that I forgot how wonderful creating functions on the fly could be; while I still maintain that destructors are a fine thing, I don’t feel their lack in Ruby the same way I do in Java because I can write functions like

    def perform_and_close
      begin
	yield self
      ensure
	close
      end
    end

which I then use as in

    def edit(id, db)
      db[table_name].perform_and_close do |table|
	write_row(table.find_id(id)[0])
      end
    end

(And yes, you can put the body on one line, with slightly different syntax: I only wrote it that way to avoid making the lines too long.) Which really isn’t any more typing than creating and using an RAII class in C++. (For this example, at least; I don’t have enough experience yet to make general statements.)

I need to get back to programming on the weekends. I’ve done it twice in a row, which is a start; a streak worth continuing.

that was unpleasant

May 27th, 2007

Following a suggestion from Chris, I gave the desktop effects from Ubuntu 7.04 a try; not the nicest experience. To be fair, it warned me that the feature was experimental, and gave me a chance to turn it off right after selecting it; for better or for worse, though, I didn’t realize immediately that something had gone wrong. (I’m not sure that turning it off would have helped, though, in retrospect.) Basically, turning the effects on collapsed my windows from all my desktops onto a single desktop (which I didn’t worry about, I (correctly) figured that I could move them back manually), but also removed my window manager decorations. (E.g. the bar at the top with the window name, close box, etc.)

I put my windows back where they wanted; that let me see a rotating cube animation which kind of made me roll my eyes. (Not sure if I would have left it on or not.) Playing with windows and menus was weirder, though – there was this strange shaking effect, which was actively annoying. I could have just turned that off, but the box animation bit by itself wasn’t enough for me to want to use these effects, so I looked for a way to turn it off and restore my windows back to normal.

And I couldn’t find one. There were boxes to uncheck, so the effects went away, but my window decorations never came back. In retrospect, I suppose my window manager simply crashed, and maybe I could have found a way to relaunch it; I decided instead to log out without saving my session.

And then I logged back in, and still no window manager. To make things worse, the logout button stopped working! After randomly fiddling with things for a while, the logout window popped up; not sure if I triggered with it (by selecting a random, unrelated, system administration menu item??) or if there was some timeout.

The second time I logged out, I brought up a text console, did an ls -alrt, and restored the recently changed directories from backups. (Yay backups.) After logging back in, my window decorations were back, but not all of my startup items were there, and again I couldn’t log out! After a minute or two, though, the logout screen appeared, along with my remaining startup windows, and it’s been fine ever since. Not sure what happened to heal matters; I am not planning to experiment further.

All in all, I am nonplussed. For one thing, the bug (or bugs?) that I ran into were pretty bad; not clear how I would have fixed this if I weren’t backing up my home directory every night, and even with that, there were some delicate moments. Still, I’m willing to accept that there might be something weird about my configuration that’s triggering problems, though I’m not sure quite what, and they did warn that the feature is experimental. (It must work better for Chris than it did for me…)

Setting that aside, though, the feature is crap. It has two parts, one of which is meh and the other of which is actively annoying. Maybe this is a sign that desktops and fancy graphics cards don’t mix too well, but I can’t completely convince myself of that: translucency, properly done, can be kind of neat in a desktop, and I can imagine shadows and perhaps even mirroring having a place. But there was no sign of that, just shaking menus.

Not ready for prime time.

i don’t completely suck

May 27th, 2007

After my post yesterday, I picked up Gradius III again; this time, on my first try, I not only made it through the first level for the first time, I made it through the second level on that same first try. The latter is a fluke, but I am managing the former fairly reliably now. Though not as reliably as I’d like: I need to improve my strategizing/memorization. And to play the game in situations where there are few distractions from daughters and dogs: you really have to focus when the ships and bullets are flying.

I quite like the Wii classic controller, by the way. Great for games like this, with a huge D-pad.

And I made progress on Etrian Odyssey today. On the off chance that anybody reading this blog is going to play it, I will warn Spoiler Ahead! Namely, the monster at the start of the third level really is way too hard for you, but you can avoid it if you’re careful and make it to other parts of the level. Interesting touch, and I still find it a bit nerve-wracking; I don’t recall seeing a game before where most of the monsters are invisible random encounters but where the major monsters (rare, but more frequent than even mini-bosses from other games) are visible on the map and move around. So now I’m happy again: leveling up wasn’t that bad (it gave me some things to think about, since you really do have a lot of options in how you customize your character), but the real reason why I bought the game is so that I can explore the dungeons and draw maps.

I suppose I should explain the game a little further, given that I seem to be talking about it. It’s a dungeon crawler, targeted at people who spent the 1980’s mapping out dungeons (and other areas) in computer games. The nearest analogue that comes to mind is Wizardry: it’s all about delving deeper and deeper into a single dungeon, with a town at the top that exists only to give you a place to rest, save, get items, and reorganize your party. And by “mapping out”, I really do mean mapping out: your view is on the top screen, while the bottom screen contains a map that you have to draw yourself with the stylus. By default, the game will color in the floor squares that you’ve walked on, though you can turn that off; it is entirely your responsibility, however, to draw in walls, stairs, doors, chests, etc. (There are icons provided for this purpose, which you can drag to the map.)

As far as the party goes, you’re in complete control – no acquiring new characters through exciting plot developments or anything like that. You can create as many different characters as you want, choosing from nine classes (only seven are accessible to me now, though I have ideas about how to get the latter two); the leveling up system improves your basic characteristics automatically, but it also gives you customization options in terms of which spells to learn, which extra skills to buff up, etc. Quite nice, and means that, in practice, two characters from the same class can play rather differently should you choose different paths to level up along.

Plenty difficult, too – it’s not too hard to get into situations where some of your party is dead and the rest of you are trying to make it back up to the exit, and it’s also not too hard to get your whole party wiped out when exploring a new area. You definitely have to think about your approach to some of the monsters; I’m looking forward to having a well leveled-up party, where I’ll really have a range of approaches to consider when tackling a fight. I wouldn’t want most RPGs to be like this, but I can get into class/party management occasionally, and I really like the map-making aspect.

i am teh suck

May 26th, 2007

Just started playing Etrian Odyssey and Gradius III. And both are kind of kicking my butt. I seem to remember being decent at the latter’s predecessor, and finding its initial levels routine; not sure how much of my troubles are that the sequel may be harder, how much are due to my declining powers, and how much are that I need to memorize where every enemy enters the screen before the game will click.

As far as the former game goes, not sure exactly when I’ll get good enough to beat the tough monster at the start of the third level of the dungeon. Having enough fun right now leveling up characters from all the different classes, though, to maximize my options.

Happy with both purchases for now.

feisty fawn

May 20th, 2007

I just upgraded to Ubuntu 7.04; seems to have gone smoothly. Haven’t noticed any vast improvements, but that’s fine: I’d rather have a distribution that subtly improves frequently than one that saves up for big bang changes. Nice to be able to do it (in a supported fashion) by downloading packages over the net, instead of having to burn CDs/DVDs – that’s one aspect of Fedora that I don’t miss.

wii play

May 19th, 2007

Wii Play is a fifty dollar game packaged with a forty dollar controller. There’s not much point in buying it if you don’t need an extra Wii controller; if you do need an extra controller, however, is it worth paying an extra ten bucks to get the game as well?

My answer: sure, why not, but it doesn’t make a big difference either way. It’s a collection of nine minigames, each of which can be played with one or two players. I played through them all once with Miranda; we basically enjoyed it but weren’t blown away. I played through them all again in single-player mode, some of them more than once. I didn’t mind any of them (well, Find Mii was annoying at times), some were rather fun (Billiards, Tanks). I might have spent more time on it if, in the modes that get progressively harder, it had taken less time to get to the difficulty level that I found enjoyably challenging.

So I’ve spent maybe three pleasant hours playing the game, and I have a collection of two-player minigames that might get picked up again in the future. Fine for ten bucks (and I’ve already used the extra controller, my fourth one, so I’ve gotten use out of that aspect of the package, too); people without video game experience might appreciate the way it’s structured as a controller tutorial. (To that end, a Wii plus Wii Play would be a very good combo for some people: a console, two good introductory games, two controllers.) In general, though, not something about which I feel like going into depth here (any more than in real life).

weinberg quotes

May 19th, 2007

I’m in the middle of rereading Gerald Weinberg’s Quality Software Management series, which is motivating me to type various quotes on mailing lists that I’m on. Not sure that they’ll do much without the context (actually, I have no reason to believe that they did much for anybody even with the context!), but if I’m going to go through the trouble of typing it out once, I might as well reuse the effort.

From the first volume, Systems Thinking, p. 110:

I once was called in to consult on a troubled project that was missing all of its goals, much to the puzzlement of its project manager, Simon. As part of my visit, I attended a code review meeting that (against my advice) Simon also attended. Herb, whose code was being reviewed, took a lot of personal abuse from Simon to the point where his eyes started watering. I called for a “health break,” and during the break, Simon came up to me and asked, “Does Herb have something in his eye?”

“Why do you ask?” I replied.

“Well, I noticed that there was water coming out of his eye.”

From the third volume, Congruent Action, pp. 60–61:

If you are acting incongruently, you are likely to trigger incongruent reactions in others. Rather than blaming them for incongruence, ask yourself, “What could I be doing to contribute to their behavior?” Here’s how it worked for Parson, one of my students:

“I was telling one of my project managers that I had to see a plan to get her project back on schedule. As she handed me a folder containing her revised project plan, I became aware that the papers in her hand were rattling. That caught my attention, and I thought, ‘How strange that the papers should rattle like that.’ Looking for an explanation, I noticed she was trembling, that her face was ashen, and finally that her eyes were wet.

“My first thought was, ‘Oh, she’s sick!’ but then I remembered the idea from class that she might be reacting to me. That seemed ridiculous, as I thought I was merely talking to her normally, but I decided to check it out.

“The first thing I noticed about myself was that I was gripping the edge of my desk as if it were a safety rail between me and the Grand Canyon. I thought I should loosen my grip, but then I realized I would probably fall on my face toward her if I did. All this while I continued talking to her about the project plan, until I noticed that I was actually shouting and banging my other fist on the desk. That’s when I had my big AHA!”

From the second volume, First-Order Measurement, p. 109, defending the definition that “Quality is value to some person”:

Why is this definition so troublesome to some people? There are people in the world whose strongest desire is to find perfection, the one right way. Many of these people choose to work with computers, and particularly with software. They don’t like the idea that quality is relative – to people, to place, to time – but it is.

And again from Congruent Action, p. 196 this time:

Avoiding blamers works if you don’t have to deal with them again, but this is exactly the opposite of engaging. If your work requires that you engage the blamer, you need to learn the method of the aikido masters when dealing with all forms of attack, including blame:

When someone hits you, he is extending his ki toward you and it starts to flow when he thinks he will hit you — even before his body moves. His action is directed by his mind. You don’t need to deal with his body at all if you can redirect his mind and the flow of his ki. That’s the secret; lead his mind away from you and the body will folow.

In aikido, you lead the mind away by physical means, though these are always as gentle as possible. The idea is not to further upset the person or draw more attention to yourself, as stiff resistance or a punch would do. In fact, skilled aikidoists often disable their attackers without even touching them, which of course is what you want to do with someone who is blaming you.

Blaming can be handled in the same way, first by yielding, but in such a way that the blame is unable to harm you. Done properly, this surprising move engages the blamer’s mind, so that you can easily change its direction. For example, suppose that an employee blames you for his failure to develop a specified function. “You didn’t tell me that this function was part of the spec,” he screams. Although you remember telling him, you don’t try to deny the allegation, which only focuses his blame more firmly on you. Instead, you may say, “If you didn’t know it was in the spec, I can certainly understand why you didn’t develop it.”

Saying this, you have agreed with his anger without accepting his blame. Next, you redirect the energy of this blame (the ki, in aikido terms) into something more productive. You have aligned with his energy, so you can push from behind rather than resisting it from the front. You might say, “What’s the best way for you to be informed of functions to implement?” This makes you collaborators, rather than opponents, by turning the energy toward preventing the problem in the future, rather than belaboring the unchangeable past. Even better, you have not become a blamer yourself.

rejection in person; printf debugging

May 16th, 2007

One of the least pleasant aspects of hiring is rejecting candidates. (More actively unpleasant for them than for me, to be sure.) It’s something which, until recently, I did almost exclusively over e-mail.

Sometimes, rejection over e-mail makes sense. I typically put candidates through up to three stages of filters. (Not counting the initial resume screen.) The first stage is a sanity check over the phone: is there some obvious reason why this situation is a misfit that I didn’t figure out from the resume? Almost everybody makes it through this stage; in the few places where a candidate doesn’t make it through this stage, it’s because it’s clear to both of us that their goals aren’t a fit for this position, so we agree that it’s not a match, and it’s simply not a matter of me rejecting them. (One could argue that I should make my phone interview stricter and reject more candidates at this stage; for better or for worse, I’m not doing that yet, and it’s tangential to the issues in this post.) The third stage is a half-day team interview; in this situation, my team discusses the candidate as a group after the interview is over (usually the next day), so I’m simply not in a position to deliver an immediate verdict to the candidate.

The second stage is the tricky one. This is a one hour in-person interview, where I ask some questions and have the candidate do a bit of programming. Sometimes, after the end of the interview, I’m genuinely not sure whether or not I want to bring the candidate back. More frequently, however, I am sure, and the answer is “no”. I can’t remember having second thoughts about my initial no reaction at this stage, so why not deliver the news then?

I think my actions started to bother me because of some blog posts that I’ve read recently, but I just looked at the usual suspects, and I couldn’t find any relevant posts. Certainly one reason why I’m thinking about this, though, is that I’m in the middle of rereading Gerald Weinberg’s Congruent Action. I can’t claim that I’m acting congruently in this case: I don’t believe that it makes job candidates any happier to have to wait and wonder for a day or two. Nobody likes being rejected, but you might as well get the news as soon as it’s available. The only reason why I’m delaying is to avoid in-person awkwardness; it’s just a sign of lack of courage on my part, with no obvious benefit to anybody.

So today I rejected two candidates in person. And, actually, it turned out rather well: both were disappointed, but both took it well, and both asked for advice about what they could have done better. In retrospect, it seems that I haven’t been saving myself any grief: all I’ve been doing is elimimating a potential learning opportunity for the job candidates. (Which raises the question: what learning opportunities might my actions in this regard be costing me?) Nice to have immediate positive reinforcement like that: I will try to continue to behave this way in the future. (And I should spend some time thinking about how to politely reject people in person.)

To be sure, I don’t claim to have any great pearls of wisdom on what the candidates could have done better. But, in time-hallowed blogger tradition, I won’t let that stop me from sharing my thoughts on the subject. The interesting thing about this case was that both candidates failed for the same reason: neither was completely hopeless, their initial attempts at a solution were both reasonable, but both floundered significantly when debugging. (Learning about people’s debugging skills is actually my goal in the programming question: I’m always a little disappointed when people solve the problem without making a mistake, because I know that, no matter whom I hire, they’ll make programming mistakes with some regularity, and I want to see how they deal with that.)

And, in both cases, it seemed like they didn’t know what they were looking for when debugging, or indeed when testing the program before discovering that debugging is warranted. (I tell them to implement a function and do enough testing to convince themselves that it was correct.) I suspect that both of them could be helped by taking a more scientific approach to debugging.

Sometimes, scientists are just gathering data: poking around, seeing if they see anything interesting. But science really progresses when people are making and testing hypotheses. Make a prediction that is concrete enough to be testable, to be falsifiable, and then test it. If the test results match your prediction, that’s always fun; if not, though, you’ve still learned something concrete, and can use that to make further hypotheses.

And this works for debugging, too. At the very basic level: if you think something is wrong with your code, you should know what you expect to have happened, so you can tell whether or not something really did go wrong! But it helps to make concrete predictions at a more refined level than that: “we know that something went wrong overall because we saw X instead of Y. If the problem isn’t in this part of the code, then expression E should have value V, whereas if it is there, then E should have a different value”. If you do this a few times, you should be able to zero in on the problem quite quickly, much faster than you could have by just looking at the code and hoping for inspiration.

This helped crystallize one thing that I think is wrong with printf debugging. Many people’s first reaction, when confronted with misbehaving code, is to sprinkle printouts throughout the code and hope that enlightenment results. This can be great, if you have specific hypotheses about what the output of those messages should be. I think that many people, though, don’t really have specific hypotheses in mind, just a vague feeling of values that they’re interested in. When this happens, printf debugging doesn’t lead to answers very quickly: the messages give you a lot of data, data that can easily lead you down all sorts of unproductive paths, data that can fool you into thinking that you’re learning something when you don’t really know what that data represents. (I suspect that debugging with a debugger is less likely to lead to this problem, if only because it takes more effort to generate lots of values, so you’re more likely to spend time thinking about what values you want to generate.)

Maybe I’m unfairly characterizing printf debugging, but I will stand by the value of concrete hypotheses when debugging. Which raises the question: if it’s so good when debugging, can we use the same ideas when writing new code, code which we don’t yet have reason to believe is incorrect? The answer is yes, of course: that’s exactly what test-driven development is all about.

misplaced hiring confidence

May 15th, 2007

A bit from Bob Sutton’s Weird Ideas That Work (pp. 59–60) that caught my eye:

People sometimes get annoyed when I say job interviews are a weak, often useless, way to select new employees. I’ve had executives, middle managers, engineers, scientists, lawyers, a fire chief, and a minister respond with anecdotes that “prove” how skilled they are at using interviews to pick which job candidates will succeed and which will fail, even if others are lousy interviewers. Their confidence clashes with literally hundreds of studies, going back to before World War I, showing that there is rarely much agreement about who should be hired or who will perform best (and worst) when several interviewers talk to the same job candidate. These studies conclude that the typical “selection interview” is a bad method for deciding which employees to hire. A much better way to pick good employees is to just see if they can do the job, or at least crucial parts of the job – to give them “job sample tests.”

Most companies interview candidates something like this: An untrained interviewer leads a job candidate through an unstructured, unplanned conversation. No record is kept of what questions were asked or answered, and the person who ultimately makes the decision to hire the person – or not – sometimes has only a dim understanding of the job skills needed. Despite these flaws, the interviewer has great confidence that he or she can distinguish between good and bad candidates. Unfortunately, research shows that job interviewing is a lot like driving, where 90 percent of adult drivers report that they have “above average” skills. The truth is that the typical interviewer learns little useful information for predicting job performance beyond what is available no the applicant’s job application and resume.

Another reminder of how much I doubtless have to learn about hiring. (And a reminder that there might be much for me to learn from empirical studies about this and other managerial topics.)

Despite which I insist on continuing to try to hire. Here are my current open reqs. (The reqs should basically be identical; I only link to both of them because I might fill one of them one of these days, at which point that link will go stale.) If you know anybody who lives in the Bay Area or is planning to move here, who has good OO programming skills, and who likes the idea of streaming out 320Gbps of data, please send them my way. Consider this an open invitation: I expect to be hiring off and on for the indefinite future.

eternal sonata

May 15th, 2007

Forget Halo 3, GTA IV, and all that: it’s starting to look like the real reason I’ll get an Xbox 360 this year is that there’s an RPG coming out for it starring Frederic Chopin. Yes, that Chopin. From IGN’s capsule summary:

Three hours prior to [his death], Chopin saw a dream of a fairy-tale land populated by people with incurable diseases but also magical powers.

Now, I ask you: who wouldn’t want an RPG with that as its premise?

(Speaking of works about Chopin, of the first things Liesl and I went to together was a showing of Impromptu. We were supposed to go with our friend Jim Blandy, but somehow he neglected to show up. At first, we assumed he was setting us up, but no, he just forgot…)

finished backing up cds

May 13th, 2007

I’ve finished my somewhat quixotic effort of backing up my CD collection. (Or rather ours: most of them I bought, a few Liesl bought. Miranda’s are, alas, not backed up.) They’re all backed up both on-site and off-site, with the sole exception of Rongchun Zhao: Master of the Erhu. Which last is a pity, since it’s a rather good CD, and it doesn’t seem to be currently available anywhere. (Here’s a video of one of the songs.) Ah well; I’ll have to go out and buy another 8 or 9 CDs, at which point I’ll have an excuse to burn another DVD backup. In the meantime, that CD is stored (lossily) on the iPod in my pocket, so I’ll probably still have a copy if the house burns down.

The full list of artists is below; I’m happy with it. I’m not quite as big a Stravinsky fan as all that, I just have a big boxed set of performances of his music that he conducted, and Wagner only gets so high because I’m counting on a per-disc basis (15 = the Ring), but in general it’s not too misleading.


panini$ ls */* | cut -f2 -d/ | cut -f1 -d- | uniq -c | sort -rn | more
62 bach
29 beethoven
28 stravinsky
27 shostakovich
24 britten
22 mahler
15 wagner
14 beatles
11 gronemeyer
11 freberg
11 anderson
10 brubeck
10 berio
9 guthrie
6 schoenberg
6 janacek
6 bartok
5 lang
5 handel
5 bruckner
4 thomson
4 porter
4 martin
4 dylan
4 brahms
3 webern
3 webber
3 u2
3 strauss
3 simon
3 schumann
3 rameau
3 offenbach
3 oberlin
3 mussorgsky
3 lehrer
3 hindemith
3 gubaidulina
3 groovelily
3 flanders
3 dvorak
3 davis
3 costello
3 charming
3 andrews
2 walton
2 they
2 sweet
2 ravel
2 ragin
2 namco
2 mozart
2 modern
2 lutoslawski
2 lennon
2 klezmer
2 gluck
2 eisenberg
2 dahlstrom
2 coltrane
2 bobs
2 biber
2 bernstein
2 berg
2 amos
1 zhao
1 zero
1 zemlinsky
1 zappa
1 willan
1 weill
1 weavers
1 watson
1 valdes
1 tsuji
1 tonic
1 thomas
1 tavener
1 sweelinck
1 sondheim
1 siberry
1 seeger
1 schmidt
1 saint
1 rush
1 rogers
1 respighi
1 red
1 public
1 prokofiev
1 prince
1 powell
1 picker
1 peace
1 part
1 orff
1 mouth
1 mountain
1 morris
1 messiaen
1 makeba
1 louis
1 lipitone
1 leroux
1 lauridsen
1 indigo
1 horowitz
1 guem
1 grieg
1 gospel
1 funaro
1 elizabeth
1 deep
1 debussy
1 davies
1 copland
1 cooper
1 carter
1 camper
1 bush
1 blue
1 blades
1 ben
1 africa
1 adventures
1 advent
1 adams

grand theft auto iii

May 11th, 2007

I felt a bit uncultured never having played Grand Theft Auto III. I’d played GTA: SA, and was quite impressed by it, but I thought I should go back and see where the series really took off.

And, for a while, I wished I hadn’t. GTA: SA drops you off right in the middle of the plot: you meet up with family and old friends, people have histories, you get dragged right in. Not so with GTA III: you’re an anonymous character with no history, no friends, no connection to the world around you.

And the initial dialogues and settings just seem vulgar. I’m not sure that, taken on its own, it would be any worse than what’s in GTA: SA, but the lack of a plot and the lack of wit makes what I saw as artistry in the later game just seem (uninterestingly) offensive in the earlier game. And, to top it off, the early missions are so short as to be actively boring. (And once they get out of the overt tutorial mode, you see that the interface is rather worse than GTA: SA. Not that the latter game is a model of control…)

So I almost stopped playing two hours or so into it. Around then, though, they started stringing together a bit of a plot, and I started enjoying the missions more. I ended up finishing the first third of the game, but gave up after that, feeling that I had better ways to spend my time. Not that I wouldn’t have basically enjoyed finishing it, probably, but there are enough other games out that I’m curious about that I didn’t see why I should devote much time to this. (Actually, a better choice would be to devote time to movies: it’s a game that I can’t play with Miranda around, obviously, which is also the case with most movies we rent.)

Or maybe I didn’t feel that I would have enjoyed finish it. I almost wish I hadn’t played it: I was reasonably exciting about the forthcoming GTA IV, for example, but now I’m thinking I won’t be up for another one of these games by next fall. We’ll see; it’s not like I won’t have a zillion other great games to play then, after all. (At least if Nintendo keeps their promises. Which, based on past experience, is highly unlikely, but there should still be several really good games out there.)

the recipient can arse it

May 9th, 2007

I was looking at the HTML version of the HTTP standard on the W3C web site today. Apparently there’s a bug in their text-to-HTML conversion program, causing some words to lose their initial letters. Which led to this:

4.If the message uses the media type “multipart/byteranges”, and the ransfer-length is not otherwise specified, then this self- elimiting media type defines the transfer-length. This media type UST NOT be used unless the sender knows that the recipient can arse it; the presence in a request of a Range header with ultiple byte- range specifiers from a 1.1 client implies that the lient can parse multipart/byteranges responses.

Call me juvenile, but I laughed for a while when I read the first part of the second sentence…