Conversations with Dale

about leading software development

Loopy Conversations: What Versus How, Means Versus Ends, Requirements Versus Design Choices

| Comments

Loopy conversations.  Over the years I’ve seen people and teams go round and round in loopy conversations trying to determine whether some goal is a what or a how, a how or a why, a means or an end.  The reason such conversations spin is that end and means (etc.) are not attributes inherent in any particular goal.  Instead, they express relationships among goals.  In order to sort out means and ends, you have to consider the relationships among goals.

Example.  Suppose I want to buy a plane ticket to Toronto.  Is this goal a means or an end?  There’s nothing about buying a ticket per se that makes it one or the other.  But suppose I want to buy a ticket so that I can attend the Agile 2008 conference in Toronto.  Buying the ticket is a means to the end of attending the conference.

So attending the conference is itself an end, right?  Well, not quite.  At least, not in and of itself.  I want to attend the conference in order to confer with Agile colleagues.  Attending the conference is itself a means to the further end of conferring with Agile colleagues.

Now, hold on.  Just two paragraphs ago I said that attending the conference was “the end.”  Now I’m saying that it’s a means.  What’s going on?

Chain of goals.  One thing that’s going on is that, like any goal, my goal of attending the conference exists in a chain of goals, each instrumental to achieving some deeper goal.  I want each thing in order to achieve some more important thing, some deeper goal.  I want to buy a plane ticket in order to attend the conference.  I want to attend the conference in order to confer with colleagues.  The chain (or this part of the chain, at least) looks like this:

buy plane ticket -> attend conference -> confer with colleagues

So… is conferring with colleagues the end?  Again: not in and of itself.  I want to confer with colleagues in order to (among other things) build relationships with them.  That is, conferring with colleagues is a means to the end of building relationships.  Now the chain is:

buy plane ticket -> attend conference -> confer with colleagues -> build relationships

We could keep going.  I want to build relationships in order to …  And so on.  I leave it as an exercise to the reader to discover whether the chain ends and (if so) where.

We can also extend the chain in the other direction.  In order to buy a plane ticket, I will have to (say) call United on the phone.  And in order to call them, I’ll have to look up their phone number.  And in order to look up their phone number, I’ll have to …  (Another exercise for the reader.)

Relationships among goals.  Okay, so our goals form a chain.  Each goal in the chain is a means with respect to the goals later in the chain and an end with respect to the goals earlier in the chain.  Similar for how versus what, or how versus why.  With respect to conferring with colleagues, attending the conference is a means, a how.  With respect to buying the plane ticket, attending the conference is a what, a why, an end.  Means and end thus express relationships among goals.

Distinguishing means and ends.  Okay, so how does this help untangle a tangled conversation?  In any moment, in any conversation (loopy or otherwise), what makes a given goal a means or an end?

The answer:  Your attention.  No kidding.  The only thing that makes a goal an end is that you’ve decided, however momentarily, to focus on that goal in particular, to hold that goal in your mind as the goal.  That’s it.  If you choose to focus on the goal of attending the conference, your focus (temporarily) makes attending the conference the end, and each goals earlier in the chain a means to that end.  Whichever goal you hold in your mind as the one to focus on, that goal becomes (temporarily) the end, and all the earlier goals become means to that end.

Unwinding the conversation.  If you find yourself stuck in a conversation about means and ends, pause the conversation long enough to draw the chain of goals on a flip chart or whiteboard.  Or scratch it into the wall with a nail.  Show that the chain can extend in either direction.  Then with that picture visible to everyone, get back to whatever you were doing before you got wrapped around that axle.

A further complication: Design versus requirements.  A further complication comes into play when people argue about whether a given choice is a design choice or a requirement.  The distinction is not in the choice itself, but in your choice of which system you are discussing at the moment.  Every requirement for a given system is itself a design choice for some larger system.  Every design choice for a given system creates requirements for one or more subsystems.

Whether a give choice is a design choice or a requirement is not an inherent quality of the choice itself.  The distinction between design and requirement depends entirely on your point of view, in particular on your choice of which system you are talking about.

So if you’re in a loopy conversation about whether some choice is a requirement or a design choice, stop the looping and take some time to identify as well as you can which specific system you are talking about.  That sometimes helps.

Introducing Gibberizer: Automated Gibberish

| Comments

I’ve created a mostly goofy software tool called Gibberizer.  You enter some text into Gibberizer, and it produces gibberish that is somewhat similar to your text.

