Saturday, June 28, 2008

And The Winner Is

So since the Twitter IM bot has been down for like three weeks, I finally gave up on it. I discovered this neat service provided by IMified.com that lets you post to your FriendFeed account via an IM bot. All you do is add friendfeed@bot.im to your Gtalk/jabber account and then send it the message 'help' and it'll tell you what to do. Really I like FriendFeed better anyway, but Twitter seemed like the de facto standard.

If you don't have FriendFeed, I highly recommend it. It's like a blog+facebook+twitter all in one, with a nice interface and tons of nifty development going on around it. The basic idea is that it aggregates all your online activity (that you tell it about) into a feed, then all your friends can comment on each other's feeds. Right now I have mine linked up to this blog, my Disqus comments, and Twitter, so any time I post on one of those it shows up in my feed.

All the items posted by your friends show up in a composite feed, and you can go comment on them and have discussions. You can also post links/messages to your feed, so planning things like group activities is easy. Since all your friends see your message, they can hash out the details in the comments. Hook it up to your Flickr/Picassa account, and you have the equivalent of Facebook photos.

Speaking of Facebook, you can even integrate it with that.

So FriendFeed ftw. If you want to add me, my handle is xich. Or you can just check out my feed.

Saturday, June 21, 2008

On Fuel Efficiency

An interesting study came out showing that people are confused by the MPG rating on cars. Obviously people can correctly figure out that a higher MPG number is better than a lower one, but the issue came when selecting upgrade paths.

Say a family has two vehicles. One is a truck that gets 12mpg, and the other is a car that gets 25mpg. This family decides it wants a new vehicle and it wants to save as much money as it can on gas (and help the environment). Both the car and truck are driven roughly equally. Do they get a new truck that gets 17mpg (an increase of 5mpg over the current one), or spring for a Prius to replace their car (going from 25mpg to 45mpg, an increase of 20mpg)?

If you chose the Prius, you must hate the environment, because the new truck would be the much better choice.

Why? Because think of it in terms of the actual gas saved. A 12mpg truck driven 10,000 miles a year would use about 833 gallons. A 17mpg truck would use 588 gallons, or about 245 gallons less.

A 25mpg car driven the same distance would use 400 gallons, and that Prius would use 222, or 178 gallons less. Thus, (taking 245-178) buying the new truck would save 67 gallons more per year than buying the Prius.

The study showed that this could be solved by simply giving people a better set of numbers to think about. Instead of miles per gallon, give then gallons per mile. And, since gallons per mile is a tiny number and people seem to abhor tiny numbers (audio file), make it really easy by giving it to them in gallons per 10,000 miles.

If you do it this way, our previous example becomes immediately obvious.

The same family has a truck with a rating of 833 (gallons per 10k miles) and a car with a rating of 400. They are trying to choose between a new truck with a rating of 588 and a Prius with a rating of 222. If they buy the truck their combined ratings would be 988 (400+588). If they choose the Prius, their combined ratings would be 1055 (833+222). Obviously the new truck route would be more efficient (988 is less than 1055).

An interesting example of how numbers can be counter-intuitive at first glance. When stated in MPG, the 20mpg increase given by the new Prius seems far better than the measely 5mpg increase given by the new truck, but the reality is the opposite.

You can go take an online quiz made by the people who did the study if you want to test yourself. The overall lesson: think in gallons per mile instead of miles per gallon. It's even easy to do the conversion yourself. Just take 10,000 and divide by the MPG rating of the car. That will give you gallons per 10,000 miles.

For instance, my car gets about 34mpg. If I take 10,000 divided by 34, I get 294. Buying a new Prius (with a rating of 222), would save me about 72 gallons every 10,000 miles. At current prices, that is about $280. Obviously $280 isn't worth buying a whole new car for, and thinking about it this way makes it very apparent.

