RailsConf 2006

I attended RailsConf in Chicago about 10 days ago. It was a great way to find out what was happening in arguably the most vibrant part of the web development community. I met a lot of people over those three days and would always ask them: "So, are you doing rails by day, by night, or both?". Most of the answers were "by night", with a few "just starting by day", and one "both". From my unstatistical sample, it seems like rails clearly had people's mindshare but getting it into their "workshare" is a different story.

A quick search on google or technorati will turn up a lot of info on the conference. Here are some of my favorite moments (in no particular order):

  • Martin Fowler's keynote: he spoke for over an hour about ruby, rails, frameworks & their (dis)advantages, etc. All pretty much ad lib. I have a number of his books and it was great hearing him speak live. Very interesting.
  • Why the lucky stiff's concert / monologue / animations extraordinaire. A glance at his site will tell you that all is not as it should be in Why's brain, which made his concert that much more fun.
  • Mike Clark's intro to Capistrano. This is the utility I really want to play with.
  • Justin Gehtland's overview of Ajax and RJS with Rails, and esp. the sneak peak at the new version of scaffolding he and his colleagues are working on called Streamlined.
  • One of the pleasures of attending a conference is discovering great new speakers. Out of the railsconf crew, my pick goes to Matt Biddulph. Matt's presentation was not only engaging, enlightening, and full of cool annecdotes but also focused on a BBC-related project. Having grown up in London, the beeb is still near and dear to my heart. I've found lots of interesting topics on Matt's blog, such as this great example of putting the Wikipedia and Yahoo APIs to use. Cheers Matt!
  • DHH's keynote started off with me thinking "CRUD? Why is he talking to us about CRUD?" and ended with the thoughts "Wow! This is a cool way of looking at things, must try it out!".
  • Last but not least, hooking up with a long lost friend and, as it turns out, rails and OSX fan Steve Chanin.

Next year's conference is in Portland and will be co-organized by O'Reilly. They're clearly pursuing rails as strong alpha (and dare I say beta?) geek territory. Lots of fun in store!

Auto Tag Your MP3 Collection

I have a bunch of mp3's that I created with cd-xtractor. Unfortunately, though this program did a fine job at ripping my CDs, it didn't (as I'd expected) set the proper ID3 tags, though the file names themselves contain the artist and the track.

This lack of identification has been a low-level source of irration to me. I know what the files are, but my mp3 playlist would be so much nicer if it had proper ID3 tags.

Fortunately, I discovered a new webservice this evening called MusicDNS. It's very cool: it converts your mp3 to wav, fingerprints it via Fast Fourier Transform, and invokes a webservice at musicbrainz.org to get back the track and artist names.

Getting started was easy. The library and examples compiled almost out of the box with Visual Studio 2005. The program named "example" is the one to start with. Feed it a filename and it spits out the info: example.exe "e:\music\Jimmy Page & Robert Plant - Nobody's Fault But Mine.mp3" Decoding file e:\music\Jimmy Page & Robert Plant - Nobody's Fault But Mine.mp3 Title: Nobody's Fault But Mine Artist: Page & Plant PUID: a15a9cb2-d016-0eea-083b-a495f70b08c8

A few caveats to be aware of:

  • You need at least 135 seconds of audio for fingerprinting. This is cutting it close for older files. For example, Bill Haley's 1950's classic "See You Later Alligator" is 146 seconds long. Unfortunately, MusicDNS doesn't recognize it.
  • I extended the example program to display the Album, Genre, and Year of each track, but unfortunately the service itself doesn't return this info (or does so very rarely). Too bad.

Here's the program I wrote to classify my MP3s, in ruby of course! FYI, you'll need the excellent ruby-mp3info library (just "gem install ruby-mp3info" and you'll be fine!)

AUSTIN - A PalmOS Vulnerability Scanner

About three years ago I wrote a vulnerability scanner for the Palm OS named AUSTIN. It was just a fun side project and after presenting it at Defcon 11, I forgot all about it.

But recently a few people started asking me for the code. Turns out that the Defcon 11 site has my slides, the audio of my presentation, and even the video! But no code, even though I gave it to the organizers. [I wish defcon didn't use Real media formats, they're so annoying to convert. To do so, grab the RTSP stream with a downloader like Offline Explorer Pro and use SUPER to convert it (See my post on video conversion).]

So without further ado, for anyone interested, here is the code to AUSTIN - a PalmOS Vulnerability Scanner.

Caveat emptor:

  • It was written to PalmOS 3.5.2 on a Treo 300 (160x160 screen). I don't know how it will fare on OS 5 Palms.
  • It was written with PocketC, I don't know whether the latest version will still run this code.
  • It works but is fairly basic and may even have some bugs (shocking, I know ;-)
  • It's GPL licensed.

If you end up finding it useful, please post a comment below and tell me what you're doing with it...

IRB Anywhere

IRB, short for Interactive RuBy, is a very useful ruby shell. Just run "irb" and you'll end up in a interactive ruby session. This comes in very handy for running various snippets of code to make sure they do what you intend. But what if you want to run IRB in the middle of a running program, so you can interact with it?

Turns out this is very simple:

#irbtest.rb

require 'irb'

some_var = 1
SOME_CONST = "hello"
puts "before irb"

IRB.start

puts "after irb"
puts some_var
puts SOME_CONST

Review: Vosky Call Center

We've been Skype and SkypeOut users for a while. For the most part it works great. And BTW, if you're disappointed in the sound quality, get a headset. It'll work wonders.

But this wasn't enough, what I really wanted was to make and receive Skype calls from our cordless phones. The Vosky Call Center makes this possible. Overall it works very well but there are definitely a few gotchas to be aware of.

Here's our setup:

Here's how it works for Inboud calls:

  • Land line calls (green dotted line) come in from the telco, switch through the Vosky, and ring on your phone.
  • Skype calls (red dotted line) come in via the network, through your Skype'd desktop, and on to Vosky which causes your phone to ring with a different ring tone. This is the same for SkypeIn as well.
  • If you config the Vosky as your answering machine, it will provide voicemail for green-line calls, but Skype will still handles red-line voicemail. This is somewhat annoying because you now have two voicemail boxes to check.

And now for outbound calls:

  • When you pick up your phone, you will get your normal dialtone. If you dial now, you'll red-line dial just as before.
  • If you hit ## then Vosky greets you and you can either dial a Skype speed dial number (that you've previously config'ed on your desktop) or enter a number to call in full international format, i.e. 011-1-area code-number. Yep, Vosky wants to know exactly where you're calling.

In addition to handling your land line vmail, the Vosky Call Center can also let you dial in via the red-line, enter a passcode, and use Skype to dial out via the green-line. This gives you (for example) international calls from your cell phone at SkypeOut rates.

 

Pros:
  • Easy to setup, works as advertised (you start to forget it's there, a good sign)
  • Using your phone as a universal interface to land line, Skype, SkypeIn, and SkypeOut calls is great
  • Cheap international calls! (~$0.025/min to most of Europe, India, China, etc.)
  • Land line calls still go through if your computer is off
Cons:
  • Your computer has to be on all the time so some of your cost savings will get eaten up by electricity bills
  • Only works on Windows not linux or OS X
  • When you dial out via SkypeOut, your caller id is "0000123456". This is Skype's issue, not Vosky's, but I have a feeling some of my friends will think twice about picking up this call
  • The unit will work without a land line but then you can't do the nifty red-line in, green-line out dialing. Why can't I use Skype for both?
  • Vosky takes over the audio out of your Skype configuration. In other words, if you're at your computer and someone calls you, you can't pick up on the computer because the audio will get piped to the phone. In practice not a big deal but worth knowing.
 

Overall I like it. I've already cancelled our long distance provider and scaled back our land line subscription. The Vosky's $60 cost will be made up pretty quickly. Even quicker if I cancel our land line, which I may do since my wife and I both have cell phones.

I'm still amazed by the $2.7Bn price eBay paid for Skype... but with excellent features and add-on peripherals such as Vosky, it's not hard to envision Skype becoming a universal telco. In a few years, Skype's price tag may seem like a bargain compared to the very juicy revenue stream eBay will be receiving.

BTW, if you want to change the default answering machine response, just replace this file with your own:
C:\Program Files\Vosky Call Center\VoicePrompt\United States\vp15.wav
But make sure that you're using the same settings as the original (i.e. 16bit samples, 8KHz sample rate).

What's wrong with my email address?

Sometimes you wonder why a company would make its users jump through hoops just to access its own site...

AT&T bought SBC recently and they emailed me stating that I had to change my username because it didn't meet their "new guidelines"

Hello? How about changing your guidelines instead of making thousands of users update their usernames to remove the '@' symbol? And what does AT&T say will happen if you don't update your username? "If you do not change your User ID by May 11, 2006, you will not be able to sign on using your MySBC.com account. We apologize for any inconvenience." How nice.

Of course, that doesn't matter because I got this message after changing my username:

Sometimes you just can't win :-)

Video To Go

I've been watching videos on my Treo for a couple years now but since recently upgrading to a Treo 650 (which has a nice fast processor and a gorgeous 320x320 screen) I've found it even more compelling to do so. Another factor is the increasing prevalence of video on the web: screencasts, movies, video podcasting... There's a ton of content out there.

The best program for viewing videos on the Treo is the free TCPMP. It does an excellent job at smoothly handling many formats and is a lot more stable than MMplayer, my previous choice.

So... We have a device and a player. Now we need content and we usually need to convert it to a mobile format. There's no use in putting a DVD quality AVI file on your PDA or phone if it has a small screen and when storage space is at a relative premium.

I won't discuss where to get content, assuming you already have a number sources at your disposal from DVDs and other media you own and/or thanks to sites by google, yahoo, and a host of others where you can download content.

Once you have that content, here are the two programs that I've found extremely useful for preparing it for your mobile device are PQ DVD and SUPER:

  • Pocket DVD Studio (or PQ DVD) is a low cost ($32) Windows tool that will take a DVD or video file (it supports .avi, .wmv, .mpg, and .rm among others) as input and re-encode it according to your specs. This allows you to pick the optimum resolution, bitrate, audio quality, etc. for you iPod, Pocket PC, Palm, or PSP. The software is very easy to use and quite powerful. The interface feels a little klunky but you get used to it and PQ DVD delivers good results
  • SUPER won't work with DVDs directly (though it apparently handles VOBs), nor can you pick segments of a file to re-encode as you can with PQ DVD. However it makes up for this in versatility. SUPER supports a ton of formats. I originally came across it because I was searching for a way to convert Flash videos (.flv files) into AVIs. Flash videos are popular these days because they're basically a combo player and video in a single file, and are therefore nicely cross platform, thanks to Flash. They're useless to me on my Palm though and SUPER does a great job at conversion. Oh yeah, did I mention it was free? :-)

One word of caution re: SUPER. I have no evidence to base this on but you might do well to install free software in a virtual environment so as to protect your host machine. SUPER runs fine for me in VMware and that way I know I don't need to worry about spyware. Better safe than sorry.

Life on an Aircraft Carrier

Thomas is a Tiger. That is, he's in his first year of Cub Scouts and he and his friends are known as Tigers (go Pack 464!). This gets Thomas and I doing lots of interesting things: going on outtings, building cars, and... spending the night on an aircraft carrier!

The USS Hornet is a floating museum docked in Alameda, just south of Oakland and across the bay from San Francisco. As part of the Hornet's "live aboard" program, Thomas and I spent about 20hours on the ship from Saturday afternoon to noon Sunday.

Neither Thomas nor I had been on a military ship before, let alone an aircraft carrier. The Hornet was built over 60 years ago and refitted multiple times since then. It served in WWII and picked up the Apollo 11 crew upon their return to earth. Saved from the scrap heap 10 or so years ago, it's been renovated by a welcoming and dedicated group of people.

After orientation, setting up our bunks, muster, and chow, we spent the evening exploring the ship from top to bottom. Being able to roam around a floating city (3,500 crew members during WWII) was a lot fun. We got lost a few times but, as long as you know which way is up :-), it's easy to find your back to the hangar deck.

The Hornet's team is doing a great job at procuring and restoring navy aircraft, including many that once served on the aircraft carrier. Our favorite is the F8 Crusader. Looking down its air intake was truly like looking into the gaping maw of a great white shark. Indeed, we were told the story of a 260lbs man being sucked in from 10 feet away and literally pulverized. BTW the plane you see to the right took 1,000 hours to restore and is in beautiful condition.

By far the best part of our stay was the fact that ex-crew members of the Hornet and its sister ships were giving us tours and answering our questions. It made all the difference in the world and gave us a window in the lives of the crew. We learned a ton:

  • Frank, who worked on the flight deck on the Hornet in the 50s explained, with the help of a model and cardboard planes, how the carrier managed its fleet of 90 aircraft.
  • He also told us of the time he was burnt by jet thrust and being blown 400ft down the flight deck. Thomas was very impressed.
  • The Hornet's flight deck is made of teak (by far the most valuable part of the ship we were told!). Metal would make it too easy for sparks to fly and fuel to combust.
  • Rich gave us a very detailed tour of the flight bridge and told us of his experiences working on deck: how planes were launched, how pilots lost their lives in the event of cold catapults (i.e. ones that didn't propel their jets from 0 to 120mph in 2sec flat), and of pulling pilots out of burning aircraft wearing an asbestos suit.
  • Michael (?) gave Thomas and I a private tour of the CIC (Combat Information Center) and turned on all the green and blue "mood lighting" for us. Very cool.

I could go on and on. Suffice it to say it was an incredible experience and Thomas already wants to go back. Many thanks to our hosts on the Hornet and esp. the former crew members. You made a tremendous and often very moving difference.

 

 

$880 to fly 12 miles...

When flying, you usually expect to pay more for greater distance. Flying from San Francisco to Los Angeles is a lot cheaper than to Tokyo. However, it seems that there's a point at which you pay more the closer you get... I was on United's site and, just for the hell of it, priced out a flight from Oakland airport to San Francisco. I believe the distance between the two to be roughly 12 miles as the crow, I mean the jet, flies. Those are some very expensive miles, check it out:

The perceptive among you will have noticed that, although the title states "Oakland to San Francisco", the trip details actually have us flying from SFO to Sacramento (yes, that would be a bug). This is much more reasonable, after all SMF is a whopping 80miles away! And I bet they don't even serve drinks :-)

The Smallest Proxy?

I needed an http proxy for another project (more on that later) and thought it would be fun to write one in ruby. How simple can it be? With a few compromises, it can be very short indeed:

I'm cheating in a couple places. I'm only handling GET requests, and I'm using Hiroshi Nakamura's excellent http-access2 package.

On the other hand, it's multi-threaded and it handles redirects, a must for the web.