Archives for the 'ruby' Category
Scotland on Rails videos are up
Here’s mine, from my talk “Who Needs Photoshop? Creative Image Manipulation in Ruby.” This was my first time speaking at a conference. Do I look as nervous as I felt?
Who Needs Photoshop? at Scotland on Rails from bantic on Vimeo.
Engineyard is hosting the rest of the Scotland on Rails videos.
My talk at Scotland On Rails
I had the opportunity to speak at Scotland on Rails last weekend. My talk was called “Who Needs Photoshop? Creative Image Manipulation using Ruby.” It was my first time giving a talk at a serious conference and I really enjoyed myself although I was pretty nervous leading up to it. The conference [...]
Creating Dynamic Adium Away Messages with Ruby and Applescript
I was messing around with Adium the other day and noticed that if you right-click while writing a custom away message a context menu comes up with an option to “Insert Script >”. Any time I see a script in use somewhere, I wonder what interesting thing I could do with Ruby. So, [...]
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 [...]