Pragmatic Thinking and Learning

Home > Other > Pragmatic Thinking and Learning > Page 12
Pragmatic Thinking and Learning Page 12

by The Pragmatic Programmers


  abstract. You are more likely to discover new abstract patterns,

  which is what all of us programmers are trying to achieve.

  This phenomenon of increased abstract awareness was demon-

  strated in a study7 of secondary-school students who were given

  the following problem: five meshing gears are arranged in a hori-

  zontal line much like a row of quarters on a table. If you turn the

  gear on the far left clockwise, what will the gear on the far right do?

  Some students were selected to work alone, others in pairs, as the

  researchers steadily increased the number of gears. By 131 gears,

  it was easy to see who had discovered the abstract pattern (in

  this case, the well-known computer-science parity rule) and who

  7.

  The Emergence of Abstract Representations in Dyad Problem Solving [Sch95].

  Thanks to June Kim for this pointer and summary.

  Report erratum

  Prepared exclusively for Jose Luis Loya

  gggggggggggggggg

  this copy is (P2.0 printing, January 2009)

  ENGAGE AN R-MODE TO L-MODE FLOW

  98

  hadn’t. Only 14 percent of the solo workers discovered the rule,

  but a whopping 58 percent of the pairs did.

  In another experiment, one pair of students came up with an

  abstract matrix representation based on a very concrete problem

  statement. The researchers reported the following:

  ...The experimenter asked the members how they came up with the

  matrix. One member stated, ‘He wanted to make columns and I

  wanted to make rows.’ To negotiate their two perspectives on the

  problem, they managed to come up with the matrix formalism that

  included both columns and rows.

  Schwartz, et al.

  Working together is a provably effective way to discover helpful and

  interesting abstractions.

  Meeting in Metaphor

  As we’ve seen, L-mode and R-mode processing are radically dif-

  ferent, and yet there may be a common meeting ground between

  them in your own mind, a place where creativity gives birth to new

  ideas.L-mode and R-mode meet in metaphor—in the act of creating

  analogies.

  “Metaphor, a common ground for both verbalizations and images,

  is a way to voyage back and forth between the subconscious and

  conscious, between right and left hemispheres.”8

  The use of metaphor is a powerful technique to open up creativity.

  TIP 14

  Use metaphor as the meeting place betweenand.

  Now, when you hear metaphor and analogy, you might have a

  flashback to some horrid English class in grade school. But in fact,

  we use metaphors all the time. What we call windows on the com-

  puter screen aren’t really windows at all. The mouse isn’t actually a

  rodent. A folder on your hard disk isn’t a real folder, and the trash

  can isn’t a real can.

  8.

  See Conscious/Subconscious Interaction in a Creative Act [GP81].

  Report erratum

  Prepared exclusively for Jose Luis Loya

  gggggggggggggggg

  this copy is (P2.0 printing, January 2009)

  ENGAGE AN R-MODE TO L-MODE FLOW

  99

  When you write a concurrent program using threads, you’re not

  sewing. It’s just a metaphor. Don’t even get me started on zom-

  bie processes in Unix or the typographic flotsam of widows and

  orphans.

  We use metaphors constantly; in fact, cognitive linguist George

  Lakoff (Women, Fire, and Dangerous Things: What Categories Reveal

  About the Mind [Lak87]) maintains that we can’t even think at

  all without the use of metaphor. Most humans aren’t particularly

  good at dealing with the abstract; using a metaphor to relate some

  abstract notion to something concrete, something found in every-

  day life, makes it much easier for people to grasp.

  But metaphors have differing potency. Common, everyday ones

  seem to be more like the symbolic representation of L-mode.

  Grander metaphors, on the other hand, are much more power-

  ful. They can change our thinking and generate their own answers.

  What makes the difference?

  Juxtaposing Frames of Reference

  Metaphor comes from the Greek meaning “to transfer,” with the

  idea that you are transferring the properties of one object to

  another in a way that is not literally possible.

  This notion of combining two different, incompatible ideas is the

  very definition of creativity according to researcher/philosopher

  Arthur Koestler.9 In his model, some particular topic area forms

  a particular frame of reference. The sudden switch from one self-

  consistent frame of reference to a different, unexpected, incom-

  patible frame of reference is the basis of a strong metaphor. That

  junction of the two different frames is called a bisociation.

  The more unlikely the association—the further apart the frames of

  reference—the greater the creative achievement when bisociated.

  This idea is the basis of Edward de Bono’s Po technique.10 Po is

  an invented word that tries to go beyond the binary notion of “yes”

  9.

  See his article “Bisociation in Creation” included in The Creativity Question

  [RH76]. Thanks to Steph Thompson for this information. Koestler had some other unsettling beliefs and was accused of violent crimes against women. Genius and madness are often close companions it seems.

  10. See PO: A Device for Successful Thinking [DB72] for more.

  Report erratum

  Prepared exclusively for Jose Luis Loya

  gggggggggggggggg

  this copy is (P2.0 printing, January 2009)

  ENGAGE AN R-MODE TO L-MODE FLOW

  100

  and “no.” Several techniques involve Po; for now, you might think

  of it as a super-powerful version of suppose.

  One of the Po techniques is random juxta-

  Use random

  position. You take a word from your sub-

  juxtaposition to create

  ject area and combine it with a completely

  metaphor.

  random, unrelated word. For instance,

  consider the words cigarette and traffic

  light. The challenge is to form a bisociation from these completely

  unrelated ideas. For example, cigarette and traffic light might meld

  into the concept of using a red band on the cigarette as a stop-

  smoking aid.

  The further away the ideas are, the harder it is to join them in a

  metaphor that works. When we come across a particularly inven-

  tive metaphor, one where the frames of reference are suitably dis-

  tant, we praise the author for centuries:

  But soft! What light through yonder window breaks? It is the East,

  and Juliet is the sun!

  Love is a smoke made with the fume of sighs.

  Adversity’s sweet milk, philosophy.

  William Shakespeare

  What is that bright light in the window? It’s not a celestial object;

  it’s this girl Romeo just met at a masquerade ball.11 Love is an

  emotion; it has nothing to do with smoke, fumes, or sighs in a

  literal sense, but what a fantastic image that conjures up. You can

  almost see the wisps of smoke from a young lover’s obsessive desire