Mostly the thing is just goofy fun. I’ve spent several hours gibberizing The Gettysburg Address into nearly-meaningful nonsense that sounds like Honest Abe on smack.  If that ain’t fun, I don’t know what is!

But there’s a potentially useful application for Gibberizer.  Fantasy and Science Fiction writers working in invented worlds and cultures can use it to invent names for people, places, and things.  Given a list of names from a culture, Gibberizer will invent other names that seem, more or less, to come from the same culture.

For example, I entered a list of 50 names from Lord of the Rings into Gibberizer, and it created these 25 “similar” names: Fimbreth Nimrodo Maggins Galad Peregolas Fladriel Nimroden Theodel Bregrin Elladriel Elladrif Fladan Elberegalad Pereth Halbaramir Boromiel Farad Beregalad Baggot Froden Beregrin Bregolas Bregond Brandalf Bereth.  Most of those names fit the Lord of the Rings culture.

I’m making Gibberizer available for free for any use whatsoever.

You can download Gibberizer at The Gibberizer Project Page.

System Requirements:  I’ve used Gibberizer only on my Windows computer.  As far as I know, this will also work on any Mac or Linux computer, as the computer has a Java Runtime Environment (JRE) 5.0 or later.  My understanding is that OS X comes with JRE 5.0 pre-installed.  If your computer doesn’t already have a JRE installed, you can get the latest JRE from Sun Microsystems.  If you try Gibberizer on Linux or a Mac, let me know how it goes. To run Gibberizer, just download the file and double-click it.

The sketchy documentation includes:

Key Bindings in Eclipse/RCP Applications

| Comments

THE CONTEXT

I very recently started to write my first application based on the eclipse Rich Client Platform.  RCP is a wicked neato platform that automagically implements all kinds of UI features that you would otherwise have to either program manually or leave out of your app.  RCP FTW!

My app is dalewriter, a tool to help me write and organize stories, articles, and books.  (I’m a geek, which means that instead of writing stories, articles, and books, I spend my time creating tools to help me write stories articles and books.)  dalewriter will allow me to edit text, store it a tree form (chunks of text in a tree of folders), shuffle and reorder the bits, and build a manuscript from the tree or a subtree.

Six days ago I didn’t know nothin’ ‘bout no RCP, so I’ve been using  McAffer and Lemieux’s RCP book, following along with their running example and adjusting what I learned to fit my app instead of theirs.

Development was going swimmingly until I tried to establish my first key binding–the connection that makes a given keystroke cause a given action.  I wanted CTRL-N to create a new text item in the currently selected folder and open it for editing.  I’d already written and tested the action itself, and now I wanted to connect CTRL-N to the action.

THE PROBLEM

I followed the example in the book, and it didn’t work right.  I wish I could tell you the exact failure, but I wasn’t expecting that I would (have to) learn so danged much that I’d want to write about it.  I spent a great deal of the next few days (and long, long nights) tracking down everything I could find on the Interwebs about key bindings.

Part of the problem is that eclipse’s key-binding mechanism has changed over the past few releases, and much of the information I found referred to old-style bindings.  I tried each idea I found.  Each one led to “hey, dood, cut that out, that’s deprecated” warnings.  (I’m paraphrasing slightly.)

And not only that, they didn’t work.  I observed three general “not what I wanted it to do” responses from my app when I typed CTRL-N:

  • Ding at me (the standard Windows warning ding) without creating a new item.  I came to interpret this as a sign that CTRL-N was not bound to any action.
  • Open the “Select a wizard” dialog, a standard eclipse dialog that allows the user to select among a list of things to create.  This appears to be the default eclipse action for CTRL-N.
  • Open a little yellow table in the bottom right corner of the window, asking me to select which action I wanted to take.  The choices were labeled “New” and “New Item”.  The “New” choice invoked the “Select a wizard dialog”.  The “New Item” choice was the one I had created.  Hey!  That’s progress!  It still wasn’t right–I wanted CTRL-N to directly invoke my action instead of first asking the user (i.e. me) to choose, but still, that was progress.

Finally, I somehow pieced together disparate examples and descriptions of bindings and related mechanisms, and found a solution.

Given how many other people have stumbled over eclipse/RCP key-binding quirks, I thought I’d describe the solution I found, my understanding of why this solution works, and ideas for what to do if you’re having trouble.  You’re welcome.

THE SOLUTION

Before I describe what worked, A CAVEAT:  I still don’t know hardly nothin’ ‘bout no RCP.  As I said, I’ve been working with RCP for less than six days, so take everything I say here with a bag of salt.  I’ve done my best to explain my understanding of how and why this works, but I’m no authority.  Yet.

