Casey Watson

Be true to your work, your word, and your friend. —Thoreau

The Mediocre Technical Interview

After giving a technical interview there is often a feeling of uncertainty.

Did I ask the right questions? Can you really evaluate a candidate in an hour?

This is true when the candidate is technically strong but fails to wow. It’s common to second guess the decision to pass on the candidate.

There is a lot to be said about trusting your gut when hiring. Much like in love, when you find the right person you will know! There will be fireworks.

To build and grow a great company, it’s important to maintain a high standard for hiring based on both cultural fit and technical competence. Be patient, and hold out for the right candidate.

Belgian Blond Ale

Last weekend I brewed up a 5 gallon batch of my first belgian style ale. This is an extract recipe with a small amount of specialty grains.

The BJCP describes this style as A moderate-strength golden ale that has a subtle Belgian complexity, slightly sweet flavor, and dry finish.

I am eager to see how it turns out.


0.74 lbs. Balgian Pale

0.10 lbs. Belgian Aromatic

3 lbs. Dry Extra Light Extract

Boiled at 25 min.

3 lbs. Muntons Dry Extra Light Extract

0.6 lbs. Candi Sugar Clear

1 oz Challenger (Pellets, 6.7%AA)

Boiled at 60 min.

0.4 oz Amarillo (Pellets, 8%AA)

Boiled at 15 min.

0.5 oz Fuggle (Pellets, 4.75%AA)

Once again, I forgot to measure the original gravity. The recipe that I started with predicted an OG of 1.066 with an expected alcohol content of 7.3%.

Easy Zebra Striping With Prototype

While reviewing some of the JQuery tutorials, I was impressed with the ease of setting up a table with alternating row colors.

This got me thinking that it should be a relatively easy thing to achieve using the Prototype library as well. In this edition, I will give quick example of doing just that.

We’ll start by using the element selector utility method ($$). This will return a list of the odd numbered rows in our table. We then add the oddRow classname to each of these matched table rows.

