Mike Perham

On Ruby, software and the Internet

Entries Tagged as 'Ruby'

Expression Rescue is Evil

April 1st, 2008 · 2 Comments

One of the cleaner syntax options Ruby gives you is what I call expression rescues.  Take this:

<%= @item.parent.name rescue ‘None’ %>

This code is an example of a pretty standard requirement: printing out the name of the parent of an item. If the item does not have a parent, it will print ‘None’. Under [...]

[Read more →]

Tags: Ruby

Ruby, Rails and XFDL

March 5th, 2008 · No Comments

Brian writes:
My open-source web application will need to submit information to a URL in IBM xfdl format.  Is this possible with currently available tools?
In a word, absolutely.  There’s no XFDL “native” support that I know of but I’m guessing that XFDL is just another XML standard.  In this case, Ruby can create arbitrary XML with [...]

[Read more →]

Tags: Ruby

Death, Doom and Daemons!

February 25th, 2008 · No Comments

We’re actually starting to run the new FiveRuns service daemons internally and found that they were dying due to various issues so I integrated a little bit of ActionMailer code to email the dev team when a daemon dies with the relevant details.  Below is what I did - do you have any tips for [...]

[Read more →]

Tags: Ruby

Blogging @ FiveRuns

February 19th, 2008 · No Comments

We at FiveRuns are trying to make a more concerted effort to blog regularly on the FiveRuns blog.  To that end, I’ve written my first post on the various storage options considered for our metric storage subsystem.  I’ll probably focus most of my posts over the next few months on my ongoing work to tune [...]

[Read more →]

Tags: Personal · Ruby

Java Developers moving to Ruby and Rails

February 15th, 2008 · No Comments

I’ve mentioned here in the past that I’m one example of the flow of career software developers from Java and .Net to Ruby.  What I didn’t know is that DHH himself quoted my blog as a perfect example of this in his State of Rails 2005 presentation!
Wow, Check out slide 3.

[Read more →]

Tags: Rails · Ruby

Assert { 2.0 }

February 12th, 2008 · 1 Comment

Assert { 2.0 } looks like an incredible rethinking of the traditional junit/Test::Unit assert API, using some of the more dynamic features of Ruby. I’m impressed; kudos to the author.
http://www.oreillynet.com/ruby/blog/2008/02/assert2.html

[Read more →]

Tags: Ruby

acts_as_conference Finale

February 10th, 2008 · No Comments

I’m finishing up here at acts_as_conference in Orlando, FL.  I got to hang out with some of the Rubinius and Merb people.  Yehuda, Merb wizard extraordinaire, gave me a tip on how to ease my pain with ActionMailer (apparently Merb now has a mailer too) so I’ll be checking that out to see if we [...]

[Read more →]

Tags: Ruby

DSLs and XML

February 9th, 2008 · No Comments

I realize now why XML has become so wildly popular in programming.  If you look in J2EE or .Net, XML files are used everywhere to drive configuration and glue pieces together.  Why?
It’s because XML is a syntactically acceptable way to create a DSL without having to derive a grammar!
You can’t use Java to do configuration [...]

[Read more →]

Tags: Ruby

acts_as_conference Day 1

February 9th, 2008 · No Comments

Got here right in time, checked in at 12:30pm, conference started at 1pm.  The conference kicked off in a great way with a good talk from Neal Ford from ThoughtWorks on DSLs.  Do you know the difference between an internal vs external DSL?  I didn’t.  Internal DSLs are implemented in another existing language and that’s [...]

[Read more →]

Tags: Ruby

Austin jumping on Rails

January 28th, 2008 · No Comments

Great article with an overview of Rails and how it is slowly changing software development. Obviously I’m one example of the “attracting developers to the latest, greatest framework” point they make in the article.
Austin jumping on Rails

[Read more →]

Tags: Rails · Ruby