The key ingredients of the whole enchilada are:

  1. An action to invoke.
  2. A command that invokes the action.
  3. A key binding that invokes the command (that invokes the action).
  4. A plug-in configuration file that enables your key bindings.

Action.  First, create an action that the keystroke will invoke.  I’ll assume that you know how to create an Action in RCP.  If you need help with this, see the RCP book.

The secret sauce here is that you have to make the action available for invocation by commands.  To do that:

  1. Make up a unique identifier string that will represent the command.  I chose com.dhemery.dalewriter.command.AddItem.
  2. In the constructor of your action, call the setActionDefinitionId() method, passing it the identifier you created.  When the command is invoked, RCP will look for a registered action that has this action definition ID, and invoke it.
  3. In ApplicationActionBarAdvisor.makeActions(), register your action in the usual way (see the RCP book).

Command.  There is no way to connect a key binding directly to an action.  Apparently there used to be, but the old mechanism either gone or deprecated.  To connect a key binding to an action, you create an intermediary called a command.  You do this not with Java code, but by declaring a command extension:

  1. Add the org.eclipse.ui.commands extension point to your plugin.xml file (on the Extensions tab of your plugin.xml file).
  2. Add a new command:  Right click on the commands extension point and select New > command.
    • In the id* field of the new command, enter the command identifier that you used to register your action (e.g. com.dhemery.dalewriter.command.AddItem).  This connects the command to the action.  When the command is invoked–such as in response to a user keystroke–RCP will invoke the action that you have registered with this ID.  The id* that you enter into this field must be identical to the one with which you registered the action.
    • Use whatever name* and description you like.  Those fields don’t affect key bindings.

Key Binding.  Next, you need a key binding and a key binding scheme.  The key binding connects a specified keystroke to your command.  A key binding scheme is a named bundle of key bindings that can be enabled all at once.

  1. Add the org.eclipse.ui.bindings extension point to your plugin.xml file.
  2. Create a key binding scheme:  Right click on the bindings extension point and select New > scheme.
    • Give your scheme a unique identifier in the id* field.  I used com.dhemery.dalewriter.bindings.
    • Use whatever name* and description you like.  These fields don’t affect key bindings.
    • You can leave the parentId field blank.  Or if you want to make a ten-pound bag of default actions available to your app, see the “Bonus: Default Bindings and Actions” section below.
  3. Create a key binding:  Right click on the bindings extension point and select New > key.
    • In the sequence* field, enter the key (or key chord) that will invoke your action (e.g. M1+N or CTRL-N).
    • In the schemeId* field, enter the identifier you assigned to your new binding scheme.  This tells RCP to active this binding whenever the scheme is active.
    • In the commandId field, enter the command identifier that you made up way back in step one.  This is the command id that you assigned to the command extension, and that you used to register the action.  For me, the commandid was com.dhemery.dalewriter.command.AddItem.
    • For the love of all that is good and holy, don’t mess with contextId, platform, or locale.  If you’re indifferent to all that is good and holy, make up your own reason not to mess with those fields.

Plug-In Configuration File.  To activate your binding scheme (and thus all of its bindings), you use a property in a plug-in configuration file:

  1. Create a new plug-in configuration file in your project.  This is just a plain text file.  I added mine directly under the project and called it plugin_customization.ini (which seems to be the standard name).
  2. Add a KEY_CONFIGURATION_ID property in the file to tell RCP to activate your binding scheme whenever your plug-in is active.  To do that, add a line like this:
    • org.eclipse.ui/KEY_CONFIGURATION_ID=com.dhemery.dalewriter.bindings
  3. Add a preferenceCustomization property to your product extension.  This tells RCP to load your configuration file and apply its preferences when it activates your plug-in.
    • Find your product extension under the org.eclipse.core.runtime.products extension point in the plugin.xml file.  If your application doesn’t yet have a product extension, see the RCP book for instructions on how to create one.
    • Right click your product extension and select New > property.
    • In the name* field, enter preferenceCustomization.  When RCP starts up your application, it will look up this property to identify the plug-in configuration file to apply.
    • In the value* field, enter the name (and path, if appropriate) of your plug-in configuration file.

Yep, it’s as simple as that.  (Yep, that was irony–a subtle form of we Mainers call hyoomah.)

