Archive for September, 2007

The surprising effectiveness of extreme programming

Monday, September 10th, 2007

Today was my first day out at a client site. On Friday my boss told me I might be going out to a client site today. On Saturday I got my marching orders. So today, I went. I have a week or two of overlap with one of my coworkers who is training me because his wife is very pregnant (as opposed to a little bit) and he expects to go on leave for awhile as soon as the baby is born. I’ll be his temporary replacement. So I don’t have much time to get fully caught up on everything before I end up in charge of things. The whole situation is a mess that I’ve walked smack dab into; a major project with a firm deadline is behind schedule, as well as other problems that aren’t appropriate to talk about. It’s different from the relaxed atmosphere back at the office, and it’s also the only client site that’s within driving distance of the office (meaning no air travel). The commute is longer there though.

But the main focus of this post is Extreme Programming. Since I only have a week or two of overlap with my coworker, and it would take awhile to get everything set up on a new computer, they aren’t giving me one. So my coworker and I are using the same computer. He goes about with his work, taking time to explain everything to me (I think I’m catching on!), and I offer my input whenever I have any. It’s Extreme Programming the way I first heard it defined: two programmers at one computer.

It’s actually going extremely well. I’m surprised by how productive we are. When I first heard about Extreme Programming about six years ago, my naive assumption was that it was a waste. Computers aren’t that expensive, whereas salaries are; why limit people’s productivity by forcing them into situations where only one can be typing away at a time? Now, having actually experienced it, I can see some actual benefits.

It’s all about that old adage, “Two heads are better than one.” I’m not up to speed on this software just yet, so my coworker was the main driver and I was the copilot. But the program is written in Java, and I have a lot of experience in Java, so I was able to offer up some help with that. Also, I caught a few simple mistakes that neither he nor Eclipse noticed right away; for instance, a missing space in a SQL query string. That would’ve been a bitch to debug. I was able to help during debugging; I made several educated guesses about modifications to try to get the code working that ended up being correct. We managed to finish up the code in a single day. Had he been working alone, I’m not so certain it would have been finished.

Whether we did more together than we could do apart is debatable, but it’s certainly not like we were throwing away an entire person’s worth of productivity. I think the resultant code was better, too. We each knew tricks and techniques that the other didn’t that ended up producing better code. Another advantage of Extreme Programming is that it keeps both programmers focused. When I’m programming alone, my attention span is short and my mind easily wanders. But with a coworker sitting at the exact same computer, you can’t really do that, and you feel a strong obligation to continue working because you don’t want to leave your partner hanging. And you can’t exactly goof off by reading tech news sites while another person is sitting at the computer. We worked straight through the whole day, stopping only for lunch, and added significant functionality to the software. Not bad for my first day!

But above all else, there is one severely underestimated advantage to Extreme Programming that I learned today: it allows socialization. I’m bored to tears if I try to program straight for eight hours all alone. Humans are social animals, after all. But programming in a pair is actually fun. We were having a good time, cutting up with programming anecdotes and jokes. It didn’t feel nearly as much like work as programming alone does. And I mean that in a good way, not in a bad way. When you’re having fun, you’re much more motivated to do better, and the hours just seem to melt away as you continue making progress to your goal. So these days we’re programming together look like they’re going to be fun. It’s just that, when he leaves, things will get a lot trickier.

Blogging ideas habits

Saturday, September 8th, 2007

Whenever I have an idea that I think may be worth blogging about, I quickly login to this blog and create a draft with a very short description of the idea as the title (and no post body). Then, later on, when I have free time and feel like writing something, I look through the drafts, pick an idea I feel like writing about, and fill in the post body. Then the last step is choosing a better post title, but I forget to do that on occasion. As an homage to my blogging ideas generation technique, I’m not modifying this post’s title from the original saved idea.

It occurs to me, though, that I could turn my writing process completely on its head. Rather than thinking of the idea and then writing a short phrase to help me remember it by, why not write the short phrase first (maybe even pick it at random), and then expand it into a complete idea? Just looking at my saved ideas now, some of them are very ambiguous if you don’t know what I was thinking of when I wrote them down. Here’s a sampling: Dolphins, Ted, Traveling, Planned spontaneity, and Good planning.

I figure I should try running a random word generator to come up with some ideas, and then try expanding them into full posts. You wouldn’t know it, but the Dolphins post idea I referenced above stems from a trip to the beach I took in late June when we went out on a powerboat in the Atlantic Ocean and were surrounded by dolphins. I’ll get around to blogging about that eventually. But in the mean time, what if I pick a random animal, say, kiwi, and try to base a blog post off of that, by letting title determine content rather than the other way around?

Keep your eyes pealed. Who knows, I might write about kiwis. First I’ll have to go do some research on them, though.

When government efficiency descends into insanity

Friday, September 7th, 2007

My previous job, before I graduated university, was programming at a government research laboratory. I spent over a year in total working there, spread out across three summers and winters between university terms. In that time I managed to get a pretty good idea of how governmental agencies operate, warts and all. My favorite quirk of that lab was how the climate control system was set up.

During normal work hours, the climate control system would function normally. In the winter it would heat the building; in the summer, it would air condition the building. So far so good. But, outside of normal work hours, the climate control system switched into “energy efficiency mode”, which is government speak for “it turned off”. This being a laboratory, there were scientists and technicians coming in at all hours of the day and night to check up on experiments, or just do additional research. But it would get so cold inside during the winter when the heating system was being “energy efficient”.

The solution was to install climate control override switches in each hallway that activated the system in that section of the building outside of normal work hours. These switches consisted of unlabeled, nondescript, little circular black buttons on beige electrical boxes mounted at the ends of hallways above eye level. I suppose information on their purpose got around by word of mouth, because most people wouldn’t even notice the switches on their own, and the few that did would have no idea of their function (and in general, in a laboratory, you don’t go messing around with buttons whose function you do not know).

The really evil thing about these buttons, and the reason you can tell the “solution” was one that only a government agency could think was reasonable, is that the override only took effect for one hour. After one hour, the climate control system would go off again (another “energy efficient” feature), and someone would have to walk back down to the end of the many-hundred-feet-long hallway and hit the button again. Every hour. I saw people setting egg timers so they wouldn’t forget when they had to go hit that infernal button once again. And God help you if you’re suited up in the middle of an uninterruptable experiment in the dead of winter with no one else in that section of the building. You’re just going to have to learn to enjoy the freezing cold. Some scientists kept interns and post-docs around after hours that they could send to go Press The Button for just this reason.

Modifying those damn buttons was the number one request on the electronic bulletin board for that agency. But rather than requesting a simple on/off switch for the climate control system, scientists seemed to just want the button’s effects to last longer. The average request was to have the override last for four hours. They didn’t object to the concept of having to press the button like a trained lab rat; they just wanted the freedom to be slightly lazier trained lab rats.

That’s the government for you.

An optimistic outlook on the encroaching darkness

Thursday, September 6th, 2007

I have always been a Summer person. It’s not that I like it when it’s hot; give me a freezing cold day over a 100F day any day of the year. And I really do like snow, especially the potential it has to ruin the best made plans of men. Snow day, anyone? I appreciate the beauty of Autumn, the color of the leaves and the crisp air. Autumn also has Halloween, which is my favorite holiday and the one I’m by far the most nostalgic over. But yet Summer is my favorite season, solely because Summer is when it’s most light outside.

It’s not that I don’t like night; in fact, my conscious mind seems to enjoy darkness. But my subconscious, basal mind does not. I’m simply happier during the Summer, what with those long hours of daylight, for reasons entirely out of my control. Yes, Summer doesn’t have Halloween, and it certainly lacks snow, but I’d be lying if I tried to claim that Summer wasn’t my favorite season because summer is simply when I am at my happiest. Those of you who know a bit about the seasons will be saying, but wait, June 21 is the Summer Solstice, the longest day of the year, and it marks the changeover from Spring to Summer. So why pick Summer over Spring when both have, overall, days of the same length? The answer is simple: Daylight Saving Time. I’m never up that early in the morning anyway, so the hour of sunlight taken away in the morning and tacked on at the end of the day is very noticeable in the Summer when I happen to be outdoors more often at night than in the Spring.

So it should make sense why I view the encroaching darkness of Autumn and Winter with a certain feeling of apprehension. I simply do not relish those shorter days. It’s already starting to get dark as I’m driving home from work and I hate it. But I have found one aspect of longer nights to be optimistic, even joyous, about. Longer nights mean more hours for astronomy observations and better chances of being able to see night sky objects of interest.

My dad recently dug up his old 8×30 binoculars. Using the free software program Stellarium, I’ve found some objects in the night sky that I wanted to look at. At my location this week, Jupiter and Antares are visible just after sunset low over the horizon to the south. I’ve been trying to spot the Jovian satellites with the binoculars (a tricky feat in light polluted suburb conditions, made even harder by the small aperture diameter of the binoculars), but have had no luck as of yet. The Sun is staying in the sky too long, drowning out the sky too much with its light to allow me to see what I want to see before they get lost behind trees and houses, the suburban obstacles on the near horizon.

If this were Winter already, the Sun would be setting much earlier, and I’d easily be able to see Jupiter in completely dark conditions, as well as many other interesting objects that set early in the evening. This is pretty much the only thing I have to be happy about with a shortening day. I’ve been setting my sights on a telescope that I want to get soon, a nice 6″ Dobsonian. It will let me see far better than these dinky 8×30 binoculars. As the Sun continues setting earlier and earlier, I will buy that telescope, and temper the anguish over vanishing daylight by turning my attention upwards, towards the darkening heavens.

Striving for minimal action in a short story

Tuesday, September 4th, 2007

Contrary to the impressions this blog gives off, my primary writing passion is not essays, nor is it informational pieces. My favorite writing passion isn’t even non-fiction at all; I like writing fantasy, and especially, science fiction. Unfortunately, I simply don’t have any creative outlets for sf. This blog is great for writing informational and editorial pieces, but I daresay I don’t have the confidence to just chuck a whole short story on here. Maybe confidence isn’t quite the right word. I just don’t know if it would at all be successful in a blog format. Very few people do it, and I can’t help but think there’s a reason for that.

One of the questions I occasionally muse over in place of actually writing sf is how minimal a short story can get. I’m not referring to length, which must remain normal (many thousands of words), but rather, action content. How little action can a writer pen into a short story while still making it interesting? Is it possible to write an engaging short story where nothing happens whatsoever? I’m thinking it might be possible. I once wrote a heavily detailed, multi-page description of a scene. Technically, nothing happened; time remained frozen as I described the scene. I think it would be possible to stretch that description further into a full short story, sticking only with the present and not delving into the past or speculative future. The author of such a work describes only how things are, not how they got that way.

I think such a story would be a novel break from traditional fiction. It would be a single snapshot, a solitary glimpse, into a huge fictional world that the reader knows nothing else about. There is no resolution, no plot or character development. The author thinks out the entire plot and cast of characters, then records a single instant with lovingly rendered prose, a single frozen-frame instant that defines everything. Imagine if an instant in your past that you aren’t proud about defined everything about you that anyone will ever know. It could be like that, too. Imagine if the frozen instant happens to occur when the hero is lashing back at the villain in self-dense: to the reader, the roles would be entirely reversed. Morality and traditional roles of good vs evil are more ambiguous when the reader lacks clues of chronological cause-and-effect.

