Software and Common Sense

August 14, 2006

Check it out: Alex Bunardzic puts the smack down on test driven development.

I completely agree that it takes great developers to produce great code regardless of methodology, and that crap developers produce crap software, even with the best intent.

However, there is a part of Alex’s post that bugs me. He states:

“… no amount of clever gimmickry and prescribed methodologies is going to help us. Only plenty of experience and plenty of common-sense can lead us out of that conundrum.”

Maybe I’m taking this the wrong way, but I don’t think this provides a better answer than the concepts he takes issue with: there are plenty of developers who have plenty of experience, and depend on common sense and intuition to really foul up their projects. “Common sense” is what makes gimmicks and methodologies so appealing!

So, instead of experience and common sense, I think a great developer (or manager) is one who thinks critically about a given scenario, and applies the appropriate techniques to complete it successfully. The solution comes out of critical thought and a large toolbox of techniques, developed through experience and analysis — applying methodologies and determining why they succeeded or failed. Were they incompatible to begin with? Were they a good fit for the development team? What indicators can I look for in my future projects and interactions?

The critical approach takes a lot more work and is decidedly less sexy than appealing to common sense, but it reliably produces the best results, and that’s what we’re shooting for. Right?

Alex posted a response, and I followed up here.

How I Learned Ruby

July 28, 2006

Greg Borenstein started an interesting process this morning, inspired by Amy Hoy‘s talk at FOSCON about how to keep the Ruby community healthy in the face of explosive growth. It’s a sort of chain letter, a kick start to the process of collecting stories from developers about how they learned Ruby. He named me in the first round, so I have no choice but to answer …

How I Learned Ruby

What was your technical background before you started learning Ruby/Rails?

Ten years ago I was an operating system and security geek who spent a lot of time twiddling with Linux kernels and GCC. Then I discovered dynamic web sites, and played around with CGI Perl scripts. I jumped on the PHP bandwagon pretty early on, got into Java when servlets were the New Thing, and pretty much stuck with PHP and Java until early 2005.

How long ago did you start?

Early 2005. I’m not sure exactly when I first dabbled in it, but my first real venture into building applications with Rails was in April 2005.

What were the two most useful resources to you in the learning process (not counting The Agile Book or the Pickaxe Book, which we’ll assume everyone knows about)?

The Portland Ruby Brigade, and Google. I had a pretty good understanding of architectural issues from the Java universe, so the hurdles of understanding MVC and ORM were long past … the big issue for me was understanding The Ruby Way, and nothing explains that better than source code (Google) and a community of people who enjoy talking about it (the Portland Ruby Brigade).

I’m going to toss in a third resource, and that’s developing Rails applications with a team. I was fortunate enough to spend several months working with the very talented developers at Planet Argon, and I’ve had the opportunity to work with several other small companies and contractors in the Rails community. There’s nothing quite like pair programming and code review to “keep it real.”

Strangely enough, I don’t own a copy of the Pickaxe Book, and although I ordered a copy of the Agile book, I don’t think I’ve gotten past the first few pages. Go figure.

Tell us the story of how you came to learn Rails:

I had heard of it and dabbled a bit in early 2005, but it wasn’t until I ran into Marcus Estes and the Tables Turned folks that I found a goal to inspire me to build some real apps. For me, having a real project to work on is the best way to learn things, and working with other people who have innovative ideas provided the motivation to dig into the API docs and learn Ruby’s tricks.

What keeps me interested in Rails is how much better it fits my projects than PHP or Java. PHP is great for tiny apps — like building brochure sites that need common headers and footers and maybe a little “special sauce” to make it interactive and interesting. Java is great if you have to deal with existing infrastructure and enterprise systems that are expected to be stable and available for decades. My projects are usually somewhere in the middle, and Rails suits them perfectly.

Three Ruby bloggers to whom you’re passing the baton:

I’m going to chuck this over the fence to Jeremy Voorhis, Geoff Grosenbach, and Aaron Johnson (he said he needed an excuse to start blogging, so here it is!).


July 26, 2006

I guess it’s a little late to mention it, but in three hours FOSCON II kicks off at Free Geek, in Portland, Oregon. It’s a veritable Ruby geekfest organized by the Portland Ruby Brigade (PDX.rb) … and I will surely be there to enjoy the revelry and Hot Lips Pizza.

