Archives for the 'ruby' Category
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 […]
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 […]
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 […]
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 […]
outside.in switches to rails
I wrote a post for outside.in’s official blog a few weeks ago detailing some of the troubles and successes (mostly the latter) we encountered when switching over from PHP to Ruby on Rails last fall. It was kind of a herculean task for Christian and I, but has been well worth it so far. […]
One thing I love about Ruby (vs php)
The case (aka switch in other languages) control structure in Ruby is great. The first when clause that evaluates true is the only one executed.
Compare to PHP’s switch, which lets execution fall-through to every passing case until it finds a break. That’s just wrong. It’s so counter-intuitive. Sure, a veteran PHP […]
Secret Santa w/ Ruby
For our office secret santa pool, I wrote a quick little ruby script to generate the pairings and email each of the people in our office with their result.
Here’s the salient code:
pool = [”person1@email.address.com”,
“person2@email.address.com”,
“person3@email.address.com”]
avail = pool.dup
pairs = []
pool.each do […]
Making Applescript suck less with Ruby
I was messing around with Adium’s iTunes status message functionality today and ended up coming across RubyOSA, a gem that bridges AppleEvent functionality with Ruby. You can use RubyOSA to do anything that AppleScript can do, using familiar Ruby syntax. It also comes with a command-line tool that you can use to generate RDoc-style documentation […]
hot for ruby
Check out this funny story involving an attractive woman and a ruby programmer.