function stripe(e) {
  var evens = $$('table.stripe tr:nth-child(odd)');
    if(evens) {
      evens.each(function(tr) {

Event.observe(window, 'load', stripe);

The next step is to assign the stripe class to our table. Any table with this class will pick up the new behavior.

Last step, we need to specify the CSS to change the background color. I also threw in a directive to collapse the borders.

table.stripe tbody tr.oddRow {
    background-color: #eee;
table.stripe {
    border-collapse: collapse;

As always improvements, tweaks & suggestions are welcome.

CVS Shortcuts in Vim

Vim is an incredibly flexible text editor. I continue to be surprised by the number of strange things it’s capable of doing. For example, there is a crude Tetris clone available for Vim.

A bit more useful, though, is the cvsmenu script for Vim. This is a fairly polished plug-in that will allow you to do all of the basic CVS tasks from inside your text editor. The supported CVS commands are: add, diff, commit, update, status, shortstatus, localstatus, and revertchanges.

Since the plug-in is poorly documented, I thought that I would take this opportunity to explain how to use it.


In Ubuntu, this is pretty simple.

% sudo aptitude install vim-scripts

% vim-addons install cvsmenu

This will install the package and enable the plugin for your user.


I will assume that you already have a versioned source tree checked out on your system. Start by opening a file in this tree. You can open a diff view by typing ,cd. Note: that’s comma, C, D. If you have your leader key mapped to something else, use that.

The local revision is shown on the right, the remote revision is on the left. This is a bit backwards from the Eclipse and Netbeans way of doing things. Typing CTRL+W+W will move your cursor between the two revisions. I haven’t found an easy way to move a change to the right, but I would be interested in reader comments.

Here is an index of the commands. They may be documentation somewhere but I was only able to find them by looking at the plug-in source code.

,ca - Add
,cd - Diff
,ci - Commit
,cu - Update
,cs - Status
,ch - Short Status
,cc - Local Status
,cv - Revert Local Changes. The odd thing about this is that it only updates the file on disk. It doesn't actually revert the changes in the open editor.

Modern IDEs do ease the pain of performing mundane versioning tasks such as merging. But, this is a nice alternative to those heavy-weight tools.

Socialthing and Prism on Ubuntu

A recent article on the socialthing! blog made me curious about setting up a site specific browser in Ubuntu.

This is a pretty simple thing to accomplish and it beats the heck out of the currently available Ubuntu twitter clients.

Start by installing the prism package.

sudo aptitude install prism

You can then setup a new application by starting prism either from the command line or from the applications menu. Setup is pretty self-explanitory but here is a screenshot for good measure.

picture missing

If your looking for a good socialthing! icon, you can find one here. Then launch your new app and voila!

picture missing

You might also checkout prism-facebook, prism-google-mail, prism-google-reader, and prism-twitter.

Code Duplication

A while ago I fixed some obscure bugs in one of the search results pages of an enterprise application that I work on. I spent about four hours of focused development time refactoring and cleaning up some of the logic that handles the rendering and paging of the results. The new code worked well.

A couple of weeks later I found myself bug squashing on another search results page. As I dove into the code, I found a nagging sense of deja vu. This page had the same logic errors and mistakes as the page I had worked on weeks earlier. I found myself fixing the same bugs and performing the exact same refactorings as I had before.

I became more frustrated as I realized that the original author had copied all of the logic from the original page. Rather than extracting the common functionality to a reusable location, he took the lazy approach with copy and paste.

This kind of mistake is expensive. By duplicating the code, the cost of maintenance has doubled. Bugs must now be fixed in both places. Merging the common logic after the fact is more difficult than it would have been initially.

We have these wonderful object oriented languages. There are many ways to reuse code. Some of the following come to mind:

  • Two subclasses can share common functionality in a parent class.
  • Duplicated code can be moved into it’s own class. This can be done in a concrete class or via a static utility class.

Time Based Releases

I was just reading the Ubuntu development process documentation. In particular the document on Time Based Releases.

I think they really hit the nail on the head with this one. This quote caught my attention:

The overall quality and punctuality of an Ubuntu release are more important than any single feature, and a high-quality feature is superior to a hastily-added one, even if it arrives in a later release. Free software developers are passionate about their work, and it is easy to get carried away by a particular feature, losing sight of the greater goals of Ubuntu. Pause, breathe, and consider whether it is more important to get it now or to get it right.

I couldn’t have said it any better myself. Feature creep is difficult to avoid. When trying to deliver a release it seems that issues keep getting added to the pile. Eventually, the release has taken three times longer to get out the door than initially planned.

Software development needs to be flexible and respond to changes as they arise, but it seems like setting some hard deadlines can go a long way towards delivering useful software.

Home Brew Batch 2

I just finished my second batch of home-brew. This one was a Porter that turned out to be pretty delicious.

I’ve posted a few pictures. And for those who are interested, I’ve also posted the recipe.

Eclipse 3.3.2 and DBEdit

Guest Author: Trevor Stone

On Tuesday, Eclipse told me it had updates (3.3.2) available. For the next three days I got 404/503 errors from the mirror sites it tried to use. I finally got it updated today and learned that they fixed whatever was keeping DBEdit from working. So if Eclipse’s Database Development views annoy you as much as me, upgrade when you get a chance.

The difference between DBEdit and Eclipse’s take is quite telling. The Eclipse one tends to information overload, showing you every possible facet of the database you might want to look into. DBEdit tends to ease of use, making it easy to query and edit the contents of tables. Navigating to a table in Eclipse requires right-click-to-connect, then about seven levels of tree expansion.

DBEdit connects on double click and then provides tables at most three levels deep. You can double click on a table to see the data in the table and can browse all the data. You don’t have to switch between tabs after running every query. It doesn’t prompt you to save your SQL queries when you run a program. DBEdit is a good example of user-centered design. Focus on a specific problem (examining database contents) and make it easy for the user to solve that problem. Eclipse’s database tools are an example of model-focused design. Figure out all of the parts of the domain and create a user interface that follows that model. I’m sure there are things that the Database Development perspective can do that DBEdit can’t, but those are things I usually don’t want to do.

(Caveat: I haven’t played with Database Development Tools in 3.3.2, so some of the UI quirks may have improved. But the interface fundamentally makes it hard for me to do what I usually want to do.)

Gutsy and the NV11 GeForce2 MXMX 400

I have had quite a tough time trying to get my ancient nvidia graphics card to work to it’s full potential after upgrading to Gutsy. My graphics card as reported by lspci is:

01:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev b2)

After trying to use the Screen and Graphics Preference utility, I was not able to get a resolution of 1400x1050 that would actually stick around after reboot. Upon inspecting the xorg logs I found the following (it also appears in Xorg.0.log.old).

(==) Log file: "/var/log/Xorg.0.log", Time: Thu Oct 18 23:12:59 2007
(++) Using config file: "/etc/X11/xorg.conf.failsafe"

The only way I have been able to get a high resolution that doesn’t boot into failsafe mode every time is by removing the xorg configuration file.

sudo mv /etc/X11/xorg.conf /etc/X11/

After that, my machine happily boots into the highest supported resolution.

(==) Log file: "/var/log/Xorg.0.log", Time: Mon Oct 22 22:42:18 2007
(EE) Unable to locate/open config file
("") PCI:*(1:0:0) nVidia Corporation NV11 [GeForce2 MX/MX 400] rev 178, Mem @ 0xde000000/24, 0xd0000000/27, BIOS @ 0xdfef0000/16
New driver is "nv"

The machine runs much faster with the nv drivers than it did in fail-safe mode. However, I would still like to get this thing using some real hardware acceleration. Any ideas?

Update Oct 27, 2007: I was able to use Envy to install the proprietary Nvidia drivers. Though probably not the ideal solution it was very simple and straightforward. After the reboot, things were not quite at the highest resolution. To fix this I ran the Screens and Graphics Preferences setup utility. I chose “LCD Panel 1400x1050”. After logging out the X-server came up at full resolution.