One of the goals that I set for myself for the year was to spend more time playing guitar. I’ve been playing on and off for over 10 years now, but last year was particularly hectic with work and Europe and I barely picked up an instrument at all. So a few weeks ago I went to pick up new strings. I had noticed a new guitar shop, Danche Guitars, in Oak Park and decided to pop in and check it out.
When I stepped in, I was immediately transported back in time. The smell of wood glue, sawdust, and fine wood reminded me of the harpsichord workshop of Peter Redstone, an old neighbor from Virginia.
I was charmed by the shop and the proprietor, an older Croatian gentleman who evidently took tremendous pride in the workmanship of his luxury guitars. He was even nice enough to let me play one of them, but I have to admit that the $15,000 price tag of the guitar I was holding made me more than a little nervous.
After half an hour of talking, as I was selecting my strings, he pointed to a flyer on the wall and said that his son was taking students if I was interested in signing up for lessons. I should point out that while I take tremendous pride in being self-taught in nearly everything that I do, I had realized some time ago that there were fundamental flaws in my physical approach to the guitar, and these were preventing me from doing certain things that I needed to do. So I swallowed my pride and gave him my name and number.
Now, every week, I’m studying under the patient tutelage of the incredibly talented Goran Ivanovic, and I’m seeing tremendous progress in a very short time.
By the way, if you’re interested in hearing some of my music, I recently uploaded some songs to Last.fm. Just look for “Dust and a Shadow“.
I’m currently working on a project to create a travel website, and I needed to have a bunch of member profiles to use for testing the member directory. I came across a great Ruby gem called Faker which I’ve used to create the dummy accounts.
Installation is easy, of course: gem install Faker
Next, I created a Rake task for populating the accounts:
namespace :db do
namespace :development do
desc "Create user records in the development database."
task :fake_user_data => :environment do
require 'faker'
@countries = ["United States", "Canada", "United Kingdom", "Germany", "Mexico"]
@genders = ["Male","Female"]
@privacy = ["members", "public"]
def randomDate(params={})
years_back = params[:year_range] || 5
latest_year = params [:year_latest] || 0
year = (rand * (years_back)).ceil + (Time.now.year - latest_year - years_back)
month = (rand * 12).ceil
day = (rand * 31).ceil
series = [date = Time.local(year, month, day)]
if params[:series]
params[:series].each do |some_time_after|
series << series.last + (rand * some_time_after).ceil
end
return series
end
date
end
100.times do
u = User.new(
:first_name => Faker::Name.first_name,
:last_name => Faker::Name.last_name,
:birthdate => randomDate(:year_range => 60, :year_latest => 22),
:created_at => randomDate(:year_range => 4, :year_latest => 0),
:city => Faker::Lorem.words(1).to_s.capitalize,
:state => Faker::Address.us_state(),
:country => @countries.rand.to_s,
:password => “greatpasswordhuh”,
:password_confirmation => “greatpasswordhuh”,
:accepts_terms_and_conditions => true,
:gender => @genders.rand.to_s,
:email => Faker::Internet.email
)
u.extended_profile = ExtendedProfile.new(
:bio => Faker::Lorem.sentences(5).join(” “),
:occupation => Faker::Lorem.words(1).to_s.capitalize
)
u.preferences = Preferences.new()
u.save!
end
end
end
end
Note that while Faker was good for creating random names, e-mail addresses, etc., I needed some other data that was outside of its scope, for example gender and country. For these, I simply created an array (like @genders = ["Male","Female"]) and called @genders.rand to pick a value. I also used its Lorem Ipsum generator to create random city names, occupations, and biographical text.
Once the Rake task was written, it was simply a matter of typing rake db:development:fake_user_data to populate the database with my junk records. Pretty sweet!
You can find Faker at http://faker.rubyforge.org/.
I finally finished migrating everything over from my old desktop to my new iMac. (I’m still amazed that a consumer-level Mac is more than twice as fast as my old high-end desktop… such is the pace of hardware, of course.)
At any rate, when I started working on one of my Rails projects, I was surprised to see that performance was really poor– much slower that on the old box. Then I realized that my Ruby and Rails installations probably got migrated by Migration Assistant.
Sure enough, ruby -v in Terminal revealed Ruby 1.8.6 for PowerPC/Darwin. This means that Ruby is running in PPC emulation, which explains the performance I was seeing.
Since Leopard ships with Ruby, this means that I now have two versions: in /usr/bin/ruby there’s the version that came with the OS, which is
ruby 1.8.6 (2007-06-07 patchlevel 36) [universal-darwin9.0]
In /usr/local/bin/ruby there’s:
ruby 1.8.6 (2007-03-13 patchlevel 0) [powerpc-darwin8.10.0].
This is obviously a problem…
Some Google time later, I came across this post on Punctuated Productivity; that set me in the right direction for uninstalling the old version and getting the new one up to snuff. His approach was to completely wipe /usr/local/bin and /opt/, which I found a little scary. Here’s a slightly more surgical approach.
- Remove the following from /usr/local/bin (sudo, of course):
gem*
update_rubygems
rails
rake
mongrel-rails
cap
capify
gpgen
index_gem_repository.rb
libpng-config
- Unfortunately, I had just installed and configured ImageMagick on the old box, which is a long and tricky process that I’ll have to do all over again. But since it was the only thing that I had installed on that day, so I was able to
open ./ to open /usr/local/bin in the Finder, sort by date, and select/delete all of the ImageMagick and RMagick files in a couple of clicks:
Magick-config
Wand-config
animate
compare
composite
conjure
convert
display
freetype-config
identify
import
libpng12-config
libwmf-config
libwmf-fontmap
mogrify
montage
pkg-config
stream
wmf2eps
wmf2fig
wmf2gd
wmf2svg
wmf2x
libpng-config
- My last uninstall step was to delete /opt after all, because only MacPorts (which I used to install ImageMagick) had put anything in there.
Now hash -r followed by which ruby correctly reveals /usr/bin/ruby, and ruby -v reports ruby 1.8.6 (2007-06-07 patchlevel 36) [universal-darwin9.0]
Now to reinstall Rails:
sudo gem install rails --include-dependencies
Next I have to reinstall ImageMagick and RMagick, which will hopefully be less painful this time around now that I know about MacPorts…