r />   building into a cloudy, potent fog.

  The characteristics of the “smoky” frame of reference joins with the

  frame of reference for emotion (love); it begins to impart many of

  its known (but unstated) features onto the emotional frame. That

  sort of imprinting from one frame of reference to another is very

  powerful and something we can use to our advantage.

  There’s metaphor, and then there’s metaphor.

  11. Modern greeting cards have probably inured us to this sort of comparison; it likely had far greater impact in Shakespeare’s day.

  Report erratum

  Prepared exclusively for Jose Luis Loya

  gggggggggggggggg

  this copy is (P2.0 printing, January 2009)

  ENGAGE AN R-MODE TO L-MODE FLOW

  101

  System Metaphor

  The original published version of Extreme Programming (described

  in Extreme Programming Explained: Embrace Change [Bec00]) fea-

  tured a fascinating practice: system metaphor. The idea is that

  any software system should be able to be guided by an appropri-

  ate metaphor. For instance, a payroll system might be considered

  analogous to a post office, with discrete mailboxes, delivery sched-

  ules, and so on. Or maybe a scientific measuring system could be

  thought of as a manufacturing system with conveyor belts, storage

  buckets, and so on.

  All metaphors break down eventually, but the idea was that a suf-

  ficiently rich metaphor could help guide the design of a system and

  help answer questions that come up during development (this idea

  is somewhat similar to our discussion of system invariants in The

  Pragmatic Programmer: From Journeyman to Master [HT00]).

  The features of the metaphorical frame of reference can imprint

  themselves onto the software system; implicit, well-understood

  properties of the real world start to transfer into the software itself.

  But coming up with good metaphors—ones that help answer ques-

  tions instead of causing more—can be hard. System metaphor, as

  a practice, is not as widely accepted as, say, test-first development

  or pair programming.

  I was talking to Kent Beck, the father of XP, about metaphors in

  general, and he said this:

  “Metaphorical thinking is fundamental in programming, as it is

  in all abstract thought. When we aren’t aware of our metaphors,

  we can lead ourselves astray. Mixing metaphors negates much of

  their power. Why do we override a method in a subclass? Clear metaphors make it easier to learn, reason about, and extend code.”

  Clear metaphors are a powerful tool, but we don’t always get it

  right. Kent goes on: “Why is it that we mess up metaphors? Why is

  the converse of add( ) not always delete( )? Why do we insert( ) some-

  thing into a container instead of add( ) it? Programmers are sloppy

  in their use of metaphors—tables that aren’t at all like tables,

  threads that aren’t like threads, memory cells that aren’t like mem-

  ory or cells.”

  Report erratum

  Prepared exclusively for Jose Luis Loya

  gggggggggggggggg

  this copy is (P2.0 printing, January 2009)

  ENGAGE AN R-MODE TO L-MODE FLOW

  102

  We use metaphors so much that we’re not even aware of many of

  them (as with windows, mice, and so on). It’s really easy to latch

  onto the first metaphor that presents itself without thinking too

  much about it. However, that’s probably not the best metaphor

  you could use.

  Coming up with a really good metaphor

  Generative metaphors

  that has generative properties suitable for

  are hard.

  your context is much harder. There is

  no “metaphor compiler” that can tell you

  whether it’s right or not; you have to actually try it in practice. Use

  the metaphor to guide your design, and be aware of how it helps—

  or not. You won’t know immediately; the outcome will be uncertain.

  And as we saw in Section 4.3, Engage an R-mode to L-mode Flow,

  on page 92, you need to be OK with uncertainty. Don’t force the

  issue; just be aware of it.

  After some experience, you might suddenly realize that the

  metaphor you started out with was wrong, but this other idea really

  fits more closely (and that’s of course fine; it will just take some

  code refactoring).

  If you’re not used to deliberately creating metaphors, you might

  find the practice of a system-level metaphor difficult.12 But there is

  a way you can improve your ability to create metaphor and analogy,

  funnily enough.

  So, This Duck Walks into a Bar...

  Humor is neither a waste of time nor a harmless diversion; instead,

  it reflects an important ability necessary for thinking, learning, and

  creativity. It’s all about connections.

  Humor arises from making novel connections across disparate

  ideas. It may be absurd, but humor is often based on identifying

  relationships and distorting them. For instance, “My best friend ran

  away with my wife. I’m sure going to miss him.” You assume the

  primary relationship is between the man and his wife, but instead

  it turns out that his relationship with his best friend is more impor-

  tant to him; the skewed connection makes it funny.

  12. Personally, I suspect that’s the driving reason why it hasn’t been adopted as widely.

  Report erratum

  Prepared exclusively for Jose Luis Loya

  gggggggggggggggg

  this copy is (P2.0 printing, January 2009)

  ENGAGE AN R-MODE TO L-MODE FLOW

  103

  Or the all-time classic line from Henny

  Youngman: “Take my wife. Please.” You Take my wife.

  initially think that “take my wife” is merely

  an idiom that means “Consider my wife’s behavior, for example,”

  only to realize it is a plaintive request instead. That sudden lin-

  guistic U-turn is the source of humor. The creativity comes from

  realizing that “take my wife” can have multiple meanings and from

  exploiting the potential for misunderstanding.

  Comedian Steven Wright was famous for drawing interesting par-

  allels, as with his friend the radio announcer who would disappear

  when driving under a bridge. That is, Wright drew the analogy that

  just as a radio signal can sometimes fade out under a bridge, so

  might the radio announcer himself. He also describes accidentally

  using his car keys on his apartment door and taking the building

  for a spin around the block.

  Instead of drawing an analogy, you might also extend an existing

  idea past what’s reasonable. For example, if an airplane’s black box

  can survive a crash, then why can’t they make the whole plane out

  of the stuff?

  In either case, the talent for humor comes from drawing or extend-

  ing relationships beyond the norm, truly seeing “out of the box.”

  A quick wit—being able to draw connections between things that

  aren’t related or to extend an idea past its breaking point—is a skill

  well worth practicing, honing, and encouraging in your team.

  TIP 15

  Cultivate humor