I find a lot of potential and appeal in this format. It serves as a great way to exercise a writer’s descriptive abilities (far too many aspiring writers focus on action over description, and while hundreds of actions may take place over the course of a short story, the reader never gets a feel for the setting). The reader would get a different sort of satisfaction in reading this kind of story. It wouldn’t be about plot resolution, as there is none of that, but rather, reading an incredibly elaborately detailed scene and trying to puzzle out, or simply dream up, the set of circumstances that led to this point, and thinking on what might happen afterwards.

I’m going to try writing up an example of this format. It won’t be as lengthy as a fully fledged short story, but it certainly won’t be meager. And heck, even though I’m unsure of the suitability of doing so, I’ll post it here. Maybe the idea yields terribly uninteresting chunks of text that could hardly be described as a story, and the format should be dismissed out of hand. But maybe it works.

Applying cynicism to fruit-on-the-bottom yogurts

Monday, September 3rd, 2007

I try to be as cynical as humanly possible in all situations. Not merely skeptical, but full-on cynical. Okay, that isn’t quite true, but for the purposes of this post, I’ll pretend like it is. It’s not like I can’t be maximally cynical on a whim or anything (though if you take my advice you’re liable to think I’m only saying I’m cynical for manipulative and comedic purposes).

I just ate a cup of Dannon “Fruit on the Bottom” yogurt (strawberry, to be exact). The name is pretty self-explanatory. Some fruit is at very bottom of the cup and the rest is plain yogurt. Before eating it, you have to mix it up manually with a spoon. It’s a bit of work and it’s never quite done satisfactorily; the bottom part of the cup always has a lot more fruit in it than the top, leading to an uneven eating experience.

So, applying the cynicism principle, I was thinking to myself, why would Dannon sell their yogurt in such an inconvenient manner? Why not just mix it up? Then the cynicism spoke to me. They probably save a few fractions of a cent per cup not by mixing it. It’s easier to manufacture the two ingredients separately separately, and then drop measured quantities of fruit and yogurt one after another into each cup with an automated machine, than it is to blend the two in the correct ratio and ensure a certain minimum amount of fruit gets into each cup (perhaps by blending the cups individually).

So, after saving a few fractions of a cent by using the simpler manufacturing process, Dannon asks itself, “How can we be evil?” And the answer is, “Oh, I know! Rather than trying to hide the poor quality of our non-blended yogurt, let’s turn it into an advertising slogan. Hey, we’ll name the very product ‘Fruit on the Bottom’! Now customers will think they’re getting something really clever and nifty, when in fact, all they’re getting is the result of deficiencies in our manufacturing process! Just snub their noses in it and they’ll be to stupid to question us!”

See, this is why it pays to be cynical, lest you risk falling for that kind of marketing claptrap. Now I’m off to ponder why hot dogs come in packs of 7 but buns come in packs of 8. I suspect it’s because the two share no common divisor, so the minimum purchase required to match quantities of buns and hot dogs is 56 (talk about a nice racket!).

FPS nirvana approacheth

Monday, September 3rd, 2007

These next few months are going to be great for FPS (first person shooter) fans. First up on our plates we have the recently released BioShock, a suspense/horror FPS for Windows and XBOX360. I’ve been slowly playing my way through the Windows version, and I am impressed. The theme, mood, and ambiance are all stellar, and miles above the typical FPS.

The only qualm I have with BioShock, and this is a big one, is the combat. I can’t quite put my finger on it, but it isn’t precise, it’s sloppy. It’s hard to accurately aim weapons and get good hits on enemies. The targeting reticles for plasmid attacks are way too large and do not allow for satisfying aiming. Battles devolve into manic rounds of mouse-clicking with enemies that are jumping all over the place and much too hard to hit with the inaccurate weapons. BioShock’s console lineage is plain as day. If you’re looking for ultra-precise FPS combat like you might find in a Quake, Doom, or Unreal game, you’re going to be disappointed, because BioShock doesn’t have it.

That’s why I don’t really understand how BioShock scored a 96% score at Game Rankings (a review aggregation site for games like Rotten Tomatoes is for films). I would score it an 85%, tops, mainly because of its lack of good combat. And BioShock doesn’t even have a multiplayer mode, which is what I usually end up spending the majority of my time playing. I find it more fun to play against fellow humans anyway.

