Thursday, August 25, 2005

H.264 Encoding Performance

H.264 encoding a 40 minute video at 720x480 resolution and medium quality from iMovie on my 1 Ghz PowerBooks is taking close to 30 hours! I have single-pass encoding turned on; it's normally meant for draft and live encodings. Is this normal? How can QuickTime Broadcaster possibly stream this codec live? Am I missing something? I wish Quicktime supported distributed encoding so I could team up with some Mac weilding co-workers and utilize their idle cycles. Maybe I could throw something together. After all this waiting, I hope it turns out okay.

MPAA Sues More File Swappers

According to a story on ZDNet, the MPAA has started mining logs from web sites known to host copyrighted movies (movies which happen to be downloaded using Bittorrent), and it plans to sue file swappers. Frankly, the quality of those movies sucks and is not analogous to the quality of MP3s. I wish the movie industry (or Apple) would hurry up and release a legitimate alternative a la iTunes. We obviously have the technology. I hate theatres, parking fees, and not being able to pause the movie when I have to pee, not to mention it's difficult to make it to the theatre with a newborn. I would gladly pay as much as I pay at the theatre (or even more) to download a newly released movie and watch it in the comfort of my own home.

Change Your From Address in Gmail

I've been managing my email from my Gmail account for some time. I was always able to set the reply-to field to crazybob at, but my emails still said they were from my Gmail account. Not anymore. Gmail now allows you to change your from address. Click "Settings" and then "Accounts" to add new addresses. The best part is you can have multiple from addresses. When you compose an email, you can choose a from address from a dropdown list. I've needed this desperately for some time. In the past, I used to create custom email addresses each time I signed up for something. Though gmail already supported additional addresses (for example crazyboblee+foo at my emails would still say they were from my gmail address and people would still know what my real email address is (just drop the +foo). No more. Now I can create custom addresses (for example foo at and still send to mailing lists.

Wednesday, August 24, 2005

First Day Home


Improving Cell Phone Internet Performance

I've been dialing into the net via my cell phone using T-Mobile GPRS. I get a couple k per second and the latency is deadly (up to a few seconds). I want an accelerating HTTP proxy with a client and server component. The server would parse the HTML and download all the images, css, and javascript and send them to the client in one package avoiding the costly round trips. Second, the proxy would maintain one continuous connection so you don't have to create a new connection for each site. I have a feeling the syn/ack/synack handshake for each site slows things down considerably. The proxy could also compress all the traffic. I just realized I can accomplish the second goal using SSH and dynamic port forwarding (it's essentially a SOCKS proxy). SSH can compress all traffic, and I would only have only one connection running over the slow cell phone network. SSH can tide me over for a while, but I may see about implementing the first goal unless someone points me to prior art. It shouldn't be too difficult. Makes me wish I had a static IP again. :(

Monday, August 22, 2005

Dagny Katherine Lee, aka "Bobkat"

Born 9 lbs, 1 oz, about 5 minutes ago. 08-22-05_0950 Update: Change of plans. When it came time to sign the birth certificate, we decided to go with Dagny. I think my mom put it best:
I think your heart told you it's different for girls. There are so many set ideas for women. Your daughter needed a name that refused to be dismissed. Bobbi is cute. For a little girl. Roberta was fine for a woman. But what you gave her with Dagny is a leg up. Before she appears, her name will tell everyone who matters that she is serious. Her parents were intellectuals. She comes from a place where ideas are paramount, and part of everyday life. She will be a force. And when she shows up with a great bod and your quirky sense of humor, those qualities will be all the more attractive because of their incongruity. She may hate you through grade school, but I don't believe so. You will teach her to be proud and confident. She will have the cool name because you tell her it is so. And, whenever you think of her, or call her name, you (and everyone else) will remember how important she is. Aren't you glad you didn't have to make that circumcision choice?
I still get to call her "Bobkat" though. ;)

Sunday, August 21, 2005

Long Weekend

I only attended Foo Camp's Friday night activities, but I still managed to meet quite a few interesting people, and Pat Niemeyer has been nice enough to fill in the gaps. After dinner and happy hour at the "Foo Bar," Tim delivered the opening speech and went around the room and asked each attendee to introduce themselves by saying their name, company, and three words (any more than three words and you got a gong). I got a few gasps and a bunch of laughs when I said, "Bob Lee, Google, baby due tomorrow." I met Martin Fowler in person for the first time. I've always admired his writing style. We talked about remote interfaces, domain models, AOP, lazy loading, some consulting work he did at SBC (my previous employer), and mutual friends. I talked with Mike Clark and James Duncan Davidson about their recent Rails project. I got the impression James also dislikes how Rails splits the domain code between the model class and the database table. I think we'd both prefer for all the business logic to be in the model class and for Rails to update the database (adding and dropping columns and tables as necessary). I'd bet money that most of the Java developers who fall head over heals for Rails have never tried WebWork. WebWork and Rails are more alike than different. I like how both frameworks make it easy to map HTTP requests to domain objects sans boilerplate code but allow you to fall back to explicit code when the two don't exactly line up. If I was beating myself over the head with JSF and multi-layer J2EE architectures with remote interfaces and DTOs instead of using WebWork, I'd probably cream my pants for Rails, too. I was surprised to meet Michael Lynn, the now infamous Cisco flaw finder. I actually didn't realize he was the Michael Lynn until one of the Rackspace founders pointed it out. Michael risked his career to do what he knew was right. The media has portrayed him in a favorable light, but things could have easily gone the other way. Michael deserves all of our respect. Toward the end of the night I met Jeff Veen near the vodka still (some geeks were re-distilling cheap bad vodka and Mike's Cranberry Coolers to create overpriced good cranberry-flavored vodka). Jeff works for Adaptive Path, the company which coined the term Ajax. Jeff used to work on Web Monkey, a Javascript resource I read religiously in my early days (as opposed to Greasemonkey, a more recent Firefox Javascript hacking tool created by my coworker and fellow Foo attendee Aaron Boodman). I'm not sure why it's taken me so long to realize this, but the recent success of Ajax has almost nothing to do with XmlHttpRequest and everything to do with being able to reliably and easily update HTML on the fly. I could reliably hit the server from Javascript in any browser 5 years ago, but I was limited to updating form element values. Modifying form elements alone turns out not to be all that useful in practice. Many of the new Ajax examples such as form field auto-completion/suggestion pull off their magic by extending and creating new form elements using DHTML. I drove home at about 12:30 AM because I had to take Krista to the hospital at 8 AM so we could induce labor. We made it in okay, but it's been extremely slow going, literally half cm by half vm, ever since. I've been here at the hospital for a little more than 40 hours watching doctors and nurses poke and prod Krista's vagina. Still no baby. All I can say is I highly recommend the epidural for both the mother and father's sake. The hospital doesn't have wifi yet, so I've had to resort to connecting to the Internet via my cell phone (something I've never done successfully before today). For the life of me, I couldn't get my RAZR to connect to T-Mobile from OS X 10.3. I tried every combination of Ross Barkman's modem scripts. Maybe it's time to upgrade to Tiger. In the mean time, I swapped SIM chips with Krista's Nokia 6600 and connected without a hitch. Is there anyway to speed this up? It seems like you could set up proxies at both ends that would compress data and reduce connection overhead. An HTTP/HTML aware compression algorithm would really kick ass. I can't seem to find what I'm looking for. It could be because I'm browsing the Internet at about 2 kb/s. Sure beats no Internet at all though. ;)

Friday, August 19, 2005

No Foo Camp for Me

Krista and I will get induced tomorrow morning. Well, Krista will get induced--I'll just provide moral support and record the event. I guess having a beautiful baby girl will make up for missing Foo Camp. ;) In a few short hours, the World will meet a future female president of the United States, China or the United Federation of Planets depending on how the next 45 years play out. I'll try to pop in to camp and say, "hi," tonight. I'd promise to post some video of tomorrow's event, but Krista erases the camera every time I turn by back.

Tuesday, August 16, 2005

Going to Foo Camp (Hopefully)

Krista and I could have a baby girl at any moment. If she comes soon or late enough, I can go to Foo Camp. If she decides to come late Friday or Saturday, I obviously can't. At first I accepted the fact that I wouldn't be able to go, but Krista insists I can't miss Foo Camp if at all possible. Krista pointed out that Cam spoke at TSSS when his wife was 40 weeks pregnant. Whereas Cam was 3 time zones away, Sebastapol is only about 50 miles from our apartment. Krista's mom can hold down the fort for an hour. Does Krista rock or what? If I do make it (cross my fingers, knock on wood, rub Krista's belly), I'm looking forward to brainstorming what WebWork and even Java as a whole can learn from Ruby on Rails. Pat Lightbody, Pat Niemeyer and I have gone back and forth on some pretty sweet ideas the past couple weeks, and Lightbody even has some working code. In any case, thanks, O'Reilly, for the invite!

Tuesday, August 09, 2005

How do you pronounce the name Dagny?

I'm trying to decide on a name for my daughter (any day now), and I'm reading Atlas Shrugged. Ayn Rand named her protagonist Dagny. Dagny means, "day, brightness, new day, Dane's joy." I love the character and I appreciate the name's uniqueness. Any idea how to pronounce it?

Salted Hash Login Generator Fix

The author of the Salted Hash Login Generator just emailed me to say that someone has posted a fix for my problem to the bottom of the wiki page. I can't wait to try it. Perfect timing. In the mean time, does anyone know how to configure the SMTP server in OS X 10.3 so I can send mail from my Rails application?

Sunday, August 07, 2005

Rough Riding on Rails

I have a small, one man project for a friend that I don't want to spend much time or hosting money on. I dove head first into Rails (and Ruby) yesterday. I'm running Ruby 1.8.2 and Rails 0.13.1 on OS X 10.3. I've known Java cold for some time, so I can't say I'm enjoying the fish out of water feeling. Naturally, I ran into two obscure errors which burned almost an entire day out of my weekend. First, I tried to use the Salted Hash Login Generator. After running the generator, I get the following exception when I try to run the unit tests:
/test/mocks/test/time.rb:5: undefined method `cattr_accessor' for
Time:Class (NoMethodError)
from /Users/crazybob/projects/vesco
.back/config/../test/mocks/test/time.rb:3:in `class_eval' from /Users/crazybob/projects/vesco.back/config/../test/mocks/test/time.rb:3:in `class_eval' from /Users/crazybob/projects/vesco.back/config/../test/mocks/test/time.rb:3 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:1:in `require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/specification.rb:1 from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:396:in `require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:396 from /Users/crazybob/projects/vesco.back/config/environment.rb:48:in `require' from /Users/crazybob/projects/vesco.back/config/environment.rb:48 from ./test/unit/../test_helper.rb:5:in `require' from ./test/unit/../test_helper.rb:5 from ./test/unit/localization_test.rb:3:in `require' from ./test/unit/localization_test.rb:3 from /usr/local/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/rake/rake_test_loader.rb:5:in `load' from /usr/local/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/rake/rake_test_loader.rb:5 from /usr/local/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/rake/rake_test_loader.rb:5:in `each' from /usr/local/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/rake/rake_test_loader.rb:5
I contacted the author, but only one other person has encountered this problem, and he couldn't explain it. He even copied the other person's code over to his machine and everything worked fine. This particular exception occurs because the required cattr_accessor method has not been introduced yet. The Rails code introduces this method, but I have no idea why it's not happening; probably an ordering issue. I tried modifying the mock class to not call this method, but I just ran into another exception (and so on until I gave up). Maybe it has something to do with my Ruby build. The exception occurs in the environment.rb file. Doesn't the server load this as well? That seems to work. I abandoned the Salted Hash Login Generator for the simpler but much less functional Login Generator and got back to the task at hand. Next, I thought I'd take scaffold for a spin. I generated scaffolds for a domain class named Request. The unit tests passed and the list view came up fine, but the new Request view blew up. It couldn't find some obscure field in the Request class. It took me a while to figure out that my Request class was completely replacing the HTTP Request class. Aren't they in different packages? How could Rails allow this? In any case, I renamed my domain class and everything worked as expected. Now that I'm up and running, I can see some of the appeal, but Rails has been over hyped. I'm starting to think some Java developers subject themselves to a lot of pain with badly designed development evironments. Of course they feel better when they move to Rails; it has a pretty decent build by default. You can't blame lousy builds and slow server deployments on Java. Also, Java code certainly looks more verbose (type checking requires more code), but if you know how to take advantage of an IDE, you don't actually manually write much more code. Exploring Rails for the first time, I definitely miss type checking and my IDE. I really like the idea of scaffold. It obviously can't generate production worthy code, but it definitely gives you a good starting point. Staring at a blank text editor can be daunting for a new user in any language. Scaffold builds an end to end working foundation. I think this appeals to slightly better than cut and paste coders (such as myself at the moment).