to build stronger metaphors.

  Have you seen my fishbowl? The implicit, habitual frame of refer-

  ence would lead you to think I’m looking for the glass bowl in which

  my fish resides. But if the answer is, “Yes, he just got a strike!” then

  we’re in a completely different, cartoon frame of reference where

  bowl was actually a verb.

  By practicing making these far-flung connections, you’ll become

  better at doing so. In fact, you’ll actually begin to change the very

  fabric of your brain to accommodate this new activity.

  Report erratum

  Prepared exclusively for Jose Luis Loya

  gggggggggggggggg

  this copy is (P2.0 printing, January 2009)

  HARVEST R-MODE CUES

  104

  Next Actions

  ! Make more metaphors. You can do this as part of software

  design or something more artistic—your own jokes, fables, or

  songs.

  ! If you’re new to creating metaphors, start with something sim-

  ple: a thesaurus (you know, that thick book that’s sold next

  to the dictionaries in the bookstore or that “other” window in

  your online dictionary program).

  ! For more in-depth exploration, try playing with WordNet

  (available for all platforms from http://wordnet.princeton.edu).

  This gives you not only synonyms but also antonyms, hyper-

  nyms, hyponyms, and other derivations of various flavors.

  4.4 Harvest R-mode Cues

  Despite years of being ignored, your R-mode remains hard at work,

  toiling away in the background to match up disparate facts, make

  far-flung associations, and retrieve long-lost bits of important data

  from the morass of otherwise uninteresting memories.

  In fact, it’s entirely possible that your R-mode already has exactly

  the answer to the most important problem that you’re working on

  right now.

  But how can you get at it? We’ll spend the rest of this chapter

  looking at techniques to help invite, coax, ferment, and jiggle great

  ideas out of your head.

  You Already Know

  You may already have that great idea or know the solution to that

  impossibly vexing problem.

  Your brain stores every input it receives.

  Every input gets stored.

  However, even though stored, it does not

  necessarily index the memory (or if you

  prefer a more die-hard computer analogy, “store a pointer to it”).

  Just as you can arrive at work with no memory of how you got

 

‹ Prev