apparently not an urban legend

26 November 2007

I just fixed an old iPod my sister had lying around by tossing it in the freezer for a half hour. I always thought that was just an old wives tale. I guess it works by making the platters or heads contract enough to get more clearance or something?

Hate crime up 8%!!! (from historic low)

20 November 2007

Looks like the Uniform Crime Report hate crime stats came out today because I’ve seen some news reports of an 8% increase. These sort of stories always jump out at me as begging for some more analysis, and with this one I finally went and did it.

Sure the 2006 number of incidents (from Table 1) divided by the 2005 one is 7722/7163 = 1.078, and rounding up we get our 8% figure. But here’s a bigger picture compiled from the reports since 1995 (that’s all the history online):

incidents.png

I drew the linear fit in by hand, but the trend looks like hate crime’s been going down over the past decade. Also, this year-to-year comparison is really bad considering that 2005 was exceptionally low. And look at the 2001 number! I don’t like to blame things on 9/11, but…

This is all very back of the envelope and amateur, and there are a ton of factors that mess with these numbers (where they’re sampled from, the definition of a hate crime, the application of those definitions, etc.). Anyway, a quick plot like this gives so much more information than the simple annual change and doesn’t take up too much more space. It would be great if the Wall St. Journal or someone regularly did a USA Today-style Infographic with more newsy data like this.

Here’s the data I culled from Table 1 of the reports.

Don’t knock it ’til you’ve tried it

15 November 2007

I spent a couple days this week trying out the Dvorak keyboard layout. I think I did it partly out of boredom/procrastination and partly because I thought it would be a cool party trick to go up to a Dvorak keyboard and be able to type. Anyway, I gave it a shot and decided it wasn’t worth it for a couple reasons:

  1. Dvorak doesn’t even seem all that optimized. Part of this may just be that two days isn’t enough time to make a new layout stop feeling awkward, but I think we can all agree making you reach (even a little) to type ‘i’ is suboptimal.
  2. It breaks vi-keys! Not only does this make vi awkward, but also Google Reader and my mutt setup for email. I also noticed a few other places where key assignments are based on qwerty (like rtorrent). Wikipedia notes that Dvorak makes the ctrl-xcv cut-copy-paste bindings less elegant too. I like tinkering with stuff, but I draw a firm line at remapping keys in every application I use regularly.

This is a great example of worse is better. Anything that has (or strongly implies) the main selling point of being perfect or optimal is probably not worth your time.

As may be common, the last thing I typed in Dvorak for the forseeable future was “setxkbmap en_US”. I really shouldn’t make major life decisions based on cartoons.

Javascript Bugs

31 October 2007

Over the past couple days I’ve taken my first stab at writing something significant in Javascript. The language works well enough, although I’m sure I’ll hate cleaning stuff up to work cross-browser. Anyway, one of the craziest things that I’ve noticed is that ‘this’ does not get captured in closures. You’ll be writing something in a ‘class’ (I use that loosely, as does Javascript) and pass an anonymous function somewhere that uses ‘this’. Nope, sorry, error ‘this’ does not have some property. Apparently it gets reassigned to window or something, I don’t know, it’s just precisely not what you want or expect it to be.

Well, the good news is that apparently this ‘this propagation’ is fixed in Javascript 2. But of course that’s just going to cause more hell porting to IE in the end. Maybe Adobe’s onto something with Flex after all. Although I’ve been saving up all my Flex gripes for a later mega-post.

Engineering vs. Mathematics

20 October 2007

I’ve been procrastinating by reading up on git, which I like a lot. One interesting thing is that it creates a content-addressable (via SHA-1) filesystem on top of whatever FS you’re using. I immediately wondered how it deals with collisions and Google gave me back a couple great discussion threads (on the git list and pulled from lkml on lwn).

It turns out I fell into a fairly popular, and probably innate, trap: worrying about an extremely low-probability but high cost event. Just like the guy who worries about being in a plane crash but doesn’t buckle-up on the taxi ride from the airport, I was sitting around contemplating data corruption due to a SHA-1 collision when I don’t even make regular backups of screwy hard drives. I’ve got a feeling this is the sort of stuff Nassim Nicholas Taleb writes about, but I don’t really know since my hold on Fooled By Randomness got filled at the library the day after I left LA.

