Learning to Think in the Abstract

Something I've noticed as I work with developers of varying skill levels is that one of the key differentiating factors between the junior folks and the senior folks is the ability to think in the abstract - that is, patterns and concepts, not concrete implementations.

How many times have you been one of the people in this conversation?

Senior Developer: OK, so the task at hand is to create a Doorman that works in a hotel or apartment building. We know he's going to hail taxi cabs, handle the door for people, make small talk, and do a few other things. Today we're just looking at the door handling part.

Junior Developer: What kind of door is it?

SD: It really doesn't matter, and we won't really know until the Doorman gets placed somewhere, so we need to be flexible. What we probably should do is have an interface like "IOpenDoor" with an "OpenDoor" method. Then we can provide any number of implementations to that to handle different door types. (This is the strategy pattern.) The question on the table is, "Does the doorman need to do anything else with the door besides open it?"

JD: What if the door is heavy?

SD: It doesn't matter - that's an implementation detail. What we're looking at here is the pattern. Like, we know the Doorman needs to open the door, but does he need to close it, too? Should it be "IDoorController" with "Open" and "Close" methods? Or do we consider all doors to be self-closing?

JD: If the door is glass and the Doorman kicks it closed, he might break the door.

SD: Um... OK... right... but really we need to look at the pattern here. Is it the right way to go? Are we missing something around the Doorman's interaction with the door that we should know about?

Another Senior Developer: The door might be open due to some other action, but the Doorman might be requested to hold the door, so we might need a "HoldOpen" method on that interface.

SD: Good point. That's a door state we didn't consider.

JD: What if the door has a knob instead of a handle?

SD: Step into my office.

Now, I'm not saying that all junior developers are unable to think in the abstract, and I'm definitely not saying that all senior developers (or at least people with a "senior" title) can. What I'm saying is that the ability to think in the abstract is key to being able to step beyond simple coding and into the world of development.

posted on Monday, August 11, 2008 8:33 AM | Filed Under [ GeekSpeak ]

Comments

Gravatar # re: Learning to Think in the Abstract
by Harold Trammel at 8/18/2008 9:10 PM
I like your example. I find experience is necessary to think abstractly. Have you considered expanding on the "how" of learning to think abstractly? I have told various staff that they need to think more abstractly and I get the "deer in the headlights" look. I'd be interested in your suggestions on the "how". Thanks in advance.
Gravatar # re: Learning to Think in the Abstract
by Travis Illig at 8/19/2008 2:51 PM
There seem to be two problems: First, the person has to understand what it means to think in the abstract. Second, the person has to put that into practice. Unfortunately, it's usually hard to tell where folks fall on the spectrum.

I've found analogies to be good in trying to explain the concept of abstraction, similar to my story, above. The only real problem with the analogy method is the non-abstract thinker will sometimes latch onto the analogy and only be able to think abstractly about that one analogy. You get into a sort of Catch-22 situation there.

Establishing the ability to work in the abstract is much harder than getting folks to actually use that ability. Explaining what falls into the concrete and what falls into the abstract so there's something to start with can help. Using my story example, I'd explain that the actual door is an implementation detail but the actions it needs to perform affect the abstraction.

Beyond that... you got me. I sometimes wonder if it's like an M. Night Shyamalan movie where there comes a point when something just "clicks" and things suddenly become clear. That "holy crap, I finally get it and now I need to watch it again" moment. But if that's what it is, I don't know how to trigger it.

If you figure it out, let me know.
Comments have been closed on this topic.