This should also make another point very clear. The easiest way to save a lot of gasoline is to focus on the biggest vehicles. If the average semi-truck gets 9mpg, and somehow we improved that to 11mpg (just a 2mpg improvement), it would save more gas than replacing a car with a Prius (moving from 25mpg to 45mpg, or a 20mpg improvement). Add to that the fact that semi-trucks drive many more miles on a yearly basis than any car owner does, and you have to wonder why people aren't clamoring for hybrid semis. Having a fleet of hybrid semis getting 14mpg would do way more for the environment than converting every car in America into a Prius.

Of course, I'm still holding out for plugin hybrids. Bring on the electric cars!

Saturday, June 14, 2008

Toadies

unit of h: make up your miiind
unit of h: decide to walk with me
unit of h: around the lake tonight
unit of h: aaaround the lake tonight
unit of h: bah mah side
unit of h: bah my side
unit of h: I'm not gonna liee
unit of h: I'll not be a gentleman
unit of h: behind teh boat house
unit of h: ah'll show you mah dark secret
unit of h: bundundununudnudndu udnu nud nudn (wananwananwannwa) waaaaaa
unit of h: I'm not gonnaaa liee!
unit of h: I want yooou for mine
unit of h: my blushing bride!
unit of h: my lover, BEE my lover
unit of h: yeaha!
unit of h: don't be afraid!
unit of h: I didn't mean to scare you
unit of h: so help me jeebus
unit of h: I can promise yoou
unit of h: you will stay as bootyful
unit of h: with dark haairrr
unit of h: and soft skiiinnnn
unit of h: fo-ev-errrr
unit of h: foo-ev-errrr
unit of h: make up yer mind
unit of h: make up yeeer mind!
unit of h: well I promise you
unit of h: ah will treat you well!
unit of h: mah sweet angel!
unit of h: so help me jeeeeebus
unit of h: aeaehayya
unit of h: give it up to me
unit of h: gibs it up too mee
unit of h: do yoo wanna be
unit of h: MAH ANGEL?
unit of h: gibs it up to me
unit of h: gibs it upp to meeeee
unit of h: do you wannna be?
unit of h: MAH ANGEL?
unit of h: GIVE IT UP TO ME!
unit of h: GIVE IT UPP TO MEE!
unit of h: DOOO YOO WANNA BE
unit of h: MAH ANGEL!?
unit of h: sooo help meeeeeeeeeeeeeeeeeeEEEEEEEE
unit of h: dun dun bam dun dun bam dun dun bamambamba dun dundund (wananana nan an aNAN NA NA NA)
unit of h: Beee mah angel
unit of h: beee mah angel
unit of h: be mah angel
unit of h: do you wanna die?
unit of h: do yoo wanna dieee?
unit of h: do you wanna DIE?
unit of h: do yoo wanna DIE?!
unit of h: DO YOO WANNA DIEEEE?!
unit of h: DO YOU WANNA DIIIEEEE?!
unit of h: DOOO YOU WANNA DIE?!
unit of h: DOOOOO YOO WANNA DIE?!
unit of h: well I promise YOU
unit of h: I will treat you well!
unit of h: mah sweet angel
unit of h: so help me jeeebuss
unit of h: jeeeeeeeebus
unit of h: jeeeeeebus
unit of h: jeeebussssSssSssss

Sorry harry, I'm taken.

Friday, June 13, 2008

HN Blacklist -> HN Toolkit

So thanks to nirmal's brilliant idea of browsing Hacker News in split view, I got the bug last night to add that functionality to the HN Blacklist. What I had originally thought would take about two hours ended up being about an eight hour ordeal, but it was worth it. I learned lots of neat things about the browser security model and GM evaluation, all because I couldn't get some event listeners to work.

The problem is now solved, and seeing as how my little blacklist does more than just that now, I went ahead and renamed it to HN Toolkit.

Obviously nirmal's bookmarklet works for a wider variety of browsers than my GM script, but my way means you don't have to hit his server to do it, which I figure is a good thing.

Sunday, June 08, 2008

Harvard Commencement Speech

So JK Rowling did Harvard's 2008 Commencement Speech. All I can say is... wow. If you want something to bump your optimism needle, this is it, and I'm not even really a fan of Rowling herself, although I do plan on eventually reading those things. This speech, however, was quite excellent.

