In my previous post I introduced the topic of design heuristics. Billy Vaughn Koen, in Discussion of The Method: Conducting the Engineer’s Approach to Problem Solving, defines a heuristic as, “anything that provides a plausible aid or direction in the solution of a problem but is in the final analysis unjustified, incapable of justification, and potentially fallible.”
Common phrases that mean roughly the same thing as heuristic in English include “rule of thumb or “practical method” or “useful shortcut” or “approximation”. I don’t think approximation or shortcut convey the essence of what makes a heuristic handy or helpful. Wikipedia defines heuristic as, “any approach to problem solving, learning, or discovery that employs a practical method not guaranteed to be optimal or perfect, but sufficient for the immediate goals.”
Heuristics describe practical actions or attitudes we take in order to make design progress. Billy gives several examples of general engineering heuristics in his book:
Reading these heuristics you might think, “Ah, heuristics are merely simple statements of what to do.”
Although heuristics can be boiled down into pithy advice, e.g. “Do this…” or “Don’t do that…,” I find that there usually is a lot more behind any simple phrase. Ask any design expert about how to tackle a specific design problem and she’ll add caveats and constraints and assumptions. Her heuristics might sound more like, “Do this when…and… unless … and here’s how I might …”. Or, “Try this first…and then…until…”.
Which leads me to observe that written design patterns–specifically software design and architecture patterns–are a handy form for sharing meaty, complex, nuanced design heuristics with others.
Consider this summary of the pattern, Do a Mock Installation, from Object-Oriented Re-engineering Patterns that illustrates some of that extra useful stuff that can be explained by a pattern.
- Pattern: Do a Mock Installation
- Intent: Check whether you have the necessary artifacts available by installing the system and recompiling the code.
- Problem: How can you be sure that you will be able to (re)build the system?
- The system is new to you, so you do not know which files you need.
- The system may depend on libraries, frameworks, and patches, and you’re uncertain you have the right versions available.
- The system is large and complex, and the exact configuration under which the system is supposed to run is unclear.
- Maintainers may answer these questions, or you may find answers in documentation, but you still must verify whether this information is complete.
- Solving this is feasible because:
- You have access to the source code and the necessary build tools
- You have the ability to reinstall the system in an environment that is similar to that of the running system
- Maybe the system includes some kind of self-test
- Solution: Try to install and build the system in a clean environment taking a limited amount of time (at most one day).
- After the build prepare a report:
- Version number of libraries, frameworks and patches used
- Dependencies between the infrastructure
- Problems you encountered and how you tried to solve them
- Suggestions for improvement
- Assessment of the situation including possible solutions/workarounds (if failed)
- It is an essential prerequisite
- Demands precision
- Increases your credibility
- Tedious activity
- No certainty
- Difficulties: Easy to get carried away.
When written well, patterns include just the right amount of extra advice. Advice that a competent designer has gained through experience and reflections. Patterns can even warn us about potential roadblocks or advise us on what to try next if the pattern’s solution isn’t a good fit for our specific problem.
But in addition to those larger-grained design problems typical of patterns, there are many smaller design decisions and gnarly design details we have to deal with. And as experienced designers, we too, have heuristics for addressing them rattling around in our brains. Wouldn’t it be great if we could find easy ways (easier than writing patterns) to record and share our heuristics with each other?
Here’s a photo of some heuristic snippets captured in a one-day workshop I held at DDD Europe:
I’ve been experimenting with simple ways to record, share, and communicate design heuristics that require far less effort to create than full-fledged patterns yet convey more than can be shared on a sticky note. Somewhere between full-fledged written patterns and pithy phrases is a sweet spot I’m striving for. That’s topic of my next post.