Thursday, December 29, 2005


Well, it looks like the little module Paul and I have been hacking on managed to get a bunch of people interested in it last night. Well, I'm glad to see that people like the stuff we're doing, but I do think some of what people are talking about is a bit premature.

So far, we've got a proxy backend module that speaks a subset of the fastcgi protocol. Assuming you've applied the lastest set of patches I posted to you can actually run a fastcgi process (listening on a TCP socket) and via a ProxyPass setting tell httpd to hand all requests for a particular part of your URL space off to it. The fastcgi implementation is pretty bare bones, and has a bunch of known problems in it, but it is enough to get "Hello World" to work.

None of this is even close to the final solution we envision for this stuff. We still need to look at unix domain sockets and local fastcgi processes, with a mechanism for starting and stopping those processes as needed, and while we've talked a little about how that should work no code has actually been written for it yet. We'd also like to make the whole thing a lot easier to configure, the final goal being that a simple local fastcgi setup for something like Rails or Django shouldn't need more than one or two lines in httpd.conf.

Anyway, like Paul said, this is all very much a "free time" project for both of us, so no promises on when it'll actually get done, but we are working on it as time permits, and it's made pretty good progress lately, so who knows, maybe there will be something useful in the trunk of the httpd subversion repository fairly soon.

Saturday, December 24, 2005

Infrastructure Holiday Fun

I got to exercise my newfound ASF Infrastructure powers for the first time today, by upgrading the httpd install that runs (and for what it's worth) to version 2.2.0. The main instance has been running 2.2.0 (well, 2.1.10, which is just 2.2.0 with a slightly different version number) for a while now, so I don't anticipate any problems, but I was still a little nervous since it was my first time doing something like this.

For the curious, the only reason this hadn't happened yet was that upgrading this httpd install involves rebuilding mod_dav_svn and mod_authz_svn (since the MMN changed between the last version and this one) and nobody had managed to find the free time to do it.

Anyway, everything seems to be working just fine, but if you notice any problems please feel free to drop me a line.

Sunday, December 18, 2005

Welcome to the ASF

So there are a lot of things from last week's ApacheCon that I'm sorry I missed, but ironically, the thing I really wish I was there for actually happened while I was sitting in the airport waiting to fly back to San Jose.

You see, at the ASF Members meeting I (along with a bunch of other people, whose names will become public once they've all been notified) was voted in as a member of the Apache Software Foundation.

This is a really big deal for me. I've been hanging around the ASF for years, helping out where I can, because I think the ASF does good work and that it plays a hugely important role in the software world, providing a place people can develop high quality tools that can be used by both open source and proprietary projects everywhere.

Anyway, I just wanted to say thanks to everyone who voted me in, and that I'm looking forward to becoming more involved in the day to day operation of the ASF.

Monday, December 12, 2005

Weekend Fun

So I just (well, late last night anyway) got back from a fun filled weekend at the ASF Hackathon. This week is ApacheCon US 2005, and the first few days of such events include, in addition to the tutorials, a large room reserved for people just getting together and hacking on various ASF projects. I'm not going to be able to make it for the conference, but it seemed like a crime to miss the Hackathon when the whole thing is only a short flight away in San Diego. Anyway, I got a chance to work my way through a lot of the forgotten backlog of APR patches, fixed a few bugs, met a bunch of people I hadn't ever seen in person, and got myself volunteered to help maintain the ASF Subversion repository. All in all, a weekend well spent if you ask me.

I didn't bring my camera, but fortunately Julian Cash was there, so there should be a lot of really interesting pictures showing up online in the next couple of days.

Sunday, December 4, 2005


I find it just incredibly amusing that I just did a Google search to try and find out how to do something in a Ruby C extension, and the first hit was my article on writing Ruby C extensions.

Adventures in Java Land: JDO

Since I decided I wanted to learn some more about J2EE development, and everyone seems to agree that there just aren't any decent intro books on it out there, the only remaining way to learn seems to be to just do it.

So I am. This weekend I started work on a small web app written in Java. It's a basic, bare bones bug tracker, with JSP and Servlets for the view and controller portions and JDO for the model. So far all I've really been doing is the model part, so I've basically been playing around with JDO.

I can't help but compare JDO with ActiveRecord, the ORM portion of Rails, since it's really the only ORM system I've spent any real time with.

JDO (specifically a JPOX 1.1 beta, which implements the JDO 2 spec) seems to let you do a lot more than ActiveRecord does, but with that comes extra complexity. Now that I've wrestled with it a bit I've managed to come up with something that does what I want, but it took a bit more work than it took me to do similar things with ActiveRecord when I first started playing around with it. I suspect it's partly because ActiveRecord comes with a LOT of good tutorials. JPOX has some great docs, but it seems to be a bit harder to find the parts of it that apply to what I'm trying to do, largely because it does so much.

I'm not overly thrilled with the way JDO duplicates info, you write your Java classes, then you create a metadata XML file that defines how they map to database tables. An "enhancer" tool then reads the XML and magically adds the code to your classes to support persisting you objects into a database. In JPOX you can even use a tool they provide to create the database schema from your JDO metadata, which is pretty much the opposite of how you do things in ActiveRecord, where at least I tend to write my database schema first, then build my Ruby level objects around it. You don't have to do it this way in JDO of course, it's flexible enough that you can work from either direction, and I imagine starting from the Java and JDO metadata would break down eventually once you need to make changes to an existing schema, but it's reasonable for getting started.

One thing I do see as a problem is that it's difficult to tell from the JDO metadata exactly what kind of SQL schema will be created. I suspect you need to have a pretty strong grounding in the details of JDO before you can really be in a position to make incremental alterations to your application's data model.

I'm pretty much convinced that the "right" thing to do about the duplication of effort is to move the JDO metadata closer to the Java level objects. Apparently the way this is usually done in Java land these days is via xdoclet, and I'll probably investigate that eventually, but what I really want is JDK 1.5 annotations a-la EJB 3 persistence, which looks quite slick, but of course isn't really available yet. It is nice to see that the state of the art in Java land appears to be moving in a good direction though.

Anyway, now that I've got a workable data model I'll probably look at fleshing out the controller servlets and JSP views next. That'll give me a good idea what needs to change in my data model to make it really useful in an application.

Monday, November 28, 2005

Intro J2EE Books

So as a part of my new job I may, as time goes on, have a need to deal with the looming monster of J2EE in one way or another. We have a lot of Java code in the system, and while I don't actually work on it, there are definately going to be times when the part of the system I work on will intersect the part of the system I know virtually nothing about.

You see, despite the fact that I do, in theory, know Java, and in fact that I've been paid in the past to write both desktop Java applications and Java web applications, I really know very little about J2EE. Honestly, I don't even like the term J2EE. If people could just say "Java Web Applications" I'd be fine with it, but as soon as they try to use the term "Enterprise" to make something like a web page sound impressive I really start to glaze over.

Despite this, I do recognize that there are a lot of smart J2EE developers out there, and they have built a number of impressive systems using those technologies, and since I do have a need to interact with this stuff it's probably a good idea that I actually learn something about it. So this weekend I stopped at a book store and tried to find a decent looking intro J2EE book. So far, I've been largely dissappointed. I picked up a copy of "Core Servlets and Java Server Pages", which seems reasonable enough for the JSP and Servlet stuff, which I already know, but could probably use a reference on, but it's like 3 inches thick, and covers a bunch of useless "HTTP and HTML 1.0" crap that nobody who's been alive in the programming world over the past few years should need to see again.

Plus, it doesn't cover anything other than Servlents and JSP, plus a smidgen of things like JDBC. I mean I've got no freaking clue about EJBs, or any number of other acronyms that show up in the J2EE world, but I'm certainly not willing to go out and buy a 40 dollar book for each and every one of them, and from what I can see that's what you're buying into when you start picking up books in the J2EE space.

So does anyone have a good intro J2EE book they'd like to recommend to me? Something to get me to the point where I can be conversant in the terminology and know enough to poke around in some code without being totally lost, but where I don't have to spend hundreds of dollars and waste weeks of my time reading hundreds of pages of crap?

Sunday, November 20, 2005


Back when Sun launched OpenSolaris, I was pretty psyched about the whole thing, but one of the things that actually interested me the most was their online source browser. For those who haven't played with it, it's pretty much a reimplementation of LXR, which you may have seen in use over at

Of course, at the time, the code to this part of the OpenSolaris web site wasn't available, so I just sort of wrote it off as "pretty cool, I wonder if it'll ever be released".

Well, apparently its code was actually released last week, it's called OpenGrok, it's written in Java, uses Lucene for its searching, and calls out to exuberant ctags to parse source code in a dizzyingly large variety of languages.

I just downloaded it and pointed it at a copy of the Subversion source code, and I've gotta say it's pretty cool. The instructions were pretty straitforward, just run a simple command to index your code, edit a few lines in WEB-INF/web.xml, drop the war file in Tomcat's webapps directory, and away you go.

It'd be nice if it had actual Subversion support built in (so far just CVS and SCCS), but that's on the todo list. Other than that my only complaint is that it requires Java 1.5. Requiring Java at all is a pain, but I can get over that, considering that it comes from Sun and all. The Java 1.5 thing really sucks though, since it means there's like zero chance it'll work with the open source Java implementations.

Also slightly annoying is the fact that while the code is available, there doesn't seem to be any way to contribute changes back, or at lease none that's mentioned on the web page. It's basically just source and binary distributions with some instructions on how to get started.

Hopefully a public source repository and some mailing lists will show up in the future, because it's really a neat tool, and I'd love to at least keep track of its development, if not actually contribute to it.

Thursday, November 10, 2005

Subversion in C++?

So a while back one of the Subversion committers mentioned that it might make sense to write some (as yet theoretical) future version of Subversion in a dialect C++ instead of C.

You see, Subversion is VERY object oriented, at least for C code, and we jump through a LOT of hoops as a result of the C language. For example, there's about a million places in the source tree where we pass around void pointers as a way of storing context for some callback. In C++ we could pass objects that carry their own context around with them, instantly cutting in half the number of arguments we need to keep track of.

Anyway, I was thinking about this on the drive home from work today, and I started to wonder what would be required to make that really possible. The first thing that jumped to mind was making APR interoperate with C++. Virtually all resource management in Subversion is done via APR pools, and we're kind of used to that by now, so switching to a non-pool based world would be kind of weird. But APR pools deal in void pointers, low level raw memory C stuff, and setting up higher level cleanups is a pretty manual process.

Now it's possible to take the raw memory you got from a pool and turn it into an instance of a C++ object, via something called placement new, but it's kind of a pain in the ass, and even then you have to manually call the destructor when you're done with the object, which is kind of contrary to the point of allocating things out of a memory pool...

So the question is, how do we allocate a C++ object from a pool, but automatically register a cleanup that takes care of calling the object's destructor when the pool is cleared or destroyed?

It took a little doing, but I managed to come up with something I like. It looks like this:

main (int argc, char *argv[])

apr::pool p;

for (int i = 0; i < 10; ++i)

Foo *f = p.allocate();


Now to make that work, you do have to jump through one little hoop. The Foo class needs to have a static 'cleanup' function defined on it, which calls the object's destructor. That function will be used as the pool cleanup callback, so you don't have to worry about cleaning it up yourself. To simplify the process of writing this function, there's a helper macro that pounds it out for you, so the Foo class looks like this:

struct Foo
std::printf("in constructor\n");

std::printf("in destructor\n");


That really doesn't seem like such a horrible price to pay for the convenience of being able to work with pools the way we've come to expect, right?

Anyway, I doubt this will ever really be used for anything, but if you want to check out the code I wrote to make this work, you can grab it here.

Monday, November 7, 2005

Back From The Weekend

So I flew out to MA this weekend for my Dad's surprise birthday party. It was a total success, he didn't know that anything was happening until my sister showed up saturday morning, and she told him I couldn't make it, so when I showed up later that afternoon the surprise was complete.

I got to hang out with my relatives, which is always cool, and generally had a good time. It was kind of odd that it was like 70 degrees out (what the heck, it's November in MA for crying out loud!), but I did get to see actual autumn foliage, which I've missed being out in CA this year.

One odd thing, the flight from San Jose to Boston, which has been totally packed every single time I've taken it so far, had empty seats on both friday's flight out and sunday's flight back. Is this just a slow weekend or do people no longer want to fly from San Jose to Boston as much as they did when Jet Blue first started doing this particular route?

Monday, October 31, 2005

The Problem With The West Coast

So I'll be the first to admit, there are a lot of great things about living on the west coast. I've got a cool job, this place is filled with incredibly cool computer geek stuff to do, it doesn't snow, and the list goes on. But none of that changes the fact that I just got an evite to Rob and Jessica's annual pre-thanksgiving get together, and I won't be able to go.

If/when I bail and head back to the east coast, it'll be because of things like this. I mean really, how can I be asked to pass up on like 10 different kinds of mashed potatoes for multiple years in a row?

Oh well, at least I'll be home for the week between giftmas and new years, that's something.

Monday, October 24, 2005


So I stopped at Fry's on the way home from work tonight, with the intention of picking up a copy of Batman Begins, which just came out on DVD last week.

But of course, they were out of Batman Begins. This happens to me every time I try to get a new movie at Fry's, you'd think I'd eventually learn...

Instead, I picked up the new From the Earth to the Moon boxed set. Man this is a fantastic series. I mean I loved Apollo 13, and this is like watching the 12 hour extended directors cut of that movie.

If you have any interest in all in space, you've probably already seen it, but even if you have you should still pick up the DVDs and watch it again, it's that good.

Friday, October 21, 2005

Week One

So I just finished my first week at CollabNet, and man has it been cool.

I keep having these moments where I'll just have hit send on an email to the Subversion dev list, and I think to myself "ok, now I need to get some real work done", and then it occurs to me that sending that email was part of my real work ;-)

In more mundane news, I've managed to come to an understanding with whatever deity is in charge of the Bay Area commute, and now my morning and afternoon drive time has settled down to about 45 minutes each way. That isn't really all that bad, especially when you consider that it's 45 minutes of actual driving, as opposed to an hour of stop and go hell, which is what I was dealing with at the beginning of the week before I figured out the magical series of roads that would let me avoid taking 101 all the way up the penninsula.

Anyway, I'm off to the east coast for the weekend. Tomorrow is Psi U's 3-3, and everyone knows I just can't pass up an opportunity to spend 12 hours at a party after 6 or 7 hours on a plane. Also notable about this trip is that I'm actually leaving my laptop at home. I can't recall the last time I flew without one, but for once I'm actually not in danger of getting paged at 3 in the morning and having to drop everything to fix some problem. It's a nice feeling.

Saturday, October 8, 2005

A Trip To Windows Land

I'm involved, in one way or another, with several projects that build and run on Windows systems. Now most of the developers tend to be Unix people, so the Win32 side of the fence rarely gets as much love as it should. Part of the reason, frankly, is that it's really easy to get a development version of your average piece of open source software up and running on a Unix machine, and it's really hard to do the same thing on Windows.

Why is it so hard on Windows? Well, there are two major reasons.

First, the tools tend to be harder to get. Your average Unix machine either comes with all the compilers and libraries you're likely to need, or you can get them really easily. The same tools don't tend to come in the box with your standard Windows install, so you have to go out and get them. This means spending money, or at least it did until very recently when Microsoft released their Visual Studio 2005 Express Edition, basically just a cut-down version of Visual Studio that you can download for free. Even with the appearance of a free-as-in-beer win32 development environment (I don't consider cygwin or mingw real alternatives, if I want to use Unix tools I'll do it on a Unix system) it's still pretty hard to get things up and running. Installing the Microsoft Platform SDK and getting Visual Studio to recognize it took me most of this morning, for example. That said, this is a Beta version of the IDE, so hopefully it'll be easier when the real thing ships.

The second problem is sort of a catch-22. It's hard to build most projects on Win32 systems because not too many people do it. This means that the ones who do build them tend to be able to deal with the "Pain in the Ass" nature of the system, so the process doesn't tend to get better. In Unix land there are enough people going through the pain that sooner or later they fix the problems. Thus, fewer people work on the win32 versions because the barrier to entry is so high, and the cycle repeats itself.

Anyway, this weekend I got a bit motivated, and actually downloaded and installed Visual C++ 2005 Express Edition, got the Microsoft Platform SDK working (for the record, the instructions they post don't seem to work for me, I had to use the trick mentioned here where you copy the headers and libraries into the Visual Studio install directory), and I'm inching towards getting Subversion and APR to actually build.

I'm hoping that with the advent of some decent free-as-in-beer tools it'll be easier for us Unix people to actually confirm that things work in Windows land, and the first step seems to be going through the process and figuring out how to streamline it a bit.

Wednesday, October 5, 2005

Producing Open Source Software

If you've ever wondered exactly what makes an Open Source project successful, and I mean really successful, as in building a sustainable community, not just having one guy madly hacking away in his spare time and giving the results away to the world, then you should absolutely take a look at Karl Fogel's new book, Producing Open Source Software. Karl's one of the reasons that the Subversion community has taken off the way it has, and while reading over the online version of the book this weekend I was continually struck by how on-target his observations were. I mean I was actually there for many of the situations he writes about, and I still didn't see all the angles that he covers.

Seriously, go read the book, and buy a dead-tree version when it hits the stores, you won't regret it.

I was particularly interested in chapter 5, Money.

Why? Well, it's all about how to keep things from getting all weird when people start getting paid to work on the project, either as full time sponsored developers who work for a company with a vested interest, or as contractors paid to fix a specific problem one of their clients needs fixed, or whatever. You see, I'm going to have to deal with that issue personally real soon now. I just accepted a job offer from CollabNet working on their Subversion team, so for the first time my day job will actually be working on some of the stuff I do in my spare time. As you might expect, I'm looking forward to this particular application of the stuff Karl writes about in chapter 5.

This is where I insert the "I'm going to miss the people at Bloglines" and "I'm really looking forward to this new opportunity" sections, but everything I write sounds totally lame. So just assume that I wrote something to that effect, cause I really will miss working on Bloglines, and at the same time I'm really psyched about getting paid to hack on Subversion.

Tuesday, September 27, 2005

When Should I Have Learned This?

A few days ago I read a blog entry by chromatic about the kind of things that people learn in Computer Science programs these days. He was talking about the difference between theoretical computer science and the kind of skills you need to make it as a professional programmer, two things that are somewhat related but nowhere near identical. That dichotomy is interesting, but it's not what I want to talk about today. I want to talk about the million and one bits of information that have come out of the CS world but that for one reason or another you don't really learn in a CS degree.

Every CS major back at RPI had to write an implementation of strstr at some point, but I don't remember ever learning about better ways to do it than the naive algorithm. At some point between then and now I heard the term "Boyer-Moore Algorithm", but until today I never actually read the paper and saw how it worked. If I hadn't been poking around in the mod_include source code a few weeks ago I'd never have heard of a BNDM search algorithm. Both of these are really cool ways to do a faster string search, but even with my CS degree I'd never heard of them. Fortunately, I tend to hang out in the kind of places you hear about such things, but do we really want people to learn about these sort of things by accident?

How about techniques for multithreaded programming? If I hadn't read the documentation on the Boost threads library I wouldn't have learned the trick about figuring out lock ordering based on the address of the two mutexes, and if I hadn't been following the writing of Herb Sutter I wouldn't have realized exactly how many ways that solution can break down. If I hadn't read the FreeBSD mailing lists religiously for years I wouldn't have learned about the importance of lock ordering at all, despite the fact that I recall at least two classes back in school that taught the basics of multithreading. This isn't like the string searching stuff, where we're just talking about getting the answer faster, this is about how to write multithreaded programs that actually work at all.

If there's this much more to the topics that I did learn in school, what about the topics I never learned there? That's the thing that really worries me. It seems like it's way too easy to think you're doing things the right way and to be completely and totally wrong. Where should programmers be expected to learn this sort of thing? The thing that really worries me is that most of them just aren't learning them, and as a result are going to spend most of their careers screwing up stuff that collectively we've already figured out, but nobody got around to telling them about it.

Tuesday, September 20, 2005

Thoughts on Threading

So this week I've been thinking a lot about threading.

Specifically I've been thinking about large, complex multithreaded servers that are difficult to write, to test, and most importantly to modify later on, especially if you are not the person who actually designed and implemented them in the first place.

Among the better papers I've seen on the subject is "Reasoning about SMP in FreeBSD", by Jeffrey Hsu, who did a lot of work on locking the FreeBSD network stack as part of it's SMP project. Interestingly enough, Hsu is now working on DragonFlyBSD, which has taken a rather different approach to its multithreading than FreeBSD did. Makes you wonder if the more traditional techniques (fine grained mutexing, a-la the Solaris kernel) used in FreeBSD are really the right way to go...

Go read the paper, it's good.

Anyway, the big idea of that paper is that to effectively think about a multithreaded system you really need to understand what it's doing. You can't effectively add locking to one part of the system without totally understanding all the interactions it has with the rest of the system. You really need to see the big picture in order to know how to make the individual decisions.

I've been having trouble seeing the big picture, that's the problem.

Planning Holiday Cheer

So I know I've already complained about how much it sucks to have to buy plane tickets and fly across the country for all those family gatherings and social events I'm expected to be at back on the east coast...

But I haven't had to do the "travel over the holidays" thing yet, so I'm sure that all my complaining is for naught, because I haven't experienced real pain yet...

Don't worry though! It's coming! I just booked my flight home for the holidays. It turns out that $COMPANY has a bunch of "Shutdown Day" days off between XMas and New Years, so I'll be home from December 23rd through January 2nd. Judging from the price Jet Blue charges, and the fact that every reasonably priced rental car is taken already, I'm sure there'll be a terrifyingly large number of people trying to get someplace other than where they live, just like me. It should be loads of fun. Now I know why Rob J doesn't travel during the holidays...

Anyway, I guess that means I'll have to figure out where the cool kids back home are going for a new year's party...

Saturday, September 17, 2005

Fun with Email

So earlier this week I ran across Matt Sergeant's O'Reillynet article about Qpsmtpd.

Now I've known about Qpsmtpd for a while now, I saw a great talk about it at OSCON a few years back, and I know the ASF uses it for their mail, so I'm not exactly new to the concepts here, but one thing in the article struck me as just too damn cool. You see, while there are special plugins for Qpsmtpd that let it deliver mail to Qmail or Postfix, the simplest way to integrate it with your existing system is just to run your normal SMTP server on an alternate port, and have Qpsmtpd do all the fancy filtering and spam blocking, then just forward it on via, you guessed it, SMTP.

Back in the Apache world, some of the HTTPD developers have been working on mod_smtpd, which lets you make the Apache HTTPD speak SMTP.

In the open source world good engineers borrow ideas and great engineers steal them, so much of the mod_smtpd design is based on Qpsmtpd. Ironically enough, the Qpsmtpd design was inspired by the modular design of the Apache HTTPD server, so now the cycle is complete...

Now mod_smtpd is just getting to the point where it's able to do useful things, but it still doesn't have a queue plugin that lets you forward mail via SMTP.

So I wrote one this morning.

It's pretty bare bones, with a really basic SMTP implementation under the hood, but it is enough for my mod_smtpd server to be able to forward mail to my exisitng Postfix server, and that's the whole point. Grab the patch here, if you're interested, although honestly, if you're interested enough in mod_smtpd at this point that you'd actually want the code, you're probably on the mailing list already ;-)

Tuesday, September 6, 2005

APR-Template 0.0.1

I just cut the first release of APR-Template, my Apache Portable Runtime based templating system. Since I already wrote a perfectly good README file that explains what it is, I'll just quote it here:

APR-Template is a minimalist template library implemented on top of APR and APR-Util. It's designed to provide a lightweight templating solution that fits easily into an Apache HTTPD module or other APR based program.

The template language looks like this:

<title>[% print title %]</title>
[% if add_header %]<hr>[% end %]

<h1>[% print title %]</h1>

[% for e in elements %]
<li>[% print e %]</li>
[% end %]

[% if add_footer %]<hr>[% end %]

Which produces about what you'd expect. If you've used Template-Toolkit or EZT you'll find APR-Template to be similar, although the feature set is quite stripped down, so if you find yourself trying to do a whole lot in your template it's a sign that you either need to put that logic into your C code or find a different template engine.

For examples of how to use APR-Template in a program please refer to the tmpl command line tool (in src/cmdline/tmpl.c) and the mod_template_example apache module (in examples/mod_template_example).

There's a bunch of stuff I still want to do with it (see the TODO file in the tarball for details), but the current version has just enough functionality to be useful, so I decided it was a good point to cut a release. Get it while it's hot:

Monday, September 5, 2005

Illogical Travel Plans

So Kim posted a couple of pictures from our fraternity in her LiveJournal today, which of course resulted in me spending way too long going through the online photo albums looking at the past 8 or 9 years worth of Psi U history.

This had predictable results. I've been overwhelmed with a desire to play quarters and flick bottle caps at the light fixture in the living room. Oh, and to see some old friends.

So I just bought my plane tickets for 3 to 3. I'll be taking the totally insane route, flying out late friday night and arriving at about noon on saturday (I'll miss the alumni association meeting, bonus!), then a little more than 24 hours later I'll fly out again. It seems likely that I'll be pretty out of it the whole time, but hopefully I'll be able to get some sleep on the plane so I can at least remain awake for the 12 scheduled hours of party ;-)

Anyway, I just felt the need to mention it, on the off chance that anyone else was planning on not going this year. I mean if I can fly across the whole damn country to be there doesn't that make your excuse seem pretty lame?

Sunday, September 4, 2005

Fun With Templates

My friend Greg wrote this template engine ( in Python. It's small (less than 600 lines of code), and useful, and under a very permissive license, and thus has made its way into a variety of different programs (the Subversion build system, ViewCVS, Edna, the new ASF workflow tool, probably lots more I don't know about). If you're writing Python code and need a template engine, and you don't feel like embedding one of the heavier weight solutions, you should really give it a shot.

Lately though, I've been playing around with Apache modules a lot. I guess that's one of the dangers of spending so much time sitting 10 feet from Paul.

Considering that Apache happens to be a web server, lots of Apache modules expose some information via web pages, either diagnostics, control panels of some sort, or even the primary user interface of the program.

There isn't really a C equivalent of EZT though, so you either end up embedding a scripting language of some sort and using a template engine implemented in that, or you use something like clearsilver, which is both ugly and overkill for the kind of thing we're talking about here. Or, more likely, you end up doing what most Apache modules do and just spit out html via the moral equivalent of printf.

I think it's pretty sad that we're this far into the evolution of the web and some of the core portions of the most commonly used web server on the planet are generating their user interface via printf...

So I'm working on a better solution.

It's called APR-Template, because I can't come up with a better name, and it's similar in spirit to EZT, but implemented in C using the Apache Portable Runtime. It even writes output to an APR bucket brigade, so it's really easy to plug it into an Apache module. So far it has conditionals, loops, scalars, arrays, hashes, and weighs in at just under 1000 lines of C code.

Look for the first public release real soon now, as soon as I clean up some of the public APIs a little bit and write some more documentation.

Saturday, August 20, 2005

Deja Vu

So I'm sitting here, reading Higher Order Perl (which is one of those books that takes a great deal of thought to get through, which is why I'm still only on chapter 5 despite the fact that I've been reading it off and on since it first came out months ago), and I can't help but be incredibly amused by section 5.4.3, which shows you how to convert a recursive function into a nonrecursive function by inlining the stack management that the programming language does for you in the recursive version.

You see, the example MJD used is iterating over a tree, and that means the code he wrote is implementing the solution to a question I was asked when I interviewed at Trilogy back in college.

The reason I'm really amused by this is that I was actually asked this question twice when I interviewed at Trilogy, once on campus where I totally nailed it, and once at the actual on site interview, where I blanked in the worst possible way and couldn't manage to come up with a reasonable answer even after the engineer conducting the interview started feeding me some really explicit hints as to how to do it.

I'm reasonably certain that it's that question and my complete and total inability to answer it that kept me from getting a job offer from them, since as far as I can tell the rest of my interviews went really well.

Of course, a few months after that interview Trilogy had massive layoffs that decimated their engineering groups, and judging from the feelings about the place I got from the people I met there, I don't think I'd really want to work there anyway, so with that in mind I'll always have a spot in my heart for that particular programming problem ;-)

Monday, August 8, 2005

Doing Things The Right Way

So yesterday I started playing around with mod_speedyfeed again.

My original goal was to add Atom 1.0 support to it, but I sort of got side tracked because it turned out I had some half finished changes in my working copy, part of an attempt to make it handle invalid XML correctly. So I hacked together a working version of that code, it was ugly, but it worked, and I could move on to actually adding Atom 1.0 support, as I originally intended.

(Well, I could move on to that except that I got tired and went to bed. Anyway.)

But all day today it sort of hung in the back of my mind, you see I had solved the problem via the first method that occurred to me, and while it worked it was kind of ugly, and I was pretty sure there was a better way to do it, I just didn't know how.

Fortunately, today was Paul's first day at work, and he's forgotten more about writing Apache modules than I'll ever know, and in about 30 seconds he was able to tell me what the correct solution to the problem was.

Tonight, I implemented Paul's solution, and not only did it do the job in fewer lines of code, it's actually more efficient than my original solution due to the way Apache bucket brigades work. That's the thing that really gets me, not only is the solution simpler, it's also better, in every way I can think of.

Man that feels good.

Of course, I still haven't finished the Atom 1.0 support. Hopefully that'll happen real soon now...

Sunday, August 7, 2005

Post OSCON Wrap Up

Ok, so the week was a blur, as a result I totally didn't get a chance to write about things as they were happening. Being out drinking until 2 or 3 in the morning and then going to an 8:30 AM keynote will do that to you I guess...

First off, my talk went well. Fairly good attendance, and good questions were asked. Asa Dotzler from the mozilla foundation had some particularly good points he brought up after I was done about the kind of issues they face in their world. With such a huge amount of infrastructure and applications built on top of that infrastructure it turns out that the only way they can avoid breaking things is to make sure beta releases get out there for testing, since it's almost impossible to be sure of what people are depending on and what they aren't. He's got a point, on one hand documenting which interfaces are going to change and which are not is great, but on the other you do have to be pragmatic, and pay attention to what people have actually started to depend on in the wild.

Andy Lester said that he has my book on his desk at work. That's just about the highest complement I can think of from another programmer, and I was thrilled to hear it, since someone like him (a fairly experienced programmer who already knows how to use version control software) was my exact target audience when I was writing the book.

Brian Ingerson had an interesting mini-rant right before his talk about how OSCON is getting more and more corporate, and that he's becoming more and more concerned about people supporting the grass roots type conferences, rather than just speaking at OSCON where a lot of the hackers can't even afford to get in. I'm not sure if it was really appropriate for him to get on his soap box right at OSCON, but I agree it's something to think about.

Had an interesting conversation with some of the MySQL guys about how they're using Subversion for some stuff now, and would like to be able to switch for everything, but they're running into some roadblocks due to their current use of bitkeeper and some of the features they use don't really map to Subversion very well. It wouldn't be so bad, but they can't even sit down and hack on it themselves due to the terms of te bitkeeper license. I had been under the impression until now that a commercial bitkeeper license wouldn't include the same "you can't hack on competition for bitkeeper" clause that the old free license had, but apparently it does. I continue to be shocked that people put up with this kind of restriction.

r0ml had an interesting talk, continuing his keynote from last year about the semasiology of open source. This time he concentrated on how the word "read" has evolved over the years, which was fascinating, and the questions concerning how copyright law, the concept of public performance, and open source all intermix. I won't even try to summarize, but I imagine the IT Conversations guys probably recorded it, so wait for the mp3, it'll be worth it.

Doug Cutting talked about how the Nutch project has built an implementation of the google file system and the google map/reduce system, based on the papers on both subjects. It's interesting work in distributed systems, but the thing that really struck me was how it wasn't the actual code that was the real problem (although it was nontrivial to write, of course), but now that they have it they are having trouble testing it because their cluster has a tendency to kill their DNS server and/or routers when they try to do a distributed web crawl with it.

Dick Hardt (formerly of ActiveState, now of Sxip) had a great keynote about what he calls "Identity 2.0", comparing how identity verification works in the real world and how much worse it works online. If you have a chance to hear him speak I stronly recommend taking it, he's a great public speaker and it was a hell of a lot of fun.

Brian Cantrill had a great talk on DTrace, with a fantastic demo that showed a live listing of all functions being called while running an PHP script, from the PHP level code, through the user level C code, right into the Kernel. This really seems like a hell of a reason to think about using Solaris for a development system, I mean it's light years ahead of anything else as far as being able to peek into the internals of a running system.

Was at dinner on thursday night with a bunch of people, and a few hours in the conversation crept around to Greasemonkey, and I was shocked to discover that one of the people at the table with me was actually the original author. Bill Odom, who was also there, made a fantastic point about how in the everyday world most people are lucky if once or twice in their life they randomly meet someone who's had an impact on their day to day life from afar, but at this kind of conference we get to have that experience multiple times a day. I know it's true for me, whenever I go to one of these things I run into multiple people who have made huge contributions to tools I use on a day to day basis.

Danny O'Brien killed at the keynotes on friday, talking about good and evil in the open source world. I particularly liked his comments on the famous Ghandi quote ("First they ignore you, then they laugh at you, then they fight you, then you win") and how Ruby appears to have gon from "First they ignore you" directly to "Then you win" in the space of about three weeks, largely due to the popularity of Ruby on Rails.

Anyway, I know I'm missing a lot (hell, I haven't even told any of the stories about what happened at the bars we spent so much time at!), but I think I'll cut myself off there. As I said, OSCON was a hell of a conference, and I will absolutely try to go back again next year.

Sunday, July 31, 2005


I'll be the first to admit that it has been kind of warm lately, but personally, I don't think it's hot enough to justify the fact that my DVD player keeps shutting itself off, complaining (very briefly, as it shuts down) about something or other inside it overheating.

This is especially annoying since it loses its place when this happens while you're watching a DVD, so actually getting back to the place you were at is a bit of a pain.

Grrr, if this keeps up I suppose I'll have to replace the system (which also means getting a new surround sound setup, since my DVD player is part of my stereo), what a pain in the ass...

Friday, July 29, 2005

OSCON Todo Lists

It's only a few short days till I head off to Portland for OSCON, and as usual, I've got a bunch of things I want to get done in the meantime...

  1. Read over my presentation again, and do a couple of practice runs. It's been a while since I looked at it, and actually remembering what slide comes next makes for a much better presentation in the long run.
  2. Finish up the example for my new O'Reillynet article so I can actually write the thing. Note to self, when writing an article it's always best to actually have a working example to write about.
  3. Get some work done on Lucene4C, since it's been kind of stagnating lately and it'd be nice to have something mostly working so I can try to suck some other people into helping out.
  4. Read over the conference schedule so I can have at least some idea what presentations I want to hit.
  5. Find out where the conference hotel is, since they changed it this year, and figure out what the best way to get there from the airport is.

And of course, I've got another list of things to do at the conference itself...

  1. Find a replacement for VQ so we can resume the yearly tradition of taking over a convenient bar and drinking until far too late in the evening on as many nights as is practical.
  2. Track down brian d foy and other like minded individuals to talk about a non-perl specific magazine along the lines of The Perl Review.
  3. Make a concerted attempt to show up at the JSAN BOF/Hackathon.
  4. Make a trip to Powell's and try to get out without spending all of my money.
  5. Hang out with all the people I only see at conferences, and continue to add to that set of people.
  6. Actually go to some conference sessions and maybe even learn something ;-)

Friday, July 15, 2005

Now In Korean

Apparently my book has been translated into Korean.

I'm amused that the first I heard of this was when I got home from work and saw a little "Hey, your package is at the office" slip from UPS on my door ;-)

And since I'm too lazy to take a picture, here's some "proof". Judging from the URLs on the dead tree copies I got in the mail, that's the web site for the company that did the translation, although oddly enough that isn't the actual cover from the Korean version, the actual covor is green, and has largely Korean text on it, plus a picture of a guy sitting at a computer, with his back to you. It also comes with a CD-ROM, which the english version doesn't. Do they think that people in Korea don't have internet access and can't download Subversion for themselves or something? Weird.

I'm still rather amused by the idea that some company in Korea just translated my book. Crazy.

Tuesday, July 12, 2005


I love W. Richard Stevens' books. All of them.

Yes, even volume 3 of TCP/IP Illustrated, which everyone else I've talked to about it seems to feel is worthless.

The man was a genius, and there's a reason his family got a standing ovation at USENIX when they accepted his lifetime achievement award for him the year after he died. He touched generations of unix hackers with his writing, and despite the age of the books they remain as worthwhile today as the day they were first released.

Even so, some of them are starting to show their age, so when Bill Fenner and Andrew Rudoff updated volume one of Unix Network Programming I was overjoyed. They did a fantastic job of bringing it up to date with everything that happened in the unix networking world since the last version was released, and I'm confident that the next 10 years worth of unix hackers will be well served by that volume.

