Unintended Consequences




Unintended Consequences

In the comments to my last post, AC takes me to task for what is arguably some strange behavior in Word compared to the way other
word processors behave. Rather than just reply to AC in the comments to my
previous post, I thought I’d take the opportunity to illustrate how the law of
unintended consequences is always there to bite you in the backside with any
feature decision you make.

Basically, you can see what AC’s talking about through the following steps (items in angle brackets, <>, refer to keys on the keyboard
or buttons in dialog boxes):

1)
Boot Word

2)
Type “This is a heading<return>”

3)
Type “=rand()<return>”

4)
Place the cursor in the first line of text that reads “This is a
heading”

5)
Format/Style, select “Heading 1” style,

6)
Place the cursor at the beginning of the first paragraph after the “This
is a heading” line.

7)
Hit the <delete> key (<backspace> key if you are the one Win
Word user reading my blog).

Result: The text of the paragraph after the “This is a heading line” takes on the formatting of the Heading 1 style.

To understand why this happens, we need to understand something about Word’s styles. Every paragraph in Word has a style. The default
style is the “Normal” style. These styles are analagous to cascading style
sheets in HTML. In fact, if you save a Word document as HTML (even
display-only, or “filtered” in Win Word terminology) and look at the HTML in a
text editor, you’ll see that Word wrote the styles as CSS.

Word’s style feature is as powerful as HTML’s CSS. In fact, if you think in terms of using styles to mark document structure (of which the
Heading 1 style is an example), then you can use styles in much the same way
someone might use XML tags in a document type definition. The power of this
feature is that you can change the entire look of your document simply by
changing the formatting that’s included in the styles you’ve used to mark the
document’s structure. Word has a bevy of pre-defined styles that you can use to
mark document structure. To see the list, select “Style…” from the Format menu,
and select “All styles” in the “List” dropdown on the left-hand side of the
dialog box.

OK, so back to AC’s problem. The line that contains “This is a heading” is in its own paragraph, and has its own paragraph style. The
following paragraph is in the Normal style. The effect of step 7 above is to
delete the paragraph mark at the end of the “This is a heading” line of text.
To see this happening, there’s a button on the standard toolbar that will show
paragraph marks. The icon on the button shows the paragraph mark symbol (a
backwards “P” with two vertical extenders rather than one). If you click on
that button, every paragraph mark in the document will be shown using the
paragraph mark symbol.

This is where the law of unintended consequences comes into play. If the user deletes a paragraph mark that separates two paragraphs where each
paragraph has a different style, Word can’t keep both styles applied to the
text. A paragraph can have only one style. In this scenario, Word, essentially
has three options:

1) Simply leave the
resulting single paragraph with the style that was applied to the surviving
paragraph mark. The problem with this solution is that the text before the
insertion point (the blinking carat) suddenly takes on the formatting of the
text that follows the insertion point.

2) Apply the style
of the deleted paragraph mark to the surviving paragraph mark. The problem with
this is that the formatting of the text after the insertion point suddenly
takes on the formatting of the text that’s before the insertion point. This is
Word’s current behavior, and I’ll explain why in a second.

3) Keep the font
formatting from the style of the deleted paragraph mark, but change the
underlying style to that of the text that’s after the paragraph mark. To see
the problem with this approach, consider the steps above. The text that reads
“This is a heading” would still look llike it had the Heading 1 style applied,
but it wouldn’t. It would have the Normal style applied.

Option 3 might seem like the right thing to do, and, no doubt, it’s quite likely what AC wants Word to do, but it involves Word
changing things in a way that’s not obvious to the user. The stuff that had
been marked as a heading is no longer a heading, but it still looks like it is.
Doing this runs counter to the very concept of styles, which is that the style
should reflect the structure of the document, not the formatting that the user
wants. Usually, if the user just wants the text to have a certain look, rather
than have it reflect structure, then the user will apply direct formatting
rather than use styles.

After rejecting option 3, it might seem like option 1 would be the right thing to do. And, in fact, a long time ago, Word used to behave
this way. If you delete a paragrph mark, the formatting of both paragraphs took
on the style of the surviving paragraph mark. However, during some usability
studies we discovered that this is not what most users wanted to have happen.

Most users know that when they place the cursor at the beginning of a paragraph and hit the <delete> key (<backspace> on a
Windwos PC keyboard), they’re joining two paragraphs, but, conceptually, they
think they’re joining the text that’s after the insertion point to the text
that’s before the insertion point. What they want, from a structure point of
view, is for the text that’s after the insertion point to take on the structure
role of the text that’s in front of the insertion point.

What does this have to do with the law of unintended consequences? Well, when we decided to add font formatting to paragraph styles,
we created a situation where, no matter what Word does, some users aren’t going
to be happy. It’s not something we intended to do, but it’s an unavoidable
outcome of the design decision we made. As my father-in-law would say, “You’ll have that.”

For those of you who don’t use styles all that much, here’s a tip: select styles based on document structure not based on the “look” that
the style gives you. If you don’t like the look of a style, modify the
formatting attached to the style—a task we’ve made a lot easier and much
more intuitive in Word 2004.

Rick

