Fix for Vi’s broken arrow key support in iTerm

So, I got turned on to iTerm, a prettier and more user-friendly alternative to Apple’s native Terminal.app.

However, for some reason, I got the following error message whenever I tried to use arrow keys in Vi:

Usage: [[

The problem is that Vi is faithfully responding to the TERM variable that iTerm is sending. (I’m not sure why Terminal.app and PuTTY don’t suffer from this issue, but c’est la vie.) So, you should keep the terminal setting in iTerm to xterm-color, since this is great for most things, but then add this setting to your .exrc file to tame Vi:

set term=linux

Not sure why this fixes it, but it does. set term=cons25 was another fix that I found, but it seems to break if you have line numbers turned on, because all tab characters are turned into backticks (`).

Point of Style: Differentiating Objects from Constructors in DHTML Widgets

So, you’ve read about Object Oriented Javascript, and how it can help make your Ajax and DHTML and other Web 3.14159 widgets and tools more robust.

You’ve learned about how the prototype object can allow you to customize objects in a memory-efficient way, and maybe even learned a few code patterns for building objects.

You’ve even gone so far as to minimize your Global usage by putting everything under one global object.

So, let’s say that you have a Menu widget. There might be more than one, but then again, there may not be. You might have to refer to it again, and you might not. And even if you dont’ have to, it’d be convenient to leave the door open. How do you name your constructor function, and what do you call the object it creates?

Read the rest of Point of Style: Differentiating Objects from Constructors in DHTML Widgets »

Unfriendly Skies (Or, Why does American Airlines hate their customers?)

I am never flying on American Airlines again.

So, I’ve heard it said that you should get to the airport at least 1 hour ahead of your flight’s departure time for domestic flights. In the several times that I’ve flown up to San Jose from LAX, I’ve found that an hour is a bit excessive. I usually get there 40 minutes or so ahead of time, and spend 10 minutes getting to the gate, and sit around for half an hour.

This time, I inadvertently booked a flight on American Airlines; apparently I forgot the last time I flew with them and the awful experience that was.

My flight was for 7:55. The traffic gods smiled upon me, and the 405 was virtually traffic-free, so I ended up getting there right at 6:55. “Well,” I thought as I stepped off the parking shuttle, “at least I’ve got a laptop, so I won’t be bored while I wait around at the gate.”

How very very wrong I was.

Read the rest of Unfriendly Skies (Or, Why does American Airlines hate their customers?) »