If you know what you’re doing, you can define the command, the binding scheme, the key binding, and the customization property directly in raw XML in the plugin.xml file.  If you don’t know what you’re doing, your plugin.xml file will become contumaciously hosed (hosed being a technical term that means (roughly):  hosed).  I will leave it to the reader to infer how I know this.

Before I move on to troubleshooting, here’s one more bit of useful information.

Bonus:  Default Bindings and Actions.  eclipse/RCP includes a default key binding scheme the defines key bindings for a passel of groovy built-in actions (e.g. CTRL-S to save).  Now, it turns out that the default scheme is the bastard that eructs that annoying “Select a wizard” dialog when I press CTRL-N in dalewriter.  Mumble grumble.

But wait, here’s the wickedest awesomest part:  There’s a way for your key binding scheme to inherit all of the cool defaults, use the ones you want, override the ones you want to override, and defenestrate the ones you don’t want.  Here’s the straight dope:

  • To make the default bindings and actions available in your own binding scheme, make the default scheme the parent of yours: In the parentId field of your scheme, enter org.eclipse.ui.defaultAcceleratorConfiguration.
  • If you want a keystroke to trigger an action of your own rather than the default action, simply add a key binding of your own into your scheme.  Yeah, okay, so that’s not so simple:  You still have to do all of the crap in the previous sections.  But still.
  • If you want to disconnect a default binding from your app without overriding it, simply add a binding to your scheme, enter the appropriate key chord in the sequence* field, and leave the commandId field empty.  See?  This time when I said simply, I really meant simply.  Leaving the commandId field blank tells RCP “when the user presses these keys, do nothing.”

TROUBLESHOOTING RCP KEY BINDING PROBLEMS

Here are the primary failures I’ve observed, and possible solutions.

The ”Dreaded Ding” Problem:  Your app emits a warning ding instead of executing your action.  This is a sign that your app has no active key binding for that keystroke.  In order for a keystroke to find the right action, there’s a long chain of links that must be established correctly.

Solution.  Here are some things to check:

  • Did you make up a command ID that is absolutely unique within your app?  I don’t know what happens if there are duplicate command IDs.  I suspect it would destroy Western civilization.
  • Did you call setActionDefinitionId() in your action’s constructor?  If not, your action is not available to be invoked by commands.
  • Did you pass the correct command ID to setActionDefinitionId()?  The string that you pass must be identical to the string you entered into your command extension’s id* field.  If you passed an incorrect string, RCP won’t find your action (and therefore won’t execute it) when the command fires.
  • Did you register your action by calling register(action) within ApplicationActionBarAdvisor.makeActions()?  If you omit this call, your action won’t be registered with RCP, so RCP won’t be able to find and execute your action when the command fires.
  • Did you define a command extension?  If you omit this, RCP will not know to associate your key binding with your action.
  • Did you assign your command the correct id*?  If the id* is incorrect, RCP will not find your action when the command fires.
  • Did you define a binding scheme for your key bindings?  If you omit binding scheme, RCP will not know to activate your binding.
  • Did you assign the binding scheme a unique id*?  I don’t know what happens if there are duplicate binding scheme IDs.  Again, Western civilization hangs in the balance, and even Obama won’t be able to fix this.
  • Did you define a key binding?  If you omit the key binding, RCP won’t know what to do when the user types the keystroke.  (Could I say “when the user strokes the keys,” or would that just be weird?)
  • Did you specify the correct key sequence* in the key binding?  If the sequence* is incorrect, your action may fire when the user strokes some other keys.  (Hmmm.  Yes, I guess that does sound weird.)
  • Did you assign your key binding to your binding scheme?  If you assign the key binding to an incorrect binding schemes, then even if your binding scheme is active, your key binding will not be.
  • Did you create a plug-in customization file?  If you omit the customization file, RCP will not know that you have a binding scheme (or other preferences) for it to load when it loads your plug-in.
  • Did you include your plug-in customization file in the build?  If not, RCP won’t find your customizations when it looks for them.
  • Did you add a preferenceCustomization property to your product?  If you omit this property, RCP will not know about your preferences file, and so will not load your preferences.
  • Did you assign the preferenceCustomization the right value*?  This value* be the name your plug-in customization file, along with the file path if you put the file somewhere other than directly the project.  If you assign an incorrect value*, RCP will load (or attempt to load) the wrong set of preferences when it loads your plug-in.
  • Did you add the org.eclipse.ui/KEY_CONFIGURATION_ID property to your plug-in customization file?  If you omit this property, then won’t know that you want it to activate your binding scheme.
  • Did you assign the KEY_CONFIGURATION_ID property the right value?  This must be the unique identifier for your binding scheme.  If value of this property is incorrect, RCP will activate (or try to active) a binding scheme other than the one you intend.

