March 31st, 2006

Tab Energy — The Trucker Hat of Energy Drinks

Apparently, the hipsters within Coke Inc have come up with the wacky idea of releasing Tab as an energy drink. That’s right — Tab Energy:

Tab Energy, which Coke’s bottlers tasted in meetings last week in Atlanta, will come in skinny pink 10.5-ounce cans with the old Tab logo and “energy” in small yellow letters, according to materials from the meetings. The target market for the low-calorie drink, which does not taste like the original Tab, is young women. […]

I'm all for innovation, but this seems like a bit of a step backwards. Is this not the William Hung of energy drinks — a beverage marketed solely for its so-bad-it’s-goodbad factor? I mean, why can’t we get Tab with Splenda instead? Or, while we’re at it, how about Caffeine Free Tab with Splenda with Lime? I’d buy it (no, really).

March 30th, 2006

Bitstream Vera Sans Mono is a Sweet Programming Font

Bitstream Vera Sans Mono — “l” and “0” characters

Since reading on Matt’s site about his opinions on monospace alternatives for coding, I’ve been giving some thought to trying a different font for my editor. The fonts that Matt suggested were “Andale Mono on Windows or Monaco on OS X ”. Windows is still my primary development environment — at least until TextMate gets indented soft wrapping — so I thought I’d check out Andale Mono. As I soon learned, though, it doesn’t come with the OS (apparently it came with IE5, but of course that’s no longer available).

I then came across a gold mine of monospace font alternatives from the TextMate wiki. Looking over the list, my eye was drawn to the Bitstream Vera family, specifically Bitstream Vera Sans Mono. In case you aren't familiar with it, the Bitstream Vera family is a set of 10 fonts that Bitstream released as open source. Many people get to know them as one of the fonts that come with OpenOffice.org or Gnome, but they’re available for anyone to download.

In any case, I tried Bitstream Vera Sans Mono and I’ve been using it ever since. Compared to Courier New (my programming font up until this point), its stroke width is a bit wider (at least how Windows XP’s ClearType interprets it). My favorite characters within the font are probably the lowercase “l” (el) and the number zero (pictured above).

The glyph for “l” has a lovely subtle bend at each end, almost like a backwards “S”. And, as for the zero, it’s differentiated from the letter “O” through a dot in its center. Now, maybe it’s just the nostalgia speaking, but I’ve liked that zero-style ever since the days of playing around on the DOS command line (where I’d see it all the time).

I’d give it a try, if you haven’t already. It’s a free font so you have nothing to lose :).

Update: Ah, it looks like those old Microsoft fonts might just be available after all — maybe I’ll give Andale Mono a try sometime.

March 29th, 2006

JSLog — Unobtrusive JavaScript Logger

Linked off the FAQ for Firebug (another nice Firefox extension for debugging), I ran across JSLog. In short, it's a JavaScript library for unobtrusively adding logging to a page. The extension’s web page puts it this way:

Every language needs a System.out.println() or a Console.writeLine() — a quick and easy way to output messages to you, the developer, during development and testing. Historically, Javascript programmers have used alert() for this purpose. […] Safe to say that if you've done AJAX programming, you are sick of alert(). JSLog solves these problems! […]

Considering that I’m working on a webapp with heavy DOM Scripting, I think this’ll be just what I need:

  • It’s absolutely positioned, so it doesn’t affect the layout of the page
  • It can be enabled or disabled by setting a single variable, so debug statements can remain in scripts and appear only when needed
  • It supports several alert-levels (debug, warning, info, and error) to differentiate messages of varying severity

What’s also nice is that it’s pretty small — in minimized form, it’s just a box with a number in it (counting the number of messages in the console). I suppose it could be conceivably left enabled on a development server without getting in the way of other developers. I can’t wait to put this to use.

March 27th, 2006

The End of The Line for “The Shield”?

TV critic Aaron Barnhart writes on his blog about the goings-on with The Shield. In case you’re not familiar with it, the show is about a set of corrupt cops on LA’s “strike team”, a group brought together to bring down drug dealers, prostitution and the like. Oh, and it’s no spoiler that the cops are corrupt — that’s a running theme throughout the show. What makes the show interesting, in part, is that the corruptness of those cops isn’t black-and-white; in many cases, the cops are merely bending the rules (in other cases, they’re busting heads).

The show is on its fifth season and it’s one of my favorite shows on the air. However, what Barnhart reports is that series creators Shawn Ryan and David Mamet have also been working on another show, The Unit on CBS. So far, so good, right? Well, indeed, The Unit has been doing very well in the ratings and that could spell an exit route for Ryan and Marnet:

The outcome of “The Shield” may be turning on another program that aired last night. “The Unit,” from “Shield” creator Shawn Ryan plus David Mamet, scored what CBS is promoting as a significant share of its previous week's rating (85%), given the fact that last week's had a “NCIS” first-run lead-in and this was a rerun.

If “The Unit” keeps putting up decent numbers, the temptation would be strong for Ryan to make these next 10 episodes of “The Shield” the last. He intimated as much in an interview last week on public radio.

I’m not saying that I want The Unit to tank, but I sure would like to see The Shield continue. It’s one of those shows where, at the end of an episode, I just can’t wait for the next one. It’s that good :).

March 26th, 2006

Inside Man Was Good But Confusing

I saw Inside Man last night with some friends. I hadn’t heard much about it up to that point and I actually had to seek out the trailer to try to learn a bit about it beforehand. It scored well at Metacritic (76) and, in particular, The Onion A.V. Club and Stephanie Zacharek at Salon — two critics that I trust — liked it. Having said that, I enjoyed the movie, but it didn’t quite make sense to me at the end.

Up until the final moments of the movie, it seemed to make sense. At the end, though, I was just left asking “What just happened here?”. Fortunately, Ask MetaFilter is around for just these type of things :). I posted a question there about the movie (yes, with spoilers) and some readers have chimed in to help clear up a few things. I still don’t quite have my head wrapped around it, but I’m a little closer to understanding it than I was before.

March 24th, 2006

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 :).

March 22nd, 2006

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.

March 21st, 2006

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.)

March 20th, 2006

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 :).

March 19th, 2006

FeedLounge is Teh R0×0rs

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.