That left only Advanced Programming in the Unix Environment (APUE) as truly in need of updating, and today I saw on slashdot that the new edition of it was out. I stopped at B&N on the way home after work and snagged a copy, and so far I have to say I'm quite pleased. It's slightly thicker (and heavier) than the original, and they've added a few chapters that seem useful, although honestly I haven't had time to do more than skim them so far...

But the absolute best part of the whole thing has to be the cover, which bears one of my favorite Dilbert cartoons, the one that ends with the stereotypical bearded unix hacker telling Wally "Here's a nickel, kid. Get yourself a better computer."

Worth the price of admission, no question asked.

It's a Small World After All...

So yesterday I saw a friend of mine on AIM who hadn't been online in a while. She recently moved back to her home town and didn't have a network connection at her new place yet, so she's been living with public terminals in libraries and occasional trips to her parent's house to borrow their dial up connection, oh the horror.

In any event, we spent some time catching up, and she mentions that she's working in a local artsy theater as the snack bar girl, and that while it's a bit of a change from her previous life doing graphic design for big name companies on huge budgets she's really enjoying it. Plus, they have really good cake and don't mind her "I'm not getting older damn it" bright pink hair.

At this point I comment on how much I miss the Spectrum (which has apparently expanded since the last time I was there, since it's now the Spectrum 8, not the Spectrum 7, although both domain names work) back in Albany, and that they had the best cake...

And amusingly enough, she replies that they do indeed still have the best cake.

Apparently that's actually where she's working. Small world.

So if you're in Albany and end up at the Spectrum, and you see a girl at the snack counter with bright pink hair, tell her I said hello ;-)

Sunday, July 10, 2005

Making Javascript Bearable with JSAN

So with all the activity around doing interesting things with Javascript and DHTML lately, it seems like an awful lot of hackers who haven't really spent all that much time playing with Javascript in the past are starting to look at it more seriously now.

Personally, the thing that bugs me most about Javascript has always been that the standard way of sharing code has basically been cut and paste off of other web pages. There's no built in module system, so you're basically just #including swaths of code, and there are few good resources for finding decent code.

Fortunately, this is all starting to change. There are some great open source Javascript libraries out there (Prototype, Scriptaculous, and more) that can serve as both fantastic examples and good ways to avoid reinventing the wheel, and people are starting to build tools that work around the lack of a built in module system.

This weekend, I spent some time playing with JSAN, an attempt by some members of the Perl community to bring some of the better parts of the Perl world (namely the module system, test libraries, and CPAN) to Javascript land.

So far, I'm impressed. The test libraries and module system are quite slick, and the infrastructure for uploading new modules is starting to fall into place. Work remains to be done, but it's clear that progress has been made and they're on the right track.

After playing around with this stuff for a day or so I'd say there are a few places that still need some work.

First, there's no tool for automatically installing the packages, so you are basically stuck just downloading the tarball and copying the .js files into place manually. This isn't a huge problem, but it means that dependencies are kind of a pain in the ass.

The dependency problem rears its ugly head most noticably in the testing world. If I want to use the test libraries I basically need to bundle them with my module, and for the life of me I can't figure out how to make use of them via manual inclusion of the .js files, so that means I'm also stuck bundling a version of JSAN.js.

Finally, and this is only going to affect people who are actually writing and releasing modules on JSAN, the upload server (JAUSE) doesn't give you much visibility into what's going on. I uploaded my first module last night (well, really early this morning technically), and it hasn't shown up yet, and I have no way to tell if everything worked or not. In CPAN land the upload server seems to give more feedback to the user, via email and the ability to look at log files for the PAUSE daemon.

In any event, despite any current problems JSAN appears to be a big improvement over the existing Javascript world, and I'm sure the current problems will be worked out in the near future.

Saturday, July 9, 2005

Amusing Jewelry

For some reason these rings amuse me way too much.

Thursday, July 7, 2005

Interesting Changes...

So I noticed something interesting when I was at home over the weekend.

I've actually managed to reach the point where I can make reasonably intelligent comments about the Red Sox.

For those who think this isn't anything strange, let's just be clear, I am so far from being a sports person that it isn't even funny. I never payed attention to sports as a kid, and payed even less attention to them in college, but somehow in the past few years I managed to start caring, and now we can see the result, I've hit the point where I can comment about Fouke sucking lately and there's a reasonable chance that I actually know what I'm talking about.


I find it particularly ironic that this has happened just in time for me to move someplace where you can't actually see Red Sox games on TV without buying some extra special cable package...

Wednesday, July 6, 2005

cd ~

So I made it back from my trip to Cape Cod last night. For the record, Seat Guru rules, the seat I got had the most leg room I've ever encountered on an airplane before. Unfortunately, due to the popularity of that particular flight (Jet Blue only has one flight in each direction between Boston and San Jose, and apparently everyone wanted to fly the day after the 4th) I got stuck in the middle seat, but those are the breaks.

At least there were no screaming children sitting behind me this time...

Cape Cod was fun, as usual. The fireworks were great, got to see the family which is always good, and just generaly enjoyed relaxing a bit. Sorry I didn't get a chance to make it to Ernie and Tania's party, I was kind of out of it when I got in Saturday morning, and I just never got motivated enough to drive from Onset to Clinton.

I managed to finish off Quicksilver (yes, finally), so now I'm on to its sequel, The Confusion. Once you get past the first few hundred pages of Quicksilver it actually gets pretty interesting, and The Confusion appears to start right at the interesting part, bypassing the boredom entirely. I'll write up a better review of Quicksilver when I get some free time.

Other than that I spent a fair amount of time hacking on my new Rails based project. No details yet, but I think it's coming along pretty well, and hopefully I'll have a working version online somewhere reasonably soon for people to play with.

Anyway, time to finish going through the bloglines backlog and head off to work.

Friday, July 1, 2005

Mac Mini: First Impressions

Man, opening the box to upgrade the RAM is a royal pain in the ass. I'm so glad that I'm maxed out now so I'll never have to do that again. I was positive I was going to break the thing the first time I tried to open it, and then I was positive I was going to break it when I was getting the case back together after I was done. Fortunately, it all appears to be in working order now, but I was a bit scared at the time.

Speed is pretty good, although not spectacular. More than adequate for what I want the machine to do though.

Tiger seems nice, although it's kind of lame that the machine actually came with 10.3 preloaded on it, so I had to do an upgrade myself.

The new totally failed to handle my mail archives. The things sat there at 100% CPU usage for hours before I just gave up and went back to Thunderbird. Sorry guys, I wanted to give a chance so that Spotlight would work with my mail, but rendering the entire machine unusable while the indexing process runs just doesn't cut it.

The RSS support in the new Safari is pretty cool. I'll have to build myself a cutting edge WebKit one of these days just for kicks. Haven't had time to try the new podcasting stuff in iTunes 4.9 yet.

All in all, I like the machine quite a bit. Highly recommended.

Wednesday, June 29, 2005

OpenSolaris Users Group Meeting

So last night I decided to take advantage of the fact that I live right down the street from Sun's Santa Clara campus by going to the June OpenSolaris Users Group meeting they were having there. We got to hear Keith Wesolowski and Mike Kupfer talk about the proper way to update a development solaris system using BFU (blindingly fast update, i.e. the internal solaris update mechanism that basically just cpios the new binaries down on top of your existing ones), and how to fix a system that had been "brickified" by an unsuccessful BFU.

Overall the presentation was pretty cool, and served to illustrate a lot of the differences between life in OpenSolaris land and life with other open source operating systems. The BFU process is quite a bit less polished than upgrade processes you might be familiar with from *BSD or Linux, but that's because it can be. It's intended for use by developers, people who can deal with a few rough edges and generally handle problems that come up, so it's not surprising that less time has been spent making the process user friendly.

There was also a question and answer period, where they had a bunch of Sun engineers get up and take questions from the audience. The topics ranged from technical stuff to community relations stuff to procedure stuff to "what new code will be in the next OpenSolaris drop" type stuff. All in all I was impressed with the answers, the Sun engineers know their stuff, and they're clearly committed to making this thing work. Now all that remains is waiting to see if the community responds. I expect that it will, although it will clearly take a lot of time before OpenSolaris has the kind of community you can see today in *BSD land or Linux land.

Oh, and for anyone who has the opportunity to go to one of these things, you really should, it was quite interesting, and at the very least they're willing to bribe you with free stuff. I would have walked out with a copy of Rich Teer's book on solaris programming and a free t-shirt, but well, I already have a copy of the book, and I got the same t-shirt from the Sun guys at ApacheCon, so I decided to limit myself to a Solaris 10 DVD ;-)

