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

Ryan Davis, Hurting Code For Fun and Profit

Paul Dix, Collective Intelligence

Ezra Zygmuntowicz, Merb

26 April 2008 | general, ruby | No Comments

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.

10 April 2008 | general, music, nyc | No Comments

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.

8 April 2008 | general, ruby, web20 | No Comments

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.

27 March 2008 | general, projects, ruby | No Comments

Asimov would be proud…

Robots seem to be getting awesome again.

Evidence:

Does this robot-assisted suicide conflict with the three laws of robotics?

27 March 2008 | general | No Comments

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.

14 March 2008 | ruby | No Comments

Puddleblog on Kottke



Kottke linked to our collaborative work puddleblog yesterday. Cool.

13 March 2008 | general | No Comments

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.

29 February 2008 | general | No Comments

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:

25 February 2008 | nyc, projects | No Comments

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”:

25 February 2008 | general, music, nyc, parties, photos | No Comments

About Me

I work at outside.in during the day. On nights and weekends I do stuff and work on side projects, which you can read about here.
View my outside.in blogmap.

    Meta