The ”Multiple Choice” Problem:  Your app displays a little yellow table (like the picture below) that displays a number of actions that you can choose to execute.  This is a sign that the active binding scheme has two or more bindings for the same keystroke.  I stumbled over this when (in my willingness to try anything) I assigned my key binding to eclipse/RCP’s default binding scheme (org.eclipse.ui.defaultAcceleratorConfiguration).  This made all of the cool default bindings available to my app, but it created a conflict between my CTRL-N binding and the “Select a wizard” CTRL-N binding already in the default scheme. When you execute a keystroke for which the active scheme has two bindings, eclipse/RCP requires the user to take the extra step of choosing between the several possible actions:.

Example of an eclipse/RCP key binding conflict

Solution.  Assign your key binding to your own binding scheme, and not to the default one.  If you also want your app to inherit all of the other key bindings from the default scheme, follow the instructions in the “Bonus:  Default Bindings and Actions” section above.

The “Wrong Action” Problem:  Your app executes some other action (e.g. the default “Select a wizard” dialog) instead of your action.  This primary trouble here is the same as in The “Dreaded Ding” Problem:  Your key binding is not active.  The difference here is that some other scheme has activated a key binding for the relevant keystroke.  Your key binding is not active, but some other key binding is active.

Solution.  First activate your key binding by working through the checklist for The “Dreaded Ding” Problem.  If this causes you to lose all of the useful actions from the default scheme, make sure to declare the default scheme as a parent of your scheme, as described in the “Bonus:  Default Bindings and Actions” section above.

EXPLORING ON YOUR OWN

If none of my ideas solve the problem for you, well, that’s all the ideas I have right now, so you’ll have to gather more information either from your program or from the innertoobs.

To help you explore your program, I’ll toss you one last cookie.  Here’s a programmatic way to print the active binding scheme and a list of all active key bindings:

IWorkbench workbench = PlatformUI.getWorkbench();
IBindingService bindingService = (IBindingService)workbench.getAdapter(IBindingService.class);
System.out.println(bindingService.getActiveScheme());
for(Binding binding : bindingService.getBindings()) {
    System.out.println(binding);
}

Developing Story Ideas by Clustering

| Comments

In early April eleven of my local writer friends and I held a weekend writer’s retreat at a dome house in the Sierra Nevada foothills.

One of my goals for the retreat was to practice developing ideas into story ideas, and then into stories.  And I had a technique in mind that I wanted to practice: clustering.

I’d learned about clustering years ago from a writing teacher in New Hampshire, who had learned it from Gabriele Rico’s book Writing the Natural Way.  Dustin Wax describes the technique nicely on his blog, and you can see a Flash animation of clustering in action at the top of Rico’s web site.

I’d used clustering dozens of times for my non-fiction writing (and also for general problem-solving), so I knew it was a great technique for tapping the creative, associative workings of your mind.  But I hadn’t yet used clustering to develop story ideas for fiction, and this was a great opportunity.

So that’s how I would develop ideas into story ideas.  Where would I find the raw, undeveloped ideas to cluster about?  From my brand new copy of The Writer’s Book of Matches, a small book filled with hundreds of intriguing writing prompts.

So I had plan:

  1. Pick a random prompt from The Writer’s Book of Matches.
  2. Cluster around the core idea of the prompt until a story idea hit me.
  3. Write down the story idea.
  4. Write the story.

Then I went to work.

My first prompt was:

“He’s probably just as disappointed in me as I am in him.”

The core of this idea is mutual disappointment.  But who are the people involved, and what are they disappointed about?  This is a great job for clustering.  I grabbed my pen and an 8”x5” index card and drew this cluster (rendered here using MindJet’s MindManager software):

Cluster for “Dinner at Gourlay’s” (click for full size) As I dumped associations onto the card, I quickly found a story idea (in the branches I’ve bolded on the map):

A father has long expressed disappointment in his son’s sexual promiscuity.  Then the son catches the father having an affair.
This story idea had some real juice for me, especially if I wrote it from the son’s point of view.  I didn’t want to cluster any more, I wanted to write.  I dashed off a 1,000-word first draft of a story called “Dinner at Gourlay’s”. The next prompt that I pulled out of The Writer’s Book of Matches was:
“It’s supposed to be a game, but he treats it like life and death.”
The key words seemed to be life, death, and game, so I put those words in the center of an index card and created this cluster:

Cluster for “Double or Nothing” (click for full size)

This time the story didn’t jump out at me instantly.  It took a whole five minutes to find an idea that interested me.  The “bet too much” bubble caught my attention because it connected game with death.  Digging yourself too deeply into debt with your bookie (so the stereotype goes) can put you at serious bodily risk.  So imagine a guy deeply in debt and being threatened by his bookie.  What might the guy do?  Maybe he’d kill the bookie, or try to.  Then I thought of a twist:  What if the guy bets a second bookie that he can kill the one to whom he’s in debt?  After a few more twists, I had enough of an idea to start writing:

Norm is deeply in debt to his bookie Paulo.  He tries to hire Emile, a competing bookie, to kill Paulo.  But Emile doesn’t like the idea.  Instead, he offers a deal:  If Norm can kill the Paulo in a week, Emile will pay off the debt.  If Norm can’t kill Paulo in a week, Emile will still pay off the debt, but then Norm will owe Emile twice the amount he owed Paulo.  Double or nothing.

That prompt led to this story idea?  Cool!

I wrote the first scene, which I quite like.  But at the moment I don’t know where the story goes next.  I like the idea that the Emile tips off Paulo that Norm is coming to kill him, but so far I can’t figure out Emile’s motivation to do that.  But it would be fun, so I’ll keep looking.

Time for more clustering.

Code Coverage Does Not Imply Test Coverage

| Comments

A code coverage tool watches your program executing and reports which lines of code were executed and which were not.  Testers are sometimes tempted to use code coverage tools to assess test coverage.  And some testers are tempted to set code coverage goals.  If you feel these temptations, be careful how you interpret the code coverage tool’s reports.

You can be sure that if a line of code was not executed during a test run, then it certainly was not tested by that run.

But what of a line of code that was executed by the tests?  Unfortunately, you can’t tell, just from the fact that it was executed, whether the line was tested.

Elisabeth Hendrickson and I developed a workshop on unit testing.  The work of the workshop centered on a small application we had written, a rudimentary HTTP server.  Our initial code had exactly thirteen tests, just enough to illustrate a few basic tools and techniques that we’d be teaching in the workshop.

When we ran a test coverage tool called NCover to watch our test suite, it reported that our thirteen tests executed 65 percent of the server’s code.  Does that mean that we achieved 65 percent test coverage?  Not on your life.  Our thirteen tests barely scratched the surface of the responsibilities of even our very simple HTTP server.

If our tests tested so little, why was code coverage so high?  Because though we our suite tested little of the code, it executed a lot of the code.

For example, one of our tests sent a GET request to the server and evaluated the response.  As the server executed the request, it called a logging function to log information about the request and its response to a file.  The logging function was minimal, and did not deal with any of the zillions of possible file system errors it might encounter.  It expected the happy path, and nothing but the happy path.  So this one test, which did not in any way assess the logging feature, executed all of the logging code.  The logging code was 100 percent executed and zero percent tested.

Code coverage does not imply test coverage.  If you use code coverage tools to help assess your test coverage, keep that in mind.

Fantasy and Science Fiction July 2008

| Comments

Last week John Joseph Adams posted a promotional giveaway for the July 2008 issue of The Magazine of Fantasy and Science Fiction.  Adams offered a deal:  You get the free issue if you promise to blog about it.

For the past 25 years I’ve read very little short fiction.  Lately I’ve been writing some short fiction myself, and have become interested in learning what makes excellent short stories excellent.  I began picking up the odd copy of F&SF and other speculative fiction magazines to study as well as to enjoy.  This promotion seemed right up my alley.

I ordered my copy on Thursday, received it on Saturday, and read the final story tonight.

Here are the stories and my reactions (no spoilers here).

"Reader’s Guide" by Lisa Goldstein.  I was surprisingly touched by this lovely story about one of the more mysterious aspects of the art of writing fiction.  I can’t say anything about the plot without giving away the beauty of the story, but the story is written in the form of a reader’s guide.

"Fullbrim’s Finding" by Matthew Hughes.  A "discriminator" goes in search of a client’s lost husband, who has himself gone in search of the meaning of life.  (From this story alone, I get the sense that a discriminator is something like a galactic private investigator.  F&SF’s intro to the story suggests that the main character has appeared in other short stories and novels, and I suspect that "discriminator" is clarified in those).

