The Shape at the Bottom of All Things

I've been teaching a fair amount, which means I've been revisiting my 'class problems' regularly. When I chose the problems, I thought that I understood them completely (hubris, I know) but now that I've worked them repeatedly I'm seeing new and surprising things.

These new things have to do with the _shape_ of code. Code can be written, or shaped, in many ways, and I've always believed that for any given problem many different code shapes gave equally 'good' solutions. (I think of programming as an art and am willing to give artists a fair amount of expressive leeway.)

But I'm having a change of heart.

Posted on September 9, 2014 .

Getting It Right By Betting On Wrong

Imagine driving from Denver, Colorado, to Death Valley National Park.

You get on I-70 and head west, climb the front range, cross the high peaks of the Rockies, descend Colorado’s western slope into Grand Junction and then make your way across the Utah dessert to Fishlake National Forest, which, if it’s springtime, is likely on fire. Here you collide with I-15 and turn left to head south.

In the deepest dark of night, eleven hours into your drive and two short of your destination, the long smear of the Milky Way Galaxy fades behind the neon lights of Las Vegas. Against your better judgement you stop and wander into a casino. They immediately recognize you as a programmer and force you to choose one of two sides in a permanent bet.

The bet is whether the code you wrote in the last month is ‘right’ or ‘wrong’. The casino defines ‘right’ as ‘Will not change for any reason within the next 6 months’. You’ll win if you bet on ‘right’ and your code doesn’t change, or if you bet on ‘wrong’ and it does.

Posted on May 28, 2014 .

How Shall We Define Design?

I love object-oriented design.  It’s like open source software in general; perfect strangers come up with ideas that can save me time and money and then, out of the goodness of their hearts, go to a fair amount of trouble to pass these ideas on.  I benefit from their efforts every day.

However, you don’t have to go far to find competent, thoughtful, well-intentioned folks who curse and spit when they say ‘design’.  To these folks OOD is anathema; they see it as useless excess that must be avoided at all costs.  

Two things are odd about this situation.  First, while I’m certainly no genius, neither am I a complete idiot.  As a woman of a certain age I’ve been writing code for an alarmingly long time.  I have tons of experience getting applications out the door and my experience is that OOD lowers costs, increases output and keeps code fun.  

Second, when I listen to the anti-design folks explain their points-of-view, I agree with about 99.9% of what they have to say.

Posted on July 5, 2012 .