Archives for February 2006

Back to Archives

Slightly Less Bad

Far be it from me to claim to have anything but distain for Internet Explorer, but I have to say that the IE Developer Toolbar is really cool. It's certainly made cross-browser developer quite a lot easier.

Tracking User Interactions

One of the more interesting things (to me at least) that I did in the process of launching the new map application was add tracker calls in the database to reflect usage that normally wouldn't get reflected in the stats. I'm using Google Analytics for this, and I hadn't realized just how easy it was.

In the map application it's important for us to know about user interactions. How are people using the map? Are they doing searches? Are they clicking the map links to find buildings on the map? Are they clicking on the map to find info about buildings? — Continue Reading...

If Only I Didn't Keep Coming Back

Every time I go to install qmail I cringe (the Rick Moen rant I linked to back then has moved here). I've run qmail for a long time, probably since the late 90s. I like the fact that I usually end up installing it and then pretty much forgetting about it.

But, well, I sort of have to forget about it because I can never understand how to stop it. Inevitably I end up letting the server just run, and when I finally do have to kill it for some reason that involves me tearing my hair out while trying to kill svcscan processes that keep restarting everything I stop.

Yet somehow I keep ending up with qmail. I can't escape it.

Launched, but Still Tweaking

So our new app is launched. It's an interactive map of Downtown Los Angeles that we developed for the Downtown Center BID and linked to their data. You can find it via the BID's website or via this direct URL. It requires Flash 8, so if you don't have that you'll be asked to upgrade (though the sidebar will still work unless you're running Firefox on Linux).

The sidebar is Javascript over Rails over MySQL. The map application is Flash, and it does a lot of back-and-forth communication with the javascript.

Now that the app is up, I discovered that the biggest perceived-lag on load was the javascript. I'm using prototype.js and the scriptaculous libraries, and those are pretty hefty. All told my JS was roughly eight files and 140K. That's not huge these days, but because the JS loaded up front nothing was displaying until those files had gotten down. — Continue Reading...

Two Times Would Be the Charm

When I was first learning how to program for modperl I remember hitting the weirdest errors and thinking the application was out to get me. I mentioned that here many times. Usually the problem ended up having to do with me failing to account for persistence. When things stay in memory between runs, you have to be super-thorough to not make a mess with global variables and such cruft like that.

Today I'm having the same sort of issues, but with Flash. When using our app on IE it would appear that it works perfectly the first time, but if you reload it hangs up and eventually you get a message saying that the script is taking too long, would you like to kill it?

Update (1:45am): Found the cause and a solution, so I'm happy. — Continue Reading...

Apple Can't Do New Intel Math

I'm less than impressed by Apple's software quality control lately. I got an iPod recently, and one of the first things I had to do was install the November firmware (which I had to download... mine shipped with a newer one on the CD) to get away from a bug that caused most mp4 videos to quit working a minute or so in.

Now iTunes is dying on me, and the error message from the report is interesting:

Exception:  EXC_ARITHMETIC (0x0003)
Codes:      EXC_I386_DIV (divide by zero)

Thread 0 Crashed:
0   <<00000000>>    0xffff0329 __gettimeofday + 73 

Divide by zero, every time. Odd.

Some Much Nicer Numbers

It feels funny to go from a post about getting engaged to a post about benchmarking, but oh well.

We're preparing to launch our first Rails app at work today, and so in prep I had mentioned previously that I was looking into performance setups. With WEBBrick, the all-Ruby simple server, I could do about 7 requests / sec to a reasonably intensive search function.

I've now done much better.

Continue Reading...

My Weekend

So yesterday I asked Kathy to marry me.

And she said yes.

I would assume that makes my President's day weekend more eventful than yours, but perhaps not.

I'm not someone to have rehearsed what I was going to say ahead of time or anything like that, but I couldn't have been happier with the way things turned out. We went up to Franklin Canyon Park, hiked twenty minutes or so up the Hastain Trail and then just sat on a bluff (approximately here) with a view of the Pacific and even Catalina. We talked for a while and somehow I managed to ask the question without sounding as nervous as I was. Not that I was particularly nervous about what she would say, but as the moment came near I had no clue how I was going to do it.

The where and when will come sometime soon, but not yet. One thing at a time.

Escaping and Backslashes, Oh Joy

Over the past few days I noticed an annoying issue where a by-address search wasn't behaving properly. I would search for, say, "santa fe" and would get only four results even though I knew there were five in the database.

The Rails code that was generating the search was pretty simple:

@buildings = Building.find(:all,
  :conditions => [ 
    'address regexp ?', 
    '^[^\n]*' + building[:address].downcase 
  :order => "address ASC")

So for that santa fe search I should get:

FROM buildings 
WHERE (address regexp '^[^\n]*santa fe') 
ORDER BY address ASC

But that's not what I'm getting. I'm actually getting that regexp as '^[^\\n]*santa fe'. So instead of preventing newlines before the address, I'm actually preventing backslashes or n's. The missing result -- on "N. Santa Fe". — Continue Reading...

Now on to Performance

For work I have a Rails app that we're going to be taking into production on Wednesday. As such, I figure I should probably start taking more than a passing interest in things like performance.

During development I've just been using WEBBrick, which has been great since I just use svn to update the server and boom there are my changes. Unfortunately, though, it's not all too quick. And even more importantly, it can't scale past one CPU. Seeing as the server has two, and with hyperthreading it thinks it has four, I figure that's an issue. But at least WEBBrick gives me a baseline performance number of 7.2 requests per second (for an arbitrary but fairly intense operation) that I can build off of.

I installed lighttpd yesterday (which I keep trying to misspell as libghttpd), but all I've managed to get Rails to do in FastCGI mode is segfault.

More Browser Fun

Firefox (and Camino) on the Mac apparently can't pop an element up over the scrollbar on a div. The scrollbar just shows through, cutting into your popped up element. This is not the case with Firefox on Windows. Neither IE or Safari have a problem with it.

On the other hand, I've managed to create a bold style that Safari decides to just not show sometimes the first time you display a list that features it. As soon as you touch the scrollbar it pops into view. Sometimes I even see the text before it disappears. Changing the tag doesn't alter the behaviour. Of course it has no problem if I load the same HTML and style into a flat HTML file, so I don't know how to even begin to debug that one. None of the other browsers have an issue with it.

Oh Yeah

The other thing I discovered this morning was that I've apparently written some javascript that causes Firefox 1.5 on Linux to segfault. It works fine in Firefox on OS X, Camino on OS X, Safari on OS X, IE on Windows, etc, but as soon as i activate a certain form element on Firefox/Linux the browser vanishes.

Not a big loss, though, as the main part of the app doesn't work there anyway thanks to Macromedia not releasing a Flash 8 plugin for Linux.