"The Roberts" by Michael Blumlein.  Technology helps a man solve the problem of finding a "perfect" mate.  But what if the imperfections are not in the mate?

"Enfant Terrible" by Scot Dalrymple.  A story of a man doing a job that is both necessary for the protection of society, and dirty enough that it’s best kept quiet.  Dalrymple tells this story second-person point of view–i.e. the main character is "you".

"Poison Victory" by Albert E. Chowdrey.  In late 1949, a German chemist struggles to atone for his role in bring Germany to victory in WWII.

"The Dinosaur Train" by James L. Cambias.  A setback in a family business–a sort of circus with live dinosaurs–brings three generations of unresolved conflicts to the moment of truth.

My strongest reactions were to the two more experimental stories.  I liked "Enfant Terrible" least, specifically because of the second-person point of view.  Second-person always makes me fear that the perspective was chosen more for the author’s amusement than for its ability to illuminate the story.  In this case I stumbled over the POV, and it didn’t offer any compensations that I could see.  I liked the story, but I liked it less for the POV.

The story I liked most was "Reader’s Guide."  I enjoyed my initial puzzle of "how the heck do you tell a story in the form of a reader’s guide?"  As it turns out, there’s something about the experimental form that seems necessary to the story.  The story itself arises partly from the form, and without that form would not be as effective.  That’s an experiment that works.

When I pick up an issue of a fiction magazine I expect to enjoy one or two of the stories.  I enjoyed all six of these stories.

Scenes and Beats

| Comments

Two types of scenes. Most of the scenes I write fall into one of two types: Action scenes in which the point-of-view (POV) character acts toward a goal and encounters conflict, and reaction scenes in which the POV character reels from a setback and decides what to do next.

Each type of scene has a typical structure. For an action scene, the structure is:

  1. Goal: The POV character has an immediate goal (called the scene goal), and acts toward the goal.
  2. Conflict: The character hits an obstacle, usually in the form of an opponent, another character whose goals conflict with the POV character’s. For the bulk of the scene, the POV character and the opponent struggle with each other, each to attain their goal.
  3. Disaster: The POV character either succeeds or fails to achieve the goal. Most action scenes end not only in failure, but in disaster: The character is worse off at the end of the scene than at the beginning.

The structure for a reaction scene:

  1. Reaction: The POV character reels from the preceding disaster. This may include an emotional reaction, an rational reaction, or both. Usually the emotional reaction comes first.
  2. Dilemma: The character calms down enough (perhaps just barely enough) to explore options for what to do next. All of the options are bad.
  3. Decision: The character chooses the least bad option and commits to it. This becomes the scene goal for the next action scene.

Beats. The middle of each kind of scene proceeds in beats. A beat is a tiny cycle of flow and ebb, of forward and back, of progress and setback.

The conflict in an action scene proceeds in conflict beats. You can think of a conflict beat as starting with either the POV character’s action or with the opponent’s (or environment’s) action. Here’s the POV-character-first version, which I think of as an Action-Result beat:

  1. Action: The POV character takes action toward the goal.
  2. Result: The opponent acts against the POV character.

And the environment- or opponent-first version, which I think of as a Stimulus-Response beat:

  1. Stimulus: Something happens to which the POV character must respond.
  2. Response: The character acts in response to the stimulus.

Each kind of conflict beat gives a different perspective on the events of the scene. With Action-Result beats, the POV character appears to drive the sequence of events. With Stimulus-Response beats, the opponent or environment seem to be driving. Neither perspective tells the whole story: The POV character and the opponent co-create the sequence of events. I find it helpful to explore a sequence of beats from each perspective.

In a reaction scene, the dilemma proceeds in dilemma beats:

  1. Forward: The character thinks of another possible action toward the goal.
  2. Back: The character realizes the disadvantages of that action.

A caveat. These scene and beat structures are templates. If you apply the templates too rigidly, your story will read as if, uh… as if you wrote it by rigidly applying templates. I reach for templates like these only when I don’t know what to write next. They’re a great way to jiggle my brain. If the words are flowing without the templates, I don’t think about these structures.

Further reading. I learned these most of these ideas from Dwight Swain and two other writers who have expanded on Swain’s work:

Other names for these ideas. Swain uses different names than I do for these ideas, and Bickham and Ingermanson follow Swain’s lead:

  • What I call an action scene, Swain calls a Scene (capital S).
  • What I call a reaction scene, Swain calls a Sequel.
  • What I call a Stimulus-Response beat, Swain calls a Motivation-Reaction Unit (MRU).