Update:  The event went very well!  Free Geek was packed to the gills with an enthusiastic crowd, and the presentations were educational, funny, and inspiring.  Next year we’re gonna need more space.  I’ll post some writeups over the next few days for those of you who couldn’t make it!

Where’s the Glue?

July 26, 2006

Perhaps I’m out of the loop on this one, but I’ve found an odd gap between edge Rails and the simply_restful plugin. Here’s what’s up:

The Controller

ShoesController < ApplicationController
  def show
    @shoe = Shoe.find @params[:id]

The Views


My Expectation

When I GET /shoes/1.xml I get the XML format via the show.rxml file, and when I GET /shoes/1.html I get the HTML format via the show.rhtml file — afterall, the format is specified in the request, and passed through as @params[:format].

Unfortunately, I don’t have deep knowledge of the internal Rails code (yet!), so I kludged together a quick workaround that automatically determines format-based views.

The Workaround

def render_formatted
  @params[:format] ||= "html"  # Default format
  # build the preferred template path
  template = "#{RAILS_ROOT}/app/views/#{@params[:controller]}/#{@params[:action]}.r#{@params[:format]}"
  if File.exist? template
    render :file => template
    render :text => "'#{@params[:format]}' format not available for '#{@request.path}'", :status => 404

In practice, #render_formatted would be called at the end of any given action to provide the appropriate response. Know a better way to do this? Any feedback would be appreciated, especially if I’m missing a vital link in the clue train …


Quote of the Week

July 13, 2006

“English is a brawling, promiscuous drunkard of a language made up of mispronounced and stolen words from other languages, and that’s what makes it such a glory to speak.”

– Cory Doctorow, from “English Mistakes That Aren’t Mistakes”

Update: 12 people found my site this weekend by searching for “brawling, promiscuous drunkard” on Google. Excellent!

Wedding Pics

July 8, 2006

The Gents

My friend and photographer Owen Carey delivered over 800 photos — I’ve cut it down to under 25 for public consumption, and I’ll let The Wife post pictures of the ladies on her Flickr account. Good times!

Peat’s Wedding Photos

Boehm Stirling Engines

July 6, 2006

Ever been interested in stirling engines? Here are some rather creative and gorgeous functional models, from Boehm Stirling-Technik. The designs are Giger-esque, but pretty darned neat.

Do you like robots? I do — or did! Now I’m afraid of my blender and refuse to use cruise control.

How to Survive a Robot Uprising is an inexpensive, entertaining, and enlightening book. It’s an overview of modern robotics, but with a humorously paranoid twist. Written while getting his Ph.D. in Robotics, Daniel H. Wilson provides a reasonably thorough introduction to subjects like robot vision, mobility, and surviving getting shot with a laser. It’s a fun read, and the graphic design is enjoyable as well.

Notaphilist, Part Deux

June 23, 2006

This afternoon I had the opportunity to scan some of my German Reichsmarks, dated from 1908 through 1923. A pretty dramatic example of hyperinflation is the twenty billion mark bill that was only printed on one side. Check ‘em out at flickr, tagged with “reichsmark


June 23, 2006

I found my box of old German bank notes today, and it renewed my interest in paper money. “Yeah,” you say, “I’m interested in paper money too!” Well, I’m not interested in that way. I’m interested in bills from interesting places and times, and I have been for as long as I can remember. As a little kid I designed my own currencies for a lunar colony I built with Lego bricks. Terribly ugly stuff, but never-the-less an interesting venture.

What is it about paper money? I think it’s a combination of the feel of the paper and printing, the colors and designs, and the inherent story of obsolete or devalued money: that people once had faith that it was worth something more than paper and ink.

So, bit by the bug again, I spent some time on eBay this evening. Fortunately, this stuff is pretty cheap! A set of 13 Iraqi Dinar notes is less than ten bucks; likewise for a set of 35 miscellanious bills from Asia and South America.

Anyhow, I’m keen to see if anyone reading this is interested in this sort of thing.

Update:  The notes have arrived!  Check out “Money in the Mail” for more info.


Get every new post delivered to your Inbox.