notes from GoRuCo2008
I’m seeing a lot of interesting stuff at GoRuCo and I was going to start taking notes in textmate but I decided to just put them here on my blog instead.
Chris Wanstrath, parse tree
- Sake, rake tasks that you can use between different projects.
- Cheat — command line interface for looking up documentation. Like ‘man’ for ruby and rails methods.
- Ruby2Ruby (I can’t find the official homepage, that’s a placeholder). Looks very cool, but I am not 100% sure what it does other than self-document (?) your ruby code with ruby code. I have to play with this to figure it out.
- RingServer, RingyDingy — a way to do mapreduce type stuff using drb in ruby. I wonder if we can use this for tasks at outside.in
Ryan Davis, Hurting Code For Fun and Profit
- Code-writing ability increases non-linearly when you become a Ruby sadist/asceticist
- coined a new term: menturbating/mentorbating
- “Introspection-driven development”
- self-improvement: read 1 nerd book/month (12x the industry avg). c2.com , read 10-20ish smart blogs
- ignorance is not bliss. NYT article by Erica Goode
- wtf, coding horror and other idiot forums, trim the blogs in your newsreader, focus
- important/not-important, urgent/not-urgent. these form a quadrant. push towards important. the not-important and not-urgent stuff are useful at times, too, for fighting burnout. via 7 habits of highly effective people by covey. “do you want to be right, or do you want to be effective?”
- study something non-coding-oriented. push yourself. write more code, lots of it. junk code. write stuff to figure something out. quantity can be greater than quality (sometimes)
- “The function of the overwhelming majority of your artwork
is simply to teach you how to make the small fraction
of your artwork that soars.” from: “Art & Fear” - Don’t be a sheep. challenge the status quo. Feel. Let your emotions flow. Have an opinion (but dont be an asshole).
- zentest, flog (complexity reported based on ABC metric, correlates to testing complexity. the scores are important relative to each other, not absolutely) & heckle — (love of good dev tools)
- vlad and image_science — (hate of complex code)
- use feedback. ask for it. listen to it. feed the feedback back. constantly refine.
- find your balance. between 0-100% action and 0-100% thought is your sweet spot. find that balance an dyou’ll be most of effective.
- ryan hates inject — why? (see the mailing list)
- heckle: runs your tests and mutates your implementations to verify that your tests are good. if youre mutated tests still pass after mutation, you missed an edge case
- enjoy hurting bad code and you’ll have less of it over time. eschew complexity.
Paul Dix, Collective Intelligence
- Slides are up at paul’s blog
- explicit versus implicit data. implicit happens as a result of other actions. scrobbling is an example. explicit makes you make choices (give ratings/grades/stars to things, etc.)
- types of recommendations — content-, user- and item-based. content is like other content, users are like other users, items are like other items.
- basic strategy: map data to a euclidean spaces, calculate similarity using a metric, and use similarities to recommend. represent the data as vectors.
- (I discovered confreaks just now. cool. I think goruco vids will be up there later.
Ezra Zygmuntowicz, Merb
- Merb looks really cool. I got tired of taking notes here so I just sat back and watched his talk. Next personal project I do is going to be in Merb.
VHS or Beta
I went with Jenny to see VHS or Beta at the Highline Ballroom last night. I’ve been a fan of VHSOB since discovering them in the Indie/Rock Playlist for November ‘07. Big surprise seeing them live was that they are very jammy. Oh, and a lot of their songs sound very similar.
My favorite song of theirs is Can’t Believe a Single Word (thx, Heartache With Hard Word). Here’s some video I took of them playing it last night at the end of their encore:
Can’t Believe A Single Word from bantic on Vimeo.
Also check out this awesome drivelapse video (in HD no less) featuring a VHSOB backing track:
Driving Time Lapse 2.0 from Andrew Curtis on Vimeo.
Google App Engine
I’ve really been enjoying messing around with ruby and rails lately and all the new side projects I’ve been tackling are written in ruby. Trouble is, I can’t actually launch any of them on the hosting provider that I use, hostgo (not strongly recommended; look elsewhere), because they don’t let me run rails or ruby.
I’d just about decided to find a Rails-ready instance on EC2 and start deploying my apps there. Until today.
Today Google App Engine was announced and I spent all morning daydreaming about how I could easily deploy stuff with it, and have a great excuse to play with a new platform to boot. That is, until I read the documentation closely and saw that the sandbox environment runs Python. Darn.
I’m still very excited about the idea. Al3x has a good post about the benefits and drawbacks.
It’s good to see the bar continuing to be lowered. Used to be that in order to have a blog you had to start an account with a hosting company, register a domain, and install MT or WP. Now, anyone is about 30 seconds away from a new blog at blogger. Likewise, if you wanted to create a web app you had to have a hosting account, create a database on it (at least they have an admin panel), and start writing. Now, with EC2, S3, App Engine, Scalr and so on, the hard work of setting up a database and finding a hosting provider is getting further abstracted away.
There are two good things happening here. App Engine and Scalr and EC2 are making scaling a more manageable problem, but they’re also first steps in making it really easy to launch an application for the first time, without having to deal with the sysadmin-style stuff. We’re closer to being able to write code on your local machine and push a button to deploy it live, no need for setting up an environment on some host, it will all be abstracted for you into the cloud so you can focus on creating something innovative.
We are also seeing more building-block type applications, like Ning, that are trying to abstract away the code-writing in addition to the sysadmin-ing.
There are a lot of people with creative ideas. And there are some people with the technological fluency to use unix, install databases, and write code. Innovative startups used to happen at the intersection of those two groups. These new tools make that second skill set a lot less necessary. And the first skill set will become a lot more valuable.
checking table existence in Rails’ migrations
I just refactored a table and in the migration I created for it I first need to drop the table and then create it from scratch, so the first line of self.up is drop_table :table_name. But when I go back and forth over that migration, the second time around the table doesn’t exist (because it got dropped proper in self.down), so I need to check that the table exists before I try to drop it in self.up.
Here’s the function I created to do that check:
def self.table_exists?(name)
ActiveRecord::Base.connection.tables.include?(name)
end
And here’s the new first line of self.up:
drop_table :table_name if self.table_exists?("table_name")
Clean.
Asimov would be proud…
Robots seem to be getting awesome again.
Evidence:
Does this robot-assisted suicide conflict with the three laws of robotics?
Happy Pi Day
Today is 3/14 (if you’re using the US way of writing dates), aka Pi Day!
A few years ago, Google created a really clever job posting (more here). They put up banners and bought billboards in areas of the country with lots of smart mathematicians, such as Harvard Square in Boston, that said: “(first 10-digit prime in consecutive digits of pi).com”.
If you calculate that 10-digit number and combine it with “.com” to create a domain name, the website that comes up challenges you to another puzzle. Eventually, after answering several challenges correctly, you’re directed to a page that invites you to apply to work at Google. Pretty clever.
I found out about it a few years too late, but took the challenge upon myself anyway and wrote a perl script that calculated the correct answer. On this Pi Day I am endeavoring to code up a solution again, using my new favorite programming language, Ruby, mostly just for fun but also to see if my abilities have improved any since the last time. Unfortunately, the blog post I wrote about my perl solution has somehow been lost to the winds of /dev/null, so I can’t compare the code outright. But I will say that this time it only took me about 10 minutes to code up this solution:
#!/opt/local/bin/ruby
module Prime
def prime?
return false if self % 2 == 0 # divisible by 2
# check odd divisors from 3 to the square root of this number
(3..(Math.sqrt(self))).step(2) {|i| return false if self % i == 0}
# didn't find any divisors
return true
end
end
# mix the module into the bignum and fixnum classes
class Bignum
include Prime
end
class Fixnum
include Prime
end
# digits of pi from http://www.eveandersson.com/pi/digits/
pi_digits_filename = "10000.txt"
pi_digits = File.open( pi_digits_filename ).read
pi_digits.gsub!("\n","") # strip newlines
pi_digits.gsub!(".","") # remove the "." in 3.14...
# iterate 10-character strings
0.upto(pi_digits.length - 10) do |i|
num = pi_digits[i,10].to_i
if num.prime?
puts num # found it
break
end
end
Update: Ok, it appears that the Google challenge was to find that prime in consecutive digits of e, not pi. Oh well. Next year I’ll do this exercise with whatever language is hot on 2/18.
Puddleblog on Kottke

Kottke linked to our collaborative work puddleblog yesterday. Cool.
Guest Blogging
Today I’m making a guest post to my friend Andrea’s blog, Some Things I Know. I know Andrea from college and every Friday she has a “Friend Friday” post, where a friend of hers posts an update. I’m excited to be included and I’ll link to the post here after she puts it up.
Update: Andrea put up my post. Here’s the link: Cory Forsyth.
Going Full Lincoln — Bearduary Appearance on Today Show Tomorrow
Tomorrow morning I’m going to be on the Today Show at the NBC Studios. They’ll be shaving my Bearduary beard and possibly giving me a free haircut (score!) while the hosts interview the Bearduary founders.
The taping is supposed to take place at 10am EST on Tuesday and last for about 45 minutes. I don’t know yet if that means I’ll actually be on the air at that time or if it will be another day. If anyone has a DVR and wants to record this for me, that would be awesome.
Here again is the Bearduary Documentary that Sai and I made in 2006:
Bedouin Soundclash @ Knitting Factory

Bedouin Soundclash @ Knitting Factory
For Rob’s birthday party, we went out in Tribeca and then saw Bedouin Soundclash play the Knitting Factory. I had never heard of them before about a week ago, but I was really impressed by their show. They are reggae-ish, with a little punk in there. Their sound, especially the singer, reminded me a bit of Rancid, except Rancid is punk first with reggae thrown in.
I was able to muscle my way to the front of the stage for the encore and even got to break up a fight between two girls!
Here’s my current favorite Bedouin Soundclash song. It reminds me of the Sublime song D.J.s. Bedouin Soundclash — Waiting For My Ruca. (Via Lil’ Mike.)
Here’s Bedouin Soundclash playing their single, “When the night feels my song”: