Whilst cleaning out my hard drive today, I found a document entitled Assorted Haiku, a collection of haiku on various topics I apparently wrote during my senior year of high school. Here they are.
Now buried deeply
Little one is ready to
Escape from the vag.
She is beautiful
Large and slick; the world blowhole
Is a misnomer.
My marshmallow peeps
Some headless, others tailless
Why are they making me work
I will make it through.
Forever in white.
After spending far too long getting acclimated to the University of Sydney, Matt, Nico, Cal, Brad, and I finally decided to check out Circular Quay. This is the area of Sydney that features that Opera House we’ve all heard so much about, as well as the Sydney Harbo(u)r Bridge, a ferry terminal, and some expensive looking apartments.
Until next time!
Hello, dear readers. As you may or may not be aware, this fall I am studying abroad at the University of Sydney.
My travelogue will probably consist mostly of photos and video, with perhaps a caption or two thrown in here and there.
Here are some of the highlights from the first week of the trip. That time was spent doing essentially all the touristy things available to us, courtesy of those fine folks at AustraLearn.
I’ll also be putting all my photos up on Flickr for all to see.
And now, a select few photos:
Have you ever been working on a big awesome website using Ruby on Rails and MySQL and had the need to rank your models by an attribute without loading them all into memory? I know I have.
Unfortunately, unlike Postgres and some other SQL flavors, MySQL lacks a built-in ranking function. After some cursory googling, I found Arjen Lentz’s solution which Chadwick Wood put into use in Rails. However, it’s a little clunky to put all that code in your model for every category you might want to rank, so I DRY’d it up and put together a quick little ActiveRecord plugin to do just that.
It’s easy to use, in your model just declare the columns you want to be able to fetch ranks for:
class User < ActiveRecord::Base rank_by :score end
… and with a little dynamic business you can call a method like this:
So there you go.
I’m willing to bet that this won’t perform well on extremely large datasets, but I haven’t found a better solution for MySQL. For the time being, you probably will want to cache this value somewhere.
You can find out how to install the plugin by visiting Rankitize on GitHub.
Somehow, somebody on Digg said something that was not stupid. In a reply to Glenn Beck proving once again he is out of his goddamned mind and making the movie Network all the more prophetic, intrepid Digger nanosec makes a great point:
Here’s an example, if there are 2 car washes, where one charges a nominal fee to get your car washed and the other charges $90,000, which one do you think is going to have a queue? If you remove the cheap one, then you’re going to have people driving around in dirty cars because they cannot afford to have their car washed.
Of course, the horror-stories about long lines in countries with national health insurance are mostly lobbyist scare tactics anyway.
Noah and I put together a little music video inspired by South Carolina governor Mark Sanford’s “I spent the last five days crying in Argentina” speech.
You can also download the song if you want.