Oh, and one other note, it turns out that Sun's campus is freaking huge, and there doesn't seem to be an easy way to walk directly across it without running into large buildings that get in the way. The auditorium is on the other side from where my apartment is, and to get to it you basically have to take the long way around the outside of the campus. Next time, I think I'll drive instead of trying to walk...

Tuesday, June 28, 2005

Delivery Problems

So I'm not really sure who to be annoyed with here...

This weekend I ordered a computer from Apple. It's a tiny little Mac Mini, and I got it mainly because it'll make a nice quiet desktop that won't keep me awake due to irritating fan noise. As an added bonus I won't have to screw with X-Windows on it, which is always nice. It was supposed to show up today, and when I got home sure enough there's a note from FedEx, but it's not the usual "Hey, your stuff is in the concierge office" note, it's the "You need to sign for this, we'll be back sometime tomorrow" note.

Naturally, the note has a spot you can sign to tell them "Just leave it here", but it also has the little box checked that says "You have to sign for this, we can't just leave it". I call FedEx and fight my way through their totally useless automated customer service thingy until I finally get to a human. The human proceeds to tell me that he can put in a request for the delivery guy to leave it at the concierge office, but since the office is in a different building from mine, and thus has a different address, they might not do it.

Apparently Apple pays extra so that you can't actually redirect the package, it has to be signed for at the location it's being shipped to, even if that's terminally stupid, like in this case.