Comments (11)

  1. Dave Cortright says:

    Your post begs the question of of why Word enforces an atomic granularity of style per paragraph rather than allowing a style for any aribtrary run of text.

  2. Rick Schaut says:

    Word does that through character styles.

  3. Paul Berkowitz says:

    Thanks for the careful explanation of paragraph styles, Rick.

    I have a particular related issue I’ve never been able to solve. I know where to ask (assuming there is a solution) but I’ve never got arou nd to it, and if there _is_ a solution it doesn’t seem intuitive since I can’t figure it out. here it is:

    I, like many, many users of Word, often need to type letters to print using pre-printed letterhead stationery for the first page. I can use a template or stationery for this model, but I simply can’t figure out how to leave a 2.2" top margin for the first page and automatically revert to a standard 1" margin for all subsequent pages. In order to get the different top margin, I have to create a new section at the page break each time I make a new doc from the stationery. If I preset a second section in the stationery starting after a page break, I of course never arrive there: as I continue typing at the bottom of page 1, section 1 extends into a new page with a 2.2" top margin. If I delete the section break, all pages, including the first, get the section 2 format (1" margin) as you describe.

    I’ve tried to Format/Document and Format/Paragraph, but nowhere do I see anything that would let me define a new section or style for page 2. I’ve looked at Format/Style/New but again I don’t see where or how I could define a style with different margins to be applied automatically to page 2 of a template or document. Is there a way? If so, could it be easier to find? I imagine this is something that lots of people want to do. (Perhaps everyone but I knows how to do this already.)

  4. nate says:

    Rick, I’ve been reading all of your posts and I really want to thank you for the taking the time and effort to share with all of us. I’m an IT technician and always had a love/hate relationship with Word. That is until my company decided to bring in trainers and actually train all employees in Word 2002. I learned and mastered styles and have never looked back. Now Word is one of my favorite programs to use and since I have a 15" Powerbook at home, I am really looking forward to the new Word 2004!

    What I would love is if you could whet our appetite a bit more about what we can expect in Word 2004. I’d really be interested in the things you worked on/the things that you are most into.

    Thanks!

    Nathan Green

  5. nate says:

    The two things in particular that I’d really like to know what you think about are Tracking Changes in Word (and how that works with the windows versions) and Styles. As WinWord has progressed, the styles UI has really evolved into something pretty nice, while the mac one is still stuck around 2000 or even earlier. You’ve mentioned Styles interface before when talking about 2004, but I’d love to hear more. Thank!

    /NG

  6. Dave Cortright says:

    In that case, I wonder why the result of your 7 step process isn’t that the random text retains it’s character attributes but inherits the paragraph attributes from the heading. As a user, that’s what I would expect. To change the font, style, and size of my text hardly ever seems like the right thing to do.

  7. Rick Schaut says:

    Dave, what you suggest would be option 3 that I listed in my post. Unfortunately, a user who is using styles for structure markup, which is the recommended way to use styles, won’t want Word to go and apply some direct formatting when a paragraph’s style changes.

    Think about cascading style sheets in HTML. This scenario is analogous to joining two paragraphs that have different class tags but without any other style properties.

  8. VRic says:

    This last CSS comparison is right on to understand the user’s expectations you mention and shouldn’t have taken usability studies to find out. CSS classes are assigned at the start of paragraphs, which is good to streamline the rendering and happens to be close to writer’s (and reader’s) mind-set: "let’s type the title of the next chapter", not type it then look at it and wonder "oh by the way, isn’t that the title of my chapter?" Even though most of us apply styles after the fact, we usually know what we mean beforehand .

    The fact that this was an issue at all shows that developers couldn’t prioritize properly the user’s point of view against the program’s implementation, which in Word’s case got us used to consider styles were somewhat stored "within" paragraph marks at the end of paragraphs, whereas for the user the "current" paragraph is before the insertion point, not after, and for the reader the formatting defines the status of the text before reading it. So if our mind has a data structure for text, it defines style at the beginning of paragraphs and programs should too if they expect to feel intuitive.

    It’s a common programming bias to consider technical circumstances as laws of nature and user’s "expectations" as impredictable whims. They’re not. It’s more like the other way around: humans precede programs. If 20+ years of mac development should’ve taught MS something, it’s precisely that, but it’s harder than one may think; once you get it it’s crystal clear, but getting there isn’t obvious at all because it’s nothing technical.

    There’s been countless rants about MS usability and a lot of ressources went to addressing that, but I tend to believe they often miss the point: committing to user-centric design is more of a psychological matter, so the resources should go to fix the developers before studying the users.

    Here’s another example which could fit in your post about UI design. When MS introduced "contextual" menus, mac-heads like me were puzzled, since all menus as we knew them were supposed to be "contextual", which was the point in menus (showing what commands are available to the user at a given moment). Those new things were LOCAL, as opposed to already "contextual" menubar and pop-up menu controls, and I suppose many of us concluded to another strange attempt at breaking simple concepts through confusing terminology. But I later realized this was actually how MS people sincerely considered the thing. It’s just that if the user’s behavior (ie. where the click happens) is part of your CONTEXT, then you’re obviously not the user: this may have been the more blatant slip showing MS mind-set wasn’t user-centric. This is what needs work, the rest comes easily in comparison.

  9. John64 says:

    There’s a really funny inconsistency in word here. How come paragraphs work via option 2, but deleting section breaks take on option 1?

    Try it out.

    1. Make a 5 page doc by firing up word and inserting 3 page breaks.

    2. For the final page insert a ‘next page’ section break.

    3. Go back to page 1 and view > headers & footers (I work in print layout view usually).

    4. Type in "My heading for section 1".

    5. With headers & footers still open, jump to the last page (section 2)

    6. Take off the "same as previous" and delete the header in section 2 (If you want just for fun, make page 5 wildly different. Change the setup to landscape and go berserk).

    7. Close your headers and footers.

    You should now have a 5 page word doc. Pages 1 – 4 (section 1) have a heading, page 5 (section 2) doesn’t. Now let’s say you didn’t want page 5 (you made a boo-boo). So you go to the section break, put your cursor before it and hit delete.

    Pages 1 – 4 will now lose all of their page headers / footers / styles and will now assume the blank state of page 5. Funny that, isn’t it?

    If you’re going to take a set method of doing something (instead of say, popping up a box and asking the user what they want), then why isn’t that method used consistently across the program?