SBPP #1: Introduction

The Ruby Rogues are reading Smalltalk Best Practice Patterns for next month’s book club, so I finally got around to ordering a copy. It’s high time, considering that in my experience it’s one of the most consistently recommended programming books in print.

Some notes and quotes from the introduction:

  • Defining patterns: “a pattern is a decision an expert makes over and over”.
  • Patterns in the small: “I’m constantly amazed at how even a little help cleaning up small problems reveals the source and solution of much bigger problems”.
  • “It is easy to get numbed to pain and frustration, or treat it as if is part of the territory”—this dovetails with a realization I had recently: my “Confident Code” talk, at its core, isn’t about clean code; it’s about joy. Programming in a conducive programming language should be pleasant. Fun. Joyful, even. Antipatterns steal joy because they add weight to every step. It’s worthwhile to periodically remember the joy of that first “a-ha!” moment in Ruby (or Smalltalk, or whatever), and figure out if and why we aren’t feeling that way anymore.
  • “The very act of deciding what corners to cut slows down development. Using these patterns lets you program flat out, applying patterns as fast as your fingers will go, and get results as quickly as possible”. Beck goes on to say of adopting these patterns “whole hog”: “…I spent a couple of frustrating weeks programming at less than full speed. After that, I memorized enough patterns to get back up to my old productivity, but the code I was producing was cleaner than before. After a couple more weeks, I no longer had to look up any patterns, and my productivity shot up while my code kept getting cleaner and cleaner.”

This last quote nicely sums up an observation I’ve made over the years. A lot of programmers, when evaluating a new discipline, note (correctly) that adopting it will slow them down in the short term. They then extrapolate from this short-term slowdown that it will always slow them down, and is therefore a waste of time.

Maybe it’s just good ‘ole hacker hubris: the assumption that we can fully assimilate any new knowledge in a matter of hours, and if not, it’s not worth learning. In any case, it’s a flawed mental model. New disciplines, when practiced diligently, eventually become automatic.

 

4 comments

  1. “Programming in a conducive programming language should be pleasant. Fun.
    Joyful, even. Antipatterns steal joy because they add weight to every
    step.”

    That’s what it felt like spending the past year in ActionScript.  The joy having been stolen out of it, with every step carrying extra weight, that is.  At first I thought it was just because I was new to it.  Then after it didn’t click even after a few months, I thought maybe it was just hard, and I’d get through it with extra effort.  But no….

  2. Great
    goods from you, man. I have understand your stuff previous to and you
    are just too excellent. I actually like what you’ve acquired here,
    really like what you’re stating and the way in which you say it. You
    make it entertaining and you still care for to keep it smart. This is
    really a great web site.

  3. Great
    goods from you, man. I have understand your stuff previous to and you
    are just too excellent. I actually like what you’ve acquired here,
    really like what you’re stating and the way in which you say it. You
    make it entertaining and you still care for to keep it smart. This is
    really a great web site.

Leave a Reply to CD Duplication Cancel reply

Your email address will not be published. Required fields are marked *