But the cooler thing is how these threads highlight the difference between math and engineering. Mathematically I want a storage system that’s provably correct, perfect, and beautiful. The problem is that even if I come up with this gorgeous ideal storage system, the hardware I run it on will eventually lose data due to faulty RAM, or bad disks, or random CPU errors, or just explode for no reason. I love this defense where it’s noted that this system will likely hold up fine through the death of the sun. I’m not going to lose any sleep while using git.

Floating off the Page

14 October 2007

This book is really exciting. I love the Wall St. Journal, and the A-hed especially. One that particularly stands out in my mind was about a service that inserts prisoners into photos of family vacations or other events they missed due to their incarceration. I must remember to pick this up sometime.

MPX

9 October 2007

MPX is an extension to use multiple mice with X. This sounds like a fun toy, but yikes, look at that screenshot. 18 cursors! Really, who would want that? It sounds like they got far enough in their implementation to turn off clicking for most of the pointers. Which is good because in any group of 18 people I’m sure you’d get at least 2 that just continually click to close whatever window you’re looking at.

I found out about this from Mango Lassi, a network shared pointer project from the guy behind PulseAudio. Unlike Synergy it doesn’t support Windows which is pretty much the only reason I keep an eye on projects like this. I don’t have to run Windows yet, but if I ever do need it for UI testing in IE or something where ies4linux seems buggy I hope Synergy works well. I expect to be too lazy to either buy a KVM switch or reach up and switch it when moving between machines.

Radio and Caches

4 October 2007

First off, I think SomaFM is pretty great. I’ve been listening mostly to the Secret Agent station, which is like a James Bond movie score for your life. It’s great work-time listening.

Also, I heard Ulrich Drepper give his cache talk last night. Good stuff, very interesting, but it sounds like his paper maybe goes into way too much depth and detail. Anyway, one thing he mentioned is that indirect calls (like via function pointers) are bad because they’ll blow up your instruction cache. Someone asked how this impacts languages that do a lot of late binding stuff like this, and Ulrich answered that these languages could actually be faster (than C) for this stuff due to just-in-time compilation.

What a great answer. I love these sort of counterintuitive results. You’d imagine that the bytecode language would just inherently have bad performance since it has to be translated to machine code, but along with the burden of translation you get the opportunity for optimization. Now that I think about it, I’ll bet something like this was the big idea behind Transmeta (wow, it actually looks like they’re still around).

aircrack-ng vs. Wimax

3 October 2007

I remember reading about theoretical problems with 802.11’s WEP Encryption years ago. I think it was around the time I went Wardriving in Des Moines (one of my favorite tech fads ever). But I had no idea how practical that weakness had become until AT&T told me it would be 5 days(!) from when I moved into my place to when I could have DSL working here. I got sick of going to internet cafe’s, so one morning at Golden Gate Perk (which I can only assume stole its name from the poorly named cafe in Friends) I downloaded the aircrack-ng software, rebuilt my wireless driver, and once I got home it took all of 20 minutes to get on a neighbor’s 40-bit WEP protected network.

I felt a little bad, but I was just borrowing the connection, right? Well, I’ve got my own connection now and I thank that anonymous stranger who I stole internet access from just so I could check some blogs.

Finally, I keep hearing things about Wimax and how it will allow metropolitan area networks (or MANs, a sure sign these acronyms need to stop). It would have been great to just go to a store and pick up some crazy piece of hardware that sucks internet out of the air and into some CAT5. Instead I had to wait around for AT&T to flip a switch at the central office.

Also, does anyone know if there’s anything that really makes DSL setup take longer than phone service? I had a dialtone within 24-hours of calling them, it should be the same thing right? Oh well, until we get Wimax we’ve got aircrack-ng and slightly guilty consciences.

Readings

1 October 2007

Why do I like reading things like pmarca’s career advice or Paul Graham’s startup essay so much. Is it rationalization? Some sort of lazy fulfillment in seeing them write down ideas that I like a lot instead of trying to explain them myself? I guess it’s good that they’re out there articulating these things so I can get busy trying to implement them.