Monday, December 26, 2011

Functional vs Implementation Models

Our apartment building has a down ramp from the elevator to the basement level. My kids usually run down this ramp, stopping just short of the driveway for cars exiting the basement.

Of course, they stop short because they've been told that "Cars are coming"; or as my under-2-yr-old says "because car comin".

The other day he ran down the ramp as usual, stopped short of the driveway and chanted his usual "because car comin"; then paused to look, said "Car no comin" and proceeded to walk across the driveway.

I'd almost started to blurt out the "Look to your left, look to your right, then look to your left again.." routine in an effort to instill traffic safety at a early age (I know, parents) when he said "Car no comin". Since he did that, I kept quiet.

It then struck me that his way was much better than the "Look to left routine" because he's formed a mental model of when cars come and when they don't. Once he has that model, he's free to decide what to do: cross the driveway, stay put, or whatever.

The problem with the routine is that its prescriptive; and therefore - by definition - too restrictive. How would a child's mind associate such a routine to the situation? It seems to me there are quite a bit of wrong associations that can be made to the one right one:

Right:

  • When crossing a driveway, do the routine for your own safety.

Wrong:

  • When you run down a ramp, at the end do the routine
  • When you stop, do the routine
  • When daddy shouts as I'm running down a ramp, stop and do the routine
More importantly, the value of looking left again will be completely lost on a child IMO. Wouldn't it be much better if he arrived at that step by himself?

Thus too, it seems, with software. As long as we build in the right functional models, it should be easy to instill the right implementation model; and by extension - modify or maintain it.

No comments: