Rapid Red

Your rapid development experts

Ruby on Rails by proven experts.

Canaries in the Coal Mine

Before automated equipment, coal miners used [canaries](http://www.petcaretips.net/canary-coal-mine.html) to detect the presence of poisonous gas. These birds, because of their high metabolism, showed signs of distress far earlier than mice, rats, or people. Today, canary in the coal mine is used to demonstrate early signs of distress.

Yesterday, I did a code review. With a CEO. This guy had never written a line of code in his life, but he was energetic, and passionate about his business. The subject of the code review was the persistent model of my application. You’ve probably guessed that the app was on Ruby on Rails, and the customer was helping me get the business relationships right, before I had too much of an investment in a given architecture. Together, we found three improvements, and a couple of outright bugs. I thought about how much time and money I’d saved the customer, and then I considered what a similar exercise would look like with Java.

Who am I kidding? You’d never do that with Java. With Active Record, this communicates:

class Person < ActiveRecord::Base

belongs_to :department validates_presence of :first_name, :last_name, :email end

Similar Java code doesn’t get nearly the same points across. Similarly, we could look through the types of fields in the migrations, and with two passes, we could get a very accurate picture of the relationships, validations, and fields in the app. In reality, I just went through the relationships.

So Ruby on Rails is a very approachable technology. In some cases, it’s too approachable, and people attempt it that shouldn’t. But Ruby on Rails gives me incredible power to express the business aspects of the problem. I can dive into the right level of abstraction at the right time. And that’s a frighteningly powerful combination.

So here’s my point. Java used to be a staggeringly simple technology to approach, to understand, to use. We’re actively trading in that simplicity—that approachability—for enough complexity to solve problems that are interesting to a few, but with technologies that leave the average Java Joe out in the cold. That’s a distressed canary in the coal mine.

Blog