So tomorrow my Mini might be here, or it might not. I've left a nice note on the door for the delivery guy, telling him that no really, it's ok, he can leave the fucking package with the office, like every fucking other delivery service is willing to do, but who knows if he's going to listen or not. If he doesn't, apparently I can either call Apple and have them redirect the package to my work address (since they paid extra to make sure I can't do it myself, idiots), or call FedEx and make them hold it at their warehouse somewhere so I can come pick it up myself.

The really amusing thing is that I ordered the Mini online so that I would avoid having to jump through hoops to get it, since the various places I had tried to purchase one in person hadn't had the exact one I'd wanted. The mind reels.

So I can't decide, do I get pissed at Apple for going out of their way to make sure I can't fix this problem myself, or do I get pissed at the FedEx guy for having an overly literal interpretation of the rules. I know, I'll get pissed at both, that'll be fun.

Monday, June 27, 2005

Wanna Hack On Bloglines For A Living?

So at the Webmaster World Search Conference last week I was on a panel with Jeremy Zawodny, and he mentioned that he gets a LOT of response when he posts Yahoo! job opportunities on his blog, even better than Yahoo! HR gets when they post the same job elsewhere.

I guess it's just a matter of putting those sort of things in front of the right audience, a lot of the people you'd like to hire for that kind of job already read his blog, whereas they probably don't happen to read the Yahoo! job listings nearly as often.

Coincidentally, we're looking for some engineers at Bloglines, and I bet a fair number of the people who read this blog are the type of people we'd like to hire, so I figured I'd throw it out there.

So if you're a C/C++ hacker with experience in web applications, Unix systems, open source software, and are generally pretty comptetent, I'd sure like to hear from you. It'd also be great if you know your way around modern weblog technology. The jobs are located in our Los Gatos office, so people local to the bay area would be great, but as you can see from the fact that they hired me, that isn't a requirement, as long as you're willing to move here your current location isn't a hard requirement by any stretch of the imagination.

Oh yeah, the job listing...

Senior Software Engineer, Bloglines

I believe we're also looking for non-senior people, but I can't find the listing for that one. Just look at the senior position and lop off the word "Senior" and a couple of years worth of experience and you'll get a good idea what the requirements are for that job.

If you think either of those job descriptions sound like you, please send a copy of your resume to my work address (grooney at askjeeves dot com) and I'll make sure it gets to the right people.

Saturday, June 25, 2005

SQLite Use Increasing

So I was playing around with OpenSolaris this weekend, via a SchilliX live CD, since I had trouble getting the Solaris Express CDs to actually boot, and I noticed that the new smf framework in Solaris 10 is using SQLite as its data store. If you poke around in there you'll find the sqlite command line client, and sure enough you can use it to mess with the databases if you're so inclined.

Of course, as with most topics in OpenSolaris these days, a little poking around reveals a blog post talking about it, and as you might expect, actually going in and messing around with the database by hand is most definately not supported ;-)

Still, it's quite nice to see companies like Sun building on top of tools like SQLite (and LibXML2 for that matter, which smf also uses) rather than implementing their own versions of the same functionality.

Note that this is at least the second major company I've seen building on top of SQLite. Apple also bundles it with Mac OS X, as part of their Core Data library IIRC.

For the curious, the actual code for the smf framework can be seen here, and sure enough, it contains a bundled copy of the SQLite source.

This kind of reuse is exactly the reason I think it's great that low level libraries like SQLite are often released under liberal licenses (SQLite is public domain, LibXML2 is MIT licensed), so that commercial software can feel free to build on top of and even contribute fixes back to them when possible.

Friday, June 24, 2005

Text Ads

So I'm experimenting with Typepad's new text ads feature.

I'm not sure if I like them or not yet, but I'm keeping an open mind for the time being.

So far, it seems like you need to jump through a fair amount of hoops to make them work with a custom template, but once you jump through those hoops they seem to work reasonably well.

Let's see if I still like them when my account is registered and they start serving up actual dynamic ads as opposed to the temporary typepad ads you get at the beginning...

Use of Color

So I've been reading (among other things, I've got this perpetual pile of books that I'm currently reading sitting next to my bed or on my coffee table) the latest edition of Effective C++ by Scott Meyers.

If you're a C++ programmer, odds are I don't have to tell you what a great book this is, and that even if you've read the first or second edition you really should go out and get the third, since it's got a lot of new stuff in it that brings the various topics up to date with the current state of the art. All this goes without saying when you're talking about a book from Scott Meyers.

What I do want to talk about is the way Meyers uses color in the book, because it seems to be pretty unique as far as I can tell.

The book is printed in black text on a white page, as you'd expect, but Meyers has gone out of his way to highlight various interesting parts of his examples and text by making them bright red, so they clearly stand out to the reader.

Rather than just showing yet another version of the piece of code he's been modifying throughout the current example, subsequent iterations of a design will have the new additions highlighted in red, so it's quite clear that, for example, the reason this version of the code is better than the last one is that the Window parameter is being passed by const reference instead of by value as in the previous version of the code.

So as to avoid totally screwing over the color blind among us, the examples also include descriptive comments that serve to draw the reader's attention to the section of code in question, in addition to further elaborating on what's being changed.

This isn't the first Meyers book that has used this technique, he does the same thing in Effective STL, which is also quite worth picking up, but so far I haven't seen a whole lot of other authors making use of it. If I had to guess I'd say it's probably because printing in multiple colors has to make the production process for the book quite a bit more expensive, and unless you're someone like Meyers, for whom publishers can be pretty damn sure any given book he writes will be a smashing success, it's probably pretty hard to justify, even if it does make the book quite a bit more readable.

Oh, the Irony

I find it incredibly amusing that at a Webmaster World conference, filled with people who make their living using the internet, I was consistently able to get better network connections via my cellular phone than I was via my laptop's wifi card.

Tuesday, June 14, 2005

Travel Plans

So I'm going to be spending way too much time in airports in the next few months...

Thursday night I take the redeye back home to MA for a friend's wedding. I'll be there until sunday afternoon at which point I return to CA.

Then, on tuesday I fly from CA to New Orleans, where I'll be filling in for Mark on a panel on RSS at Webmaster World. Then on thursday I head back to CA again. I've never been to New Orleans, so if anyone has any tips for what to do when I'm there please feel free to share them.

I've got a week or so on the ground, then I take the redeye back to MA again on July 1st. I'm at my parent's place on Cape Cod through July 5th, at which point I return to CA again.

Then, I've got a few weeks off, until I fly out to OSCON on August 2nd. I'll be presenting about Backwards Compatibility in Open Source Projects (note to self, write talk about backwards compatibility in open source projects) on the 3rd, then I fly back on saturday the 5th.

So far, that's about it, which is a good thing, since my credit card can't take much more of this ;-)

Monday, June 13, 2005

The Best of Software Writing I

So I got my hands on an advance review copy of The Best of Software Writing I, a new book that collects a bunch of really well written essays about software development, edited by Joel Spolsky.

So far, I'm quite impressed. Much of what's included are essays I've already seen in one form or another, but a number of them are new to me, and all of them are, indeed, quite well written and thought provoking.

A few that stuck in my head:

danah boyd's "Autistic Social Software" - What a fantastic articulation of what's wrong with, well, all sorts of stuff. I need to go back and reread this a few more times, but even the first pass gave me all sorts of ideas that just won't get out of my head.

Bruce Eckel's "Strong Typing vs Strong Testing" - I had much the same thought process as he did regarding the code examples in my book, and if I ever do it again I'm going to automate the testing process, because he's totally right, just because it compiles doesn't mean it works.