Thankfully, true multiplayer FPS nirvana is on the horizon. Team Fortress 2, the long-awaited sequel to Team Fortress Classic (a Half-Life mod) will come out in a month. TFC is a ridiculously fun game and every indication is that TF2 will deliver. TF2 is also being released simultaneously with Half-Life 2: Episode Two, a single player expansion for Half-Life 2, as well as Portal. Both Half-Life 2 and Half-Life 2: Episode One were excellent, and Episode Two should be too. Portal is a single player FPS based on the Half-Life 2 engine that I haven’t heard much about. It’s more of a puzzle game than a shoot-em-up, but that’s fine; I like puzzle games, and hopefully this one will be good. We can always use some puzzling to break up the monotony of killing hundreds of enemies, right?

And if all of that wasn’t enough, be on the look-out for Unreal Tournament 3, the next installment in the excellent long-running Unreal Tournament series. Not only is UT a great game, but it tends to engender extremely good mods as well; I remember playing the mods Alien Swarm and Red Orchestra for UT2003 more than I played the base game!

So if you are an FPS fan, these next few months are going to be pure gold. Great single player as well as multiplayer games are being released, leaving something for everyone. And unlike BioShock, the combat in Half-Life 2 and Unreal Tournament has always been PC-precise, not console-sloppy. I’m really looking forward to them.

A long history of dumbing down roguelikes

Sunday, September 2nd, 2007

I recently tried out the game Izuna: Legend of the Unemployed Ninja for the Nintendo DS. It’s another in a long line of commercial roguelikes (it’s worth reading the article to familiarize yourself with the concept of what a roguelike is). What annoys me about commercial roguelikes is that they do not admit to their heritage (all of the free software roguelikes typically identify themselves as such). And they tend to lack the complexity that makes the real deal so much fun. Izuna, unfortunately, is a pale imitation of a good roguelike.

Izuna is simply too shallow. There are only a few types of items and only three types of equipment (a maximum of two of which can be worn at once). It’s just so simple. I played through the first two dungeons and felt like I had already gotten everything out of the game that I was going to get. So I stopped playing Izuna and went back to playing NetHack, the preeminent modern roguelike and direct successor of the archetypal Rogue.

That’s not to say that Izuna doesn’t have anything going for it. By roguelike standards, its graphics are top-notch (although keep in mind most roguelikes don’t even have graphics). And Izuna has clever dialog and a substantial plot, something that roguelikes also typically lack. But if I’m going to play a roguelike, it’s not graphics or plot that concern me. It’s the gameplay mechanics. And NetHack is far more interesting than Izuna.

I can name one commercial roguelike that I would consider good: Azure Dreams for the Playstation 1. Its mechanics were sufficiently complex and engaging to really interest me. It also had all sorts of fun minigames revolving around the town outside of the tower (the dungeon in the typical roguelike schema). And dare I say it even had a pet system that was superior to NetHack. The problem with Izuna is that I guess they figured since it was on a handheld system, it had to be pretty simple. It doesn’t even have any pets.

My playing of roguelikes is cyclical. NetHack is the only game I’ve come back to over long periods of time, a testament to how good it is. Whenever I stop playing a game that I was previously way into, such as World of Warcraft, and more recently, Supreme Commander, I always end up going back to NetHack for a spell, trying to Ascend another character class that I haven’t Ascended yet. So far I’ve done seven or eight, and I’m working on, fittingly enough, a rogue right now.

If you’re interested in trying out NetHack, go open up the NetHack Guidebook in one window and use a telnet client such as PuTTY in another to connect to That’s the address of the largest public NetHack server. Of course, you can download, install, and play NetHack on your local machine, but I like playing on public servers. It’s not that the game is multiplayer or anything; I just like being able to play the same game from anywhere that has Internet access.