As far as I know, “dilemma beat” is my own idea, though it’s probably implied by Swain’s description of Sequels.

Also, other people use the term beat in other ways.

Writing With Variables

| Comments

Here’s a writing exercise I invented to help me jiggle my brain and find ideas for fiction.

  1. Write down any character, location, object, situation, action, theme, or other story element.  It may be fascinating or mundane.  It may be one you’ve thought about and written about extensively, or one that just popped into your head.
  2. Write down every variable you can think of for the story element.  By variable, I mean anything that you could vary.  Ask yourself:  What could I vary about this?  What else could I vary?  When you run out of ideas, ask yourself:  If I could think of one more thing, what would it be?
  3. For each variable, write down every value you can think of.
  4. Pick a few variables that seem interesting to you.  Try different combinations of values for those variables.  What story ideas does this give you?

Let’s try a mundane action:  Sharpening a pencil.

What could you vary about sharpening a pencil?  Here are some of the variables I can think of:

  • The kind of sharpener.
  • The sharpener’s condition, age, mechanical soundness, rustiness, sharpness, squeakiness, color, shape…
  • The location of the sharpener.  It’s orientation.  The soundness of its mounting…
  • The state of mind of the person sharpening it.
  • The person’s dexterity, eyesight, hand strength, height, olfactory acuity…
  • The pencil’s age, color, length, composition, dryness, wetness…
  • The brand of pencil.
  • The brand of sharpener.
  • The person’s reason for sharpening it… intentions for the pencil…
  • How easy it was to find the sharpener, or to travel to it.
  • The climate, weather, temperature, humidity, noise level around the person and the sharpener.
  • … and so on …

Now let’s pick a few variables and identify lots of values.

What kind of sharpener is it?

  • Electric.
  • Mechanical crank style.
  • A small, plastic, hand-held one with an angled razor blade edge.
  • A pocket knife.
  • … What other kinds? …

What is the person’s reason for sharpening the pencil?

  • To write something.  (To write what?  A novel?  A Dear John letter?  A contract?  A manifesto?  This gives a new variable to play with, which may lead to yet further variables.)
  • To mark a board for cutting.  (To build what?)
  • Well, duh!  Pencils are supposed to be sharp!  (Where did this rule come from?  What other, related rules might the person have?)
  • To poke a hole in something (what?).
  • To stab someone (who?) or something (what?).  (Why?)
  • Because the aroma of freshly shaved wood and graphite reminds the person of a simpler time, when the world (and he) was more innocent.
  • … What other reasons? …

What is the condition of the person sharpening the pencil?

  • Too young to manipulate the pencil or the sharpener well.  Or too old.
  • Shaky hands.  (Why?)
  • Drunk.
  • Angry (about what?).  Jealous (of whom?).
  • Hemophiliac.
  • Wearing gloves (what kind of gloves?).
  • … What other possibilities? …

What combinations of values seem interesting?  Using the pencil as a weapon seems obvious, so I’ll try something else.

An elderly, arthritic man twists a yellow, Berol Ben Franklin No. 2 pencil in a small, forest green razor-type sharpener.  He doesn’t need the pencil to be sharp (he has nine sharp pencils in a Texaco cup on his roll-top writing desk).  And he can’t see well enough to write, anyway.  But the smell of the wood and paint and resin and graphite takes him back to his childhood, transports him away from the terrible reality of the deed he had done – not impulsively, not in haste, but after careful, prolonged consideration – just two hours earlier…

Your Turn.  Try the exercise yourself.  Let me know what happens.

NaNoWriMo 2007–Many Happy Returns

| Comments

My NaNoWriMo novel this year was inspired by an idea posted by roefactor on last year’s NaNoWriMo “Adopt-a-Plot” thread:

What if everyone started living the same day over and over again, but, unlike most situations, everyone knew about it?

I’ve adapted this marvelous idea slightly:

On August 10, 2008 at 2:39 am GMT, the universe reverts to the state it was in on August 8 at 9:28 pm GMT. Then on August 10, it happens again. And again. The universe is stuck in time loop that lasts 29 hours 11 minutes. Only one thing transcends the resets: consciousness. People retain their memories through the time loops.

That’s nearly all I have to start with. I currently have no plot and no characters. I do have a scene or two in mind to get my fingers moving. And I’m starting to flesh out some of the social, political, scientific, and religious implications of the time loop. All of that speculation has yet to yield a single plot idea, but this is NaNoWriMo, so it’s okay if I have no idea what happens next.