Eric Johnson's "C++ - The Forgotten Trojan Horse" - I'm biased here, I used to work for EJ, but seriously, take my word for it, he's right on the money with this one. It's funny though, how easily I can see the seeds of this essay in his old posts on our internal newsgroups back at $COMPANY, especially the one where he compared C++ to a drug dealer and template metaprogramming to a weekend bender. I really hope that having this one published convinces him that he needs to write more of these, because I know for a fact tha the's got a lot to say.

Anyway, that's just a few of the essays I made it through today. The whole book is fantastic though, and you should absolutely pick it up when it's available in dead tree form, I know I intend to.

Sunday, June 12, 2005

X Windows Can Bite My Shiny Metal Ass

You know, it's been a long time since I had trouble getting X windows to work on a machine. I mean back in the day I would think nothing of fighting with X for days in order to get whatever video card and monitor I happened to have access to working nicely together, but I really thought we were past that point these days.

Apparently not.

You see, last night I decided it was time to actually take the pile of computer hardware that's been sitting in my bedroom since I moved here and make it do something useful. This meant I needed a monitor (since all I've got left after the move is a really crappy one that isn't worth using since it only works at like 1024x768 or something), so I went out to Microcenter and picked one up.

It's really nice too, 20.1 inches, flat panel, 1600x1200 display (since it would be just too damn pathetic if my laptop display was better than my desktop display), etc.

So I got my brand new display home, hauled out my desktop, and started fiddling with it.

9 hours later, I have admitted defeat.

The built in video (some ATI thing) refuses to drive the display at anything more than 1152x864, which while nice, is not nice enough if we're to meet the "at least as good as my fucking laptop" criteria.

Note that under windows it has no trouble doing 1600x1200, but it's not like I ever actually boot this machine into windows, so that's kind of academic.

Ah Ha! I've still got my old Matrox g450 dual head video card, I know that used to work with X windows, I'm sure I can get it working now, I mean it should be easy, I was able to make it do dual head before, and now I'm just asking for one monitor, that's simple by comparison...

Except that for some reason (despite adding all the requisite BusID voodoo to the xorg.conf file) I can't actually get the damn thing to do anything useful with this card. I can boot up in text mode just fine, but as soon as I type 'startx' it just blanks the screen and eventually turns it off. It's not like X can't see the video card, since Xorg -scanpic finds it just fine, but no amount of sacrificial animals appears to be able to convince it to work.

Needless to say, windows also works fine with this card. 1600x1200, millions of colors, etc.

My latest theory is that I'm still running with a rather old BIOS, and since I know an updated BIOS was in theory needed to get the built in video and the video card to work at the same time (which I once wanted to do in order to get a triple headed system running) maybe that would help.

Of course, I can't actually flash the BIOS because to do that you need to boot off a freaking windows 95 boot floppy. I don't have a freaking windows boot floppy, and even if I did I don't have a floppy drive in this machine. Since when do you actually need floppy disks to do something? What year is this again?

So I'd just like someone to explain to me why I shouldn't drive right to the nearest Apple store and buy a fully loaded Mac Mini? I mean I know it'll freaking work, and it'd be a hell of a lot quieter than this thing is...

Maybe later this week, when I'm not quite so pissed at the world, I'll give Linux a try on this machine, maybe it'll have better luck with this monitor/video card combination. I was really hoping to put FreeBSD on this box, since I miss it oh so much, but if X won't run at a reasonable resolution that's kind of a showstopper for me.

Just be thankful I'm leaving the rant about this machine's "fail to actually boot half the time unless you unplug the ATA drive" thing for another day...

Friday, June 10, 2005

Talk About Missing The Point

So I enjoyed the book "Starship Troopers".

I don't agree with all of its ideas, but at the very least you must admit that it does a reasonable job of making a case for them. The idea of a government where citizenship is based on military service, and thus the only people who have a say in government are those literally willing to risk their life for it, even if you don't agree with it, at least it's interesting.

When the movie came out, I went to see it, and I had pretty low expectations, I mean statistically speaking movies based on books I enjoyed rarely do justice to the original.

With those kind of low expectations, it wasn't hard for the movie to exceed them. I mean once you realized that the movie was totally different from the book, that it pretty much dropped all pretense of being about the political theory side of things, and pretty much ignored all the technical realism of the book, and really the only similarity was the existence of the aliens and the names of the characters, it wasn't all that bad. At the very least it was enjoyable as an action film, if nothing else.

So tonight, when I caught "Starship Troopers 2" on cable, I must admit, I was expecting something that was at least within spitting distance of the first movie, if not the book.

It wasn't even close. It was nothing like the book, and nothing like the original movie, it was basically a bad horror movie, set in the world of the first movie. Zero redeeming qualities.

What a waste.

Sunday, June 5, 2005

Old Habits

So back when we were on co-op, Rob and I went to see a lot of movies.

You see, we didn't have air conditioning that summer, and it was really hot out, so we took any available excuse to go someplace that did have air conditioning, and the standard place was a movie theater.

So we saw lots of movies. Pretty much everything that came out that summer, which is impressive when you consider that it included such gems as Lake Placid (best giant gator movie ever!) and Deep Blue Sea (watch Samuel L. Jackson get bit in half by a giant superintelligent shark!). I had already been in the habit of seeing a lot of movies, but that summer really pushed me over the edge, into the "see anything and everything" neighborhood.

These days, I've got air conditioning, so I don't have the excuse anymore, but I still seem to see an awful lot of movies. Not quite up to my old level, but close. I still have staggeringly low standards.

This week's contribution, Lords of Dogtown turned out to be quite good, although now I'll have to go back and watch the original documentary, just out of curiosity.

I was particularly amused by the fact that I didn't put the name of one of the main characters together with the name of the skateboard company he founded until they mentioned it at the end, even though I actually remember my next door neighbor drooling over stuff that company made back when we were kids.

In any case, it's worth seeing.

Wednesday, June 1, 2005


So among the things I left behind in CT was the grill.

Well, it wasn't really my grill, it was Jason's, but it lived at our apartment since he didn't have any place to put it at his place.

In any event, it was awfully nice having it around during the summer months, and since every month feels like a summer month out here acquiring access to a grill seemed like a good thing to put near the top of the todo list.

A while back, I read about the Weber Baby-Q Grill on Jeremy Zawodny's blog. I rarely cook for more than two or three people at most, and thus it's pretty much the perfect size for me. I ordered one a few weeks ago, and since then I've been enjoying it immensely. If you're in the market for a nice grill that isn't too large or expensive you really can't go wrong with this one. It lights instantly, grills everything I've tried beautifully, and if you don't like the idea of small propane tanks it uses you can get an adapter that lets you hook it up to a standard 20 pound tank. Highly recommended.

Anyway, it's just about time to throw that steak on the grill...

Monday, May 23, 2005

What's Garrett Up To?

So most of my recent posts have been about the whole "moving across the country and starting a new job" thing... But that's obviously not all I've been doing, I've got the standard collection of geeky shit jumping around in my head.

In summary:

  • I'm playing with bridging the gap between C++ and Java via GCJ, for use in Lucene4c. I've recently come to the conclusion that actually reimplementing the Lucene libraries in C, while fun, is not the best way to go about making Lucene's functionality available to C programmers. My new GCJ based version is available in the ASF Subversion repository, specifically in Lucene4c's gcj-backend branch.
  • In an effort to bring my HTML/CSS/JavaScript skills kicking and screaming into the 21st century I've been reading up on Web Standards Solutions (great book by the way) and trying to wrap my brain around all the recent AJAX stuff that's been going around. So far, I think it's all very neat. The HTML/CSS stuff is a clear win, and I'm looking forward
    to applying it going forward. The JavaScript magic is also cool, but I think we need to be careful to apply it where it's needed, not just where it's fun.

Anyway, those are the main "Geek" topics that have been rolling around inside my head lately, at least the outside of work topics anyway ;-)

Wednesday, May 18, 2005

Eye Opening

I'm really not sure what to say about Bill Moyers' speech about the state of journalism in America, other than that you should go read it. Now.

Sunday, May 15, 2005

Moved In

Well, after far too much unpacking, I'm mostly settled in my new apartment.

The moving guys showed up right on time yesterday morning, and with only a little trouble getting the box spring for my bed into the bedroom (it turns out there was one way to make it fit, but it took us about 5 tries to find it) the move went well. The appartment looks quite a bit better with stuff in it, and actually seems a bit larger than I'd expected, which is always a nice surprise.

I spent most of the rest of the day unpacking (18 bags of packing paper and about a 3 foot tall pile of flatened cardboard boxes at last count), with a brief pause in the afternoon to allow the cable guy to hook up my cable and network connection.

Anyway, so far the apartment is great, and it's nice to actually be moved in. There wasn't anything wrong with the temp apartment mind you, it's just that the whole "temporary" feeling gets kind of old after a while.

I've still got about a million and one things to do to get settled here, but at least the process has started, and that's the important thing.

Sunday, May 8, 2005

A Productive Weekend

I appear to have fallen out of the habit of updating my blog regularly. Lets try to summarize recent events...

  • O'Reilly put up the website for OSCON 2005, including the description of my talk about Backwards Compatibility in Open Source Projects. There are a ton of other cool talks scheduled as well, so if you can make it out to Portland for the conference you absolutely
  • I signed the lease on my new apartment. It's a 1 Bedroom on the second floor of a building at the Mansion Court complex in Santa Clara, just a few blocks from my temporary corporate housing. Tomorrow morning I'll call to schedule a time for the movers to show up with all my stuff, since right now the place is looking pretty empty.
  • In an effort to do something about the "this place looks pretty empty" problem I made a trip to IKEA today. I'd never actually been before, but it certainly lived up to expectations. I ended up picking up a bookcase, and I'll probably order another one via their website
    soon, since I'll need more space for books, and the size I really need won't fit in my car.
  • Since Chris recommended it, I picked up a copy of Mercury for the PSP, and it's been sucking down all my free time. Cool game though, if you've got a PSP you should absolutely pick it up.

Anyway, back to Mercury...

Wednesday, May 4, 2005

Another Milestone

As of this afternoon I am now licensed to drive in the state of California.

Apparently my "getting things right on multiple choice tests even if you aren't sure of the right answer" skills have held up rather well since high school, because I only got one question out of thirty six wrong.

Of course, next week I have to go back again and register my car. You need to get a CA license within 10 days of starting a job here, but you're given 20 days to register your car. I still can't figure out why there are two different deadlines for that sort of thing, but whatever...

Now all I have to do is finish this whole "Getting an Apartment" thing and this week will be a total success...

Thursday, April 28, 2005


I just fixed my first bug in bloglines!

It was just in the unreleased development version, so nobody outside the people here in the office will notice the difference, but I'll know, and that's what matters ;-)

Wednesday, April 27, 2005

I'm Such An Idiot

So apparently I'm totally incompetent, and managed to delete virtually all of my AIM buddy list today. So if you think I should have you on that list, you might want to IM me so that I can add you again. So far I've only been able to recreate the names of the people I've actually talked to on this particular computer rather recently, since all I had to work from was the logs I still had lying around...

Tuesday, April 26, 2005


I'd like to point out the irony in the fact that "Microsoft Outlook Web Access" (i.e. the webmail thingy for MS Exchange) works a hell of a lot better with a Mozilla based browser than the lotus notes webmail thingy we had at my previous job.

Monday, April 25, 2005

First Day

Today went pretty well.

I overestimated the time it would take me to get to work (better than underestimating it I guess), and showed up a little earlier than I planned to. Then it turned out that I failed to account for cultural differences between California engineers who work on web based RSS aggregators and Connecticut engineers who work on financial software, because I had to wait around about an hour before anyone actually got to work.

Once my coworkers arrived we had the usual fun getting my computer set up and usernames and passwords worked out and so forth, and we managed to miss my orientation meeting with the HR people, but other than that things went about as well as can be expected. I got to meet the people I'll be working with (some of them for the second time), and they all seem quite cool. I'm especially impressed with Mark's ability to be amusing after having been woken up by a crashing database server at 3AM ;-)

Spent most of the day reading over parts of the codebase while we waited for RedHat CDs to download. Those finished just as I was about to leave, so tomorrow we can reinstall my computer and get a development environment set up for me, then I'm off on whatever project Mark and Paul decide I'll be working on.

Saturday, April 23, 2005

Day 7: Santa Clara, CA -> Santa Clara, CA

Ok, so it's not like we actually drove all that far today (a mile or so?), but in some sense this is the last leg of the trip, as today we were able to get into my new (temporary) apartment for the first time.

Spent most of the day killing time, since I wasn't technically supposed to show up at the apartment until 4PM. This involved breakfast at IHOP, wandering around Microcenter (they had a copy of my book!), catching a movie, etc. Once the movie finished up we decided to head on over, despite the fact that we were technically a little early.

Fortunately, the complex had everything set up already, and we were able to basically walk right in. The only catch was trying to park in the wrong parking garage (they don't indicate anywhere which parking spaces are in which garage, so I went through the entire first garage looking for space 300 only to find that it's in the second garage), other than that everything went perfectly.

The place is nice, really nice. It's right across the street from a supermarket, and a reasonably short (15 minutes or so) drive from the office, so all in all I'm pretty psyched about it. Getting motivated enough to find a new place may require some effort though ;-)

Day 6: Long Beach, CA -> Santa Clara, CA

Well, we're finally here. The drive up the CA coast was great, and we rolled into silicon valley around 8 or 9 last night. Unfortunately I can't actually get into my new apartment until late this afternoon, so now begins the time honored tradition of killing time. Fortunately there appears to be a movie theater just down the street from our hotel, and the first shows start reasonably soon after we have to check out...

One thing that did amuse me about the ride up though: there are these huge sections of California with big rolling hills, covered in green grass and alltogether too perfect trees, it looks like something out of either a model train set or a miniatures battle, quite strange.

Anyway, I imagine much of the rest of today will be spent in the "figuring out where things are" process. The temporary apartment seems rather close to where we are now, and I think I know how to get to the office from there, so at least that's a start...

Friday, April 22, 2005

Day 5: Las Vegas, NV -> Long Beach, CA

Once again, I didn't get around to posting this last night. Oh well.

Vegas remained amusing, as ever. I mean where else can you see such astounding examples of hubris? A replica of New York City built in the middle of the freaking desert! Right down the street from a roman colloseum, and a pyramid, and a sphynx, and a pirate ship... It truly does boggle the mind.

Plus, where else on the planet can you ask the question "where is the buffet?" and have the answer be "oh, next to the lions."

In any event, we hung around vegas for most of the morning, then headed out towards LA, a nice 3 hour drive, as opposed to the usual 9 or 10 hour drives we've been doing up to now. When we finally got to our destination (Long Beach), we wandered around for a while, looking for something to do to waste time while we waited for my friend Ellen to get out of work. We eventually gave up and just found a hotel room (yay internet accesss!).

Ellen eventually met up with us later on, resulting in a trip to Krispy Kreme and a rousing game of Set back at her place. She still kicked my ass, but in at least one game I was only behind by 3 sets, so I consider it a moral victory.

Anyway, time to take a shower and check out of the hotel. Today the plan is to head up the coast towards our final destination, although as usual, things may change at the last minute (I like to think of it as "Just In Time Planning").

Thursday, April 21, 2005

Day 4: Denver, CO -> Las Vegas, NV

Ok, I didn't get around to posting this last night, but sure enough, given the choice between Salt Lake City and Las Vegas, we decided to go with Vegas.

As my friend Ellen pointed out: "Hmm, let's see: stronghold of mormon conservatives, versus promiscuous city of wanton sex and gambling? Tough choice!" ;-)

Of course, the irony is, all we did when we finally got here was find a hotel (the Holiday Inn Express was our first choice, primarily because the Oscar Mayer Weiner Truck was actually parked in the parking lot, but they were out of rooms, so we ended up at some other Marriott variant next door) and go to sleep. Today we'll hopefully spend some time exploring before heading out to LA.

As for the trip from Denver to Vegas, I must say it was interesting. The rockies are impressive, at least once the fog cleared, and while Utah is rather empty, it's nothing if not beautiful countryside. I got some good pictures which will hopefully turn into an impressive panoramic shot of the scenery, assuming I can manage to master one of those programs that stitches such things together. Continuing on we actually managed to run into a brief snowstorm, and eventually ended up passing through a wonderfully twisty and turny road through the mountains of Arizona in the dark. The trip ended with a drive through Nevada (which as EJ pointed out, is the tackiest state in the union, although that's part of its charm) in the dark, which looked pretty much like you're driving through a cartoon. Everything is either black (the road) or pinpoints of light (approaching cars and stars), with silhouetted mountains and a wonderfully gradiented sky. It really did look very cool.

Anyway, that's about it for now. Off to break our tradition of driving someplace as quickly as possible and then leaving ASAP ;-)

Tuesday, April 19, 2005

Day 3: New Florence MO -> Denver CO

Today has been largely focused on porn.

Not on actually looking at it of course, but on theorizing about it.

You see, it turns out that Missouri has a far larger number of roadside porn superstores along route 70 than you'd guess. Kansas, on the other hand, has very few, and Colorado has pretty much none.

Does this mean that Kansas and Colorado have something against porn?

Our current theory is that it's not actually Kansas and Colorado being particularly anti-porn, just that the parts of Kansas and Colorado we drove through have way fewer people than the section of Missouri, and while roadside porn stores can probably extract some kind of business from the interstate trucker community it seems unlikely to be enough to really sustain a business if it's unable to also draw on some sort of local community support.

In any event, that's the most interesting observation from today's drive. Kansas and the first half of Colorado aren't all that interesting really. Kansas is large areas of farmland, with almost nothing else, and eastern Colorado is a slightly smaller area of farmland, which actually has less non-farm type stuff than Kansas had.

Here's the google map for today's journey, although it's not all that interesting considering that the entire trip was along one road...

Tomorrow is still up in the air. The original plan was to head through Colorado and into Utah, ending up in Salt Lake City. That's still a possibility, but considering our rapid progress the idea of heading down to Las Vegas has become an attractive possibility, especially since it would allow us to drive up through much of CA, which is actually an interesting drive, and honestly I'm not all that psyched about seeing Salt Lake City.

We'll just have to see what tomorrow brings us...