event:Selectors — Like Behaviour But Better

If you do any DOM Scripting, there's a good chance you’ve heard of the Behaviour library. Or, in case not, the basic idea is that the library allows developers to apply functions to elements or their event handlers through CSS selectors.

Behaviour is really cool and has made my life easier. All the same, a successor may be in the wings — event:Selectors is very similar but it adds pseudo-classes so that event handlers can be specified right in the selector. For example, you could have something like this:

'#icons a:mouseover': function(element) {
var app = element.id;
new Effect.BlindDown(app + '-content', {queue: 'end', duration: 0.2});
},

In addition to a less verbose syntax than Behaviour, event:Selectors also allows for comma-delimited selectors for a given rule (just like real CSS). Another difference is that event:Selectors makes use of the Prototype library. So, if a project you’re working on is already making use of Prototype, then event:Selectors ends up being a fairly lightweight addition; on the other hand, if you just need some one-off event handling stuff on a project which already isn't using Prototype, then Behaviour may be the leaner choice. Speaking for myself, though, I can’t wait to give it a try :).

Panning with Car Photography

I ran across these photos from Sebring Raceway and, to be sure, the cars are pretty sweet. Still, I was more struck by the photography — I really like the panning that was achieved there. Some background on panning, for those unfamiliar with it:

Panning is a technique where the camera is moved to follow a moving subject, keeping it in the same position in the viewfinder. It is more effective when the subject is moving across the picture than when it is moving towards (or away from) the camera. It produces a relatively sharp subject seen against a blurred background and can be very effective in giving an impression of movement and speed.

In any case, I’ve tried panning myself, with car photography even. The problem I ran into was that my photos were neither here nor there — either the car would be frozen in time, with even the wheels sharp as a tack (ugh), or the entire scene would be blurred (feh).

For what it’s worth, I downloaded a couple of the images and checked their EXIF data which appeared to indicate that the photographer took the shots at 1/160 second. Is it just that my camera is teh sux0rs while the other guy made use of a sweet Canon 20D? Or are there other panning-specific tips of which I should be aware?

Update 2006-03-23: Link to photos fixed.

What’s Up With the Third Season of Six Feet Under?

I’ve been catching up on several premium-channel television shows through Netflix, among them, Six Feet Under. Before going on though, if you’re also watching the DVDs and you’re only on season one or two, you may want to stop reading as there’re several spoilers below.

One of the luxuries of watching a series on DVD is that I can watch the last episode of a season and, after swapping discs, move right on to the first episode from the next season season (so far, so good). In any case, at the end of the second season of Six Feet Under, Nate is about to undergo brain surgery for his condition, his engagement to Brenda is going through a rough patch, and his past fling Lisa has revealed that she’s pregnant with his child. Then, in the first episode of the third season:

  • The operation goes awry and Nate dies…
  • … then, nevermind, he’s not really dead.
  • Brenda is out of the picture…
  • … and, voila, he’s all lovey-dovey with Lisa, the woman with whom he earlier wanted hardly anything with which to do.

Did I play the wrong episode by mistake or something? I thought he really liked Brenda and their un-gagement was only a knee-jerk reaction to the disagreement that they were having at the time (?). And I guess Nate’s “death” was really just a hallucination while he was anesthetized? (Don't get me wrong, I really like the show — but it was as if LeVar Burton snuck in as guest-director-of-the-week or something.)

Preventing AIM Disconnects with DD-WRT

If you have a Linksys WRT54G router, then you may be familiar with the DD-WRT firmware. Or, in case not, here's a quick recap — the Linksys WRT54G runs Linux and, by its GPL nature, they’ve released the source code for their firmware; building upon that, many others have created firmwares with extra features.

The real deal is what the WRT54G can do, with the right replacement firmware, that you’d only expect to find on a commercial-grade router costing several times as much.

You could use the WRT54G as a repeater or a bridge. Create a wireless distribution system (WDS) or a mesh network. Run a VPN server. Or a VoIP server. Or a managed hotspot with a RADIUS server. Manage bandwidth use per protocol. Control traffic shaping. Support IPv6. Boost antenna power. Remotely access router logs. Operate the router as a miniature low-power PC, running a variety of Linux applications.

[…]

In any case, I’ve been running DD-WRT for several months now and it’s been working great. My favorite feature may be the static DHCP set up — you can define a MAC address for which it will alway receive the same ip address. (That can be pretty handy to ensure that port forwarding always works as intended.)

While the firmware is well coded, there are some circumstances where the stock configuration runs into trouble. The first major one is Bittorrent; apparently, the high number of connections can overwhelm its poor little mind. However, if you set “Maximum Ports” to 4096 and both “TCP Timeout” and “UDP Timeout” to “120 seconds”, Bittorrent should be back on track. (All of these options are under Administration → Management.)

However, I found that AIM still became disconnected from time to time. Well, to say that it was “disconnected” probably isn’t fair; rather, it would occasionally have a connection blip where it’d disconnect and then immediately reconnect. It was mostly only an annoyance, but I had wanted to get to the bottom of it.

As a first step, I installed the beta of v23 SP1 as I had recalled reading on the forums that a few connection-related bugs had been squashed since the v23 release. I followed the upgrade steps on the wiki, but I’d still occasionally see AIM disconnects.

After some further reading on the forums, though I read a recommendation for setting both “TCP Timeout” and “UDP Timeout” to “600 seconds” to remedy AIM disconnects. I gave it a shot and, sure enough, it worked. I’ve not had any AIM disconnects since then — and Bittorrent has continued working fine as well :).

FeedLounge is Teh R0x0rs

My chum Chris Griego recently turned me onto FeedLounge as an alternative to Bloglines. As a user of Bloglines for several years, I was a little skeptical at first, especially since FeedLounge isn’t free (it’s $5/month or $50/year). However, after trying it, I was convinced — I’ve ditched Bloglines in favor of FeedLounge.

FeedLounge, in case you haven’t heard of it, is a web-based RSS reader created Alex King and Scott Sanders. If I were trite, I could say that it’s “Bloglines + Web 2.0” but even typing that sentence makes me wince. In plain English, here're a few of FeedLounge’s advantages:

  • Tags — This one made the most difference to me. Down the left side of the screen are various categories, or, in this case, tags. And, like other tagging applications, items can be assigned any number of tags. So, for instance, I could put A List Apart in both “css” and “xhtml” if I wanted to.

  • Background Updates — Because it's all Ajaxy, most of the interaction requires no explicit server hits. So, as feeds gain entries, those entries just appear and the count next to the feed name is updated. Of course, this is all done without interrupting the rest of the screen; any entries which you may be in the middle of reading remain just where they are.

  • Granular Feed Reading — One of my big gripes with Bloglines was that if you clicked on the feed from the left side of the page, all of the entries from that feed would appear on the right side of the page (and they would all be marked as read). Naturally, that type of interface is available in FeedLounge as well, but there’re others from which to choose as well. The one I use is a 3-pane layout, similar to what you see in many e-mail clients. And, just like an e-mail client, the individual entries are only marked as read as you move from one to the next.

  • Full Keyboard Control — FeedLounge’s documentation summarizes their keyboard support saying that “what you think should work, does” (or words to that effect). And, indeed, that’s pretty much been the case. For example, when viewing entries in the 3-pane view, the up and down arrow keys move from one entry to the next (just as you’d expect).

In all, I’m really pleased with FeedLounge. Were I less convinced, I might have signed up for a month at a time, but I’ve paid through for the year.