Take a look at Tuesday: from 49 to -2 in about 8 hours. Whee!
Hard to believe, but my 20th high school reunion is coming up next year. This fact doesn’t make me feel “old” or anything, though; I simply don’t feel like I’m the same person. At all. And while I can certainly narrate the steps that led me from a town of 400 in the swamps of Virginia to where I am now, it seems more like a familiar fiction than memory. Odd.
The organizers of the reunion are using some sort of pre-packaged high school reunion web app, where you invite your classmates to register and everyone can see profiles, send mail, etc. I was particularly happy to see the name of one of my long-lost school friends, Leon, appear in the roster.
He probably doesn’t realize it, but he’s the reason that I did so well in high school. I was in danger of being bored out of my mind, unchallenged and unmotivated by the curriculum. But Leon and I had an unspoken competition for who could get the best grades in our science, computer lit, and math classes. Usually, the gap between us came down to tenths of a point. This was particularly true in our honors physics class, where we essentially taught ourselves.
Leon and I were also protogeeks, both of us having a natural affinity for programming. We had plans to start our own software company (”Z-Tech”) and signed up for every free subscription, swag, and sample that we could, under our company name. We worked side-by-side on the state-of-the-art Apple ][e computers that were in the lab, and probably drove our computer lit teacher crazy. We laughed over the old Beagle Bros. catalogs, shared secrets for cracking copy-protected software, and took secret pleasure in crashing the computers of our fellow students when they got too annoying.
I am also eternally grateful for the time that Leon loaned me his programmable Tandy scientific calculator, which allowed me to conduct one of my earliest experiments in parapsychology for the science fair. (That’s a story for another post.)
I’ve thought about Leon from time to time over the years, wondering what he ended up doing, and if the path of his life ever went the way he expected it to. Unfortunately, his last name is just common enough to make him Google-proof. But I’m happy to say that almost immediately after I registered on the reunion site, I got an e-mail from him, reminiscing about the old days. I can’t wait to catch up with him.
Leon, do you still have any of those old 5.25″ floppies around?
Shameless self-promotion: a friend of mine who is an ardent Obama supporter and active Something Awful forum goon recently contracted me to build a blog site for her. The result is “The Audacity of Truth”, a site devoted to dispelling media myths and mud-slinging centered on Obama. The Something Awful community regularly posts there, and together they have raised over $15,000 for the campaign through the site.
Check it out at www.audacityoftruth.org
So as of my birthday (December 17, for those who are keeping track and feel the need to buy me a belated birthday present), I have quit the corporate labor force and entered the world of independent consulting.
In the process, I have discovered first-hand what I previously only knew of from whispers and legends: something called “Life/Work Balance”. Those of you who know me or have worked with me are probably aware of my insane work ethic and my highly focused yet manic devotion to Getting Things Done, the result of which usually amounts to about 60-70 hours of productive work per week. Doing the math to calculate my actual hourly wage, it was clear that with a salaried position I was edging my way down from director-level pay toward McJob-level payWorking from home hasn’t really reduced the number of hours that I spend on the job, but it does mean that I’m much more flexible in terms of when I put those hours in.
My typical day starts at 9am with a couple of cups of coffee and perhaps some breakfast, spent in the company of my amazing daughter and lovely wife; at 10 I start work, stopping for an hour lunch (and dog-walk) at noon. I continue work through 7 or so, when it’s time for dinner. The evening is split between around-the-house work, hanging out to watch Sopranos, or whatever else. If I still have work that I want to do, I resume around 11 or midnight, after Lisa has gone to bed. (Otherwise, it’s World of Warcraft time…)
I’m using The Omni Group’s excellent OmniFocus in conjunction with a small whiteboard to manage my tasks, along with a bunch of productivity tips gleaned from LifeHacker. The result? High productivity, much more family time, a commute that doesn’t involve an hour a day of public transportation, and the freedom to spend my time how I want it.
Overall, a happy Corey.
A few years back, I started working on a JavaScript framework for developing 100% portable, client-side web applications. This actually arose out of some contract work that I had done in which I needed to create a fully interactive prototype for an interesting piece of desktop sotftware. The software was intended to monitor one or more human organ transport devices, providing a real-time view of the system’s state and issuing warnings as needed.
Although the framework had been previously available as a download from idolhands.com, it’s finally matured enough (and grown complex enough) that I’m releasing it under the Lesser GNU Public License. The code repository is on Google Code and I’m working on documentation and a sample implementation now. The framework has been renamed FACETS, for Fat Ajax Client / Thin Server.
They did the right thing!
Tonight when I got home from work, I found this in my e-mail box:

Apparently, Apple used to provide video of WWDC sessions, but last year, they opted instead for streaming broadcasts of the sessions via “ADC TV”. With no mention of session videos at this year’s WWDC, everyone pretty much assumed the worst; for many, this was right up there with the quality of the food as a sign that the good old days days of the WWDC were long gone. So nay-sayers, say nay no more. Or something.
As of 12:45 this morning, there are 108 sessions available for viewing, with more sections labelled “Coming Soon”. Each session seems to contain an eBook of slides and a video of the presentation itself. (I’m not talking about what sessions are or are not there, because of the often-stressed NDA.)
Hopefully now that Apple has done the right thing and released all of this content, the dev community can take a deep breath and get back to coding the next wave of great apps for Leopard. Mine is already in progress…
OK, so it appears that Google did, in fact, get the idea for Image Labeler from someone in game theory– Luis von Ahn at Carnegie Mellon University. They licensed his ESP Game, in which players try to guess the words that their partner is entering when shown an image.
I stand by my assertion that this is the wrong game framework for creating valuable image metadata, however, because the game is about predicting your partner’s guesses (thus “ESP game”), and not about collaborating or validating meaningful tags.
The purpose of von Ahn’s game is made pretty clear in the screenshot below:

|
No Comments »