Part 1:


Part 2:

Saturday, June 07, 2008

So, uh, Texas

I think I have completed major moving activities, so it's about time for an update to the old blog.

The move itself was rather more epic than I had planned. Due to the never-ending stormy weather we are getting this year, and the fact that I was planning on moving water sensitive things in the uncovered bed of a truck, the loading process took about five hours longer than the planned one hour. This was because we ended up gift-wrapping all our furniture in 3.5 mil plastic (the kind you put in flower beds). Several rolls of plastic and several rolls of duct tape later, we had everything ready, but seeing as it was about midnight, and our original plan was to leave at 2am, we ended up leaving later and breaking the drive into two days. With a stopover at my cousin Hillary's house for the night, it didn't end up costing us much.


Beaumont is amusing.

My only major accomplishments so far have been unpacking my stuff and reading a 700 page book by the pool. The pool here is quite excellent, and it's hot enough I don't even miss having a hot tub around.

Tonight I decided to get Firefox 3 RC2 up and running, just to try it out. It took quite a while to make portage happy. The initial emerge only took about 12 minutes, but some of the packages were requesting revdep-rebuilds that were curiously downgrading Firefox back to 2.0.0.14. After about an hour of investigating, I tracked it all down, and feel like documenting all my fixes here for fun.

Added the following to package.keywords:
=www-client/mozilla-firefox-3.0_rc2 ~amd64
>=dev-libs/nss-3.12_rc4 ~amd64
>=dev-libs/nspr-4.7.1 ~amd64
>=x11-libs/cairo-1.6.0 ~amd64
>=x11-libs/pixman-0.10.0 ~amd64
>=net-libs/xulrunner-1.9_rc2 ~amd64

Added this to package.unmask:
=www-client/mozilla-firefox-3.0_rc2
>=dev-libs/nss-3.12_rc4
>=dev-libs/nspr-4.7.1
>=net-libs/xulrunner-1.9_rc2

And to fix that reversion issue... added to package.use:
app-office/openoffice -firefox
dev-java/swt -firefox

Also changed my xorg.conf ButtonMapping Option to use buttons 8 and 9 instead of 6 and 7.

The first two sets of changes were needed to unmask everything Firefox 3 needed to compile. The changes to package.use were needed to fix the reversion issue. Apparently both these packages depend on Firefox 2 when that use flag is enabled, and aren't smart enough to use Firefox 3. I'm pretty sure I can live without whatever integration that use flag offers, at least until they are updated to use FF3.

As for the mouse button mapping, I guess older versions of Firefox incorrectly used buttons 6 and 7 as forward and back buttons, even though they are supposed to be the horizontal scroll buttons. Many laptop touchpads and fancy new mice have horizontal scroll spots/wheels, and firefox was executing back/forward operations whenever those users accidently bumped them. The side buttons on a mouse are apparently really supposed to be buttons 8 and 9, and substituting those for where I had 6 and 7 before did the trick nicely.

FF3 itself is great so far. The new Firebug has lots of nifty things, and since you can disable the performance sucking parts, it doesn't seem to bite page loads as hard. The zoom functionality is much better than before. (I use this a lot so I can read long articles while reclining several feet away from my monitor.) It actually zooms the entire page, images and all, much like the iPhone browser does. The old Firefox just made the text larger, which could lead to weird layout issues. The alt text on images actually shows in it's entirety when hovering, which makes xkcd comics much more fun. Browsing is moderately snappier, and the new javascript engine shines. Gmail loads up about twice as fast as before, and heavy javascript pages don't seem to clunk and stutter like before.

On that note, the new jQuery release apparently improved mouse handling and events a ton. Using the demos on the documentation site, I can definitely vouch that dragging and dropping seems much much faster/smoother, so definitely worth updating. I love jQuery.

I have a whole book in this excellent trilogy left to read, so probably nothing too exciting until I'm done with that. I'll be sure to rant about these books later. Kathy seems to be digging the new job duties, and it's kind of weird staying home all day, but it still feels like vacation, so I can't complain.


Plus I have this to play with all day!