Archive for November, 2005

November 28th, 2005

Booch is writing a Handbook of Software Architecture

by Tim Cull

So one of the original Gang of Four has taken on as a project nothing less than cataloging all common software architectures in one place. So far it looks like an early work in progress, but I think it could be very interesting if he succeeds.

November 28th, 2005

Been seeing Ruby more often

by Tim Cull

What I keep hearing over and over again is just how easy it is to use, for greenfield development, of course. But the fact remains that it’s still a scripting language and not a general-purpose language like my good old workhorse, Java.

That didn’t stop someone from writing a comparison of Ruby and Java. I’ve got to admit, one thing Java sure ain’t is simple, especially in the web development arena.

November 23rd, 2005

How “distinct” hides bad sql

by Tim Cull

So we’ve got a new guy in the group who’s fresh out of college. Most people fresh out of college don’t know much about sql and he’s no exception, although he’s catching on.

So one of the first things I taught him was to avoid one of my pet peeves: “fixing” a bad sql statement by slapping a “distinct” on it. If you find yourself using distinct and you don’t know why, then that’s a sure sign that you’re hiding an accidental cartesian product that will eventually kill the performance of your database.

The very next day he sent me a link to this old post, about the very same thing:
http://www.onlamp.com/pub/a/onlamp/2004/09/30/from_clauses.html

I guess I’m not the only one annoyed by it. And I learned something, too, about how to decide to use a correlated subquery or not.

November 20th, 2005

Uses for Open Source

by Tim Cull

So open source projects have some obvious uses:
1) getting free software
2) occupying your time with something other than watching tv

But I’ve recently been thinking about how to use open source as a career tool. I’m thinking about keeping my skills sharp and bolstering my resume by finding an open source project to contribute to. My ideal is one that’s really good, fills a useful niche, and is just on the verge of being discovered and getting big. Then I could even write a book about it (or at least some magazine articles).

Not surprisingly, I’m not the only one thinking along the career path line. Brian Fitzpatrick at OnLamp wrote an interesting post about
open source as internship

November 3rd, 2005

Hazards of dead code

by Tim Cull

So we’ve been suffering with a nasty bug that caused our application server to run out of memory (1.5 GB worth, the limit you can have for a JVN running on a Windows machine) when under heavy load. The whole team had been looking for the cause for months, we hired a pair of Thoughtworks consultants to find it, and still the leak avoided detection.

Finally, by sheer accident, I found it. It turned out that deep in our logging code was a single statement that added every single log line ever written also to a Vector held in memory by each EJB. Since our application was doing a lot of logging (including logging entire FixML messages), that meant that we were holding 500MB of useless data in memory forever.

This code was apparently a hack from many years back that was necessary in order to somehow return information to our Visual Basic GUI. The functionality was no longer needed, but the dead code saving up all the logging information was still there. Talk about a prime example of dead code biting you! (and a prime example of why you shouldn’t roll your own logging code).