I <3 Steve McConnell*
Coding Horror
programming and human factors
by Jeff Atwood

May 08, 2006

Invisible Formatting Tags are Evil

So I'm merrily editing my document in Word, or the WYSWYG editor of my choice, and I accidentally delete one of the invisible formatting tags embedded in the document. Carnage ensues. Here's an example from Outlook:

Small GIF movie demo of hidden formatting codes

It's enough to drive me absolutely bonkers. And it happens all the time. Not to put too fine a point on it, but the problem with invisible formatting tags is that they're, well, invisible.

I'm not against WYSIWYG editors, but at least give us a way to optionally reveal the formatting tags in the document so I can tell what the heck I'm deleting. You know, before I destroy the formatting in the document. I can't even begin to tell you how many times I've been utterly dumbfounded by the effects of an innocuous edit in Microsoft Word-- just because I happened to overwrite the wrong invisible formatting tag. Thank goodness for my old friend, CTRL+Z, but editing a Word document is a nerve wracking experience not unlike walking through a field of formatting land mines.

I've grown to dislike the rather severe limitations of browser-based WYSIWYG editors like FreeTextBox, too, but at least they allow you to make the formatting tags visible by switching to HTML view.

I like my markup clean, simple, and most of all-- visible. Maybe I'm too old school for my own good, but I now prefer to edit my blog posts in a plain textbox, or possibly in the Visual Studio HTML editor for colorization and intellisense support.

Posted by Jeff Atwood    View blog reactions

 

« Spam via SMTP Non-Delivery Reports The Ten Commandments of Egoless Programming »

 

Comments

I completely agree. In Word, you can reveal some of the stuff that is going on by Ctrl-Shift-8 which shows some things (like page-breaks and section breaks), but things like the start and end of bold (italics, etc) are sadly still hidden. It makes me miss Word-Perfect and Reveal Codes.

David

David on May 8, 2006 03:44 PM

> It makes me miss Word-Perfect and Reveal Codes.

I was just saying the same exact thing in a conversation! Eerie.

Evidently it is possible to have too much WYSIWYG.

Jeff Atwood on May 8, 2006 03:46 PM

Sorry to have multiple posting in rapid succession, but I just did some searching and found this:
http://www.levitjames.com/crosseyes/reveal-the-codes.htm
It looks like they managed to get the WP Reveal Codes functionality into Word.

I haven't tried the product (no copy of word on my office computer), and I'm not affiliated with the product in any way. Has anyone tried this product?

David

David on May 8, 2006 03:49 PM

I posted a similar rant last September on a documentation topic at http://discuss.joelonsoftware.com/?joel :

"And regarding formatting, almost all our documentation is developed in Microsoft Word. Word is one of the few programs that can get me cussing & cursing in no time flat. Auto-formatting (whether it's disabled or not) & hidden formatting are two of the worst features ever developed. Once Word starts "taking over" your documentation, you're pretty much screwed. Saving often & restoring to previous saved versions helps, but one shouldn't have to go to such lengths to use a word processor."

-- http://discuss.joelonsoftware.com/default.asp?joel.3.200081.12#discussTopic200193

Ian Johns on May 8, 2006 04:08 PM

These hidden format tags are very annoying, especially in Outlook when tidying up an email I am forwarding. The worst part is that Outlook Express has a Source View when editing email but Outlook misses out.

Jason Stangroome on May 8, 2006 05:00 PM

I am also plagued by the opposite problem:

So many programs default to 'paste with formatting' and because the markers are invisible it is almost impossible to reformat the text to match the target document (some of it sticks even though you try to override it, such as mysterious double-spaced lines, etc).

For some programs that do not have a 'plain text' paste option, I find myself having to drop my cut and pastes into Notepad between the source and destination, which quite frankly is absurd.

Does anyone ever want the current default of paste with formatting? Has anyone ever had it produce a workable result?

Paul Coddington on May 8, 2006 05:09 PM

Jeff, the problem is not WYSIWYG. The problem is WYDSIWYG.


(What you don't see is what you get).

Haacked on May 8, 2006 05:46 PM

The problem isn't that the tags are invisible. The problem is that the tags are invisible and can be affected by your editing actions. If the only way to format text were through explicit formatting commands, this would never be an issue. How the formatting is represented internally should never be exposed to the user.

Carl Manaster on May 8, 2006 06:42 PM

I hate, hate, hate WYSIWYG HTML editors, because all of them seem to do this -- that, and you never quite know what tags you're _inserting_ and what their scope is when you format or hit ENTER. It isn't just Word by any means -- VS does it, the HTMLEdit control behind OWA does it, the flippin' Google/Blogspot editor does it. They all do it, grrr.

mike on May 8, 2006 07:09 PM

Jeff, it sounds like you actually *are* against WYSIWYG editors. The problem is that the invisible formatting tags are, well, invisible, and hence not what you see. WYSIWYG editors can, by definition, only edit visible elements.

I tried to make this point a while back: http://girtby.net/archives/2005/06/13/this-is-what-you-see-this-is-what-you-get/

Alastair on May 8, 2006 07:58 PM

> If the only way to format text were through explicit formatting commands

I agree, in theory, but I have yet to see a WYSIWYG editor that actually achieves this goal.

> you actually *are* against WYSIWYG editors

I am against WYSIWYG without the ability to switch to "markup view" to tweak things.

If you really think about it, what's the only difference between HTML and Word's internal format? The difference is that Word is a closed-source markup language.

Or it was, until MS decided to implement Office Open XML Formats..

http://www.microsoft.com/office/preview/itpro/fileoverview.mspx

Jeff Atwood on May 9, 2006 12:00 AM

Oddly enough, Outlook Express has a (semi-hidden) HTML source edit view. Pay a few hundred more for Outlook, and you lose this feature. You can view your source, it's like viewing source in a web page - edits don't affect the original document.

I use HTML as my default format in Outlook instead of Word, partly for this reason. HTML's not quite as bad as Word's creepy internal formatting code when it comes to bizarro document panic.

Jon Galloway on May 9, 2006 12:35 AM

Please, tell what tool you did use to make that kind of gif-based animated demo ?

Laurent B. on May 9, 2006 01:08 AM

> If you really think about it, what's the only difference between HTML and Word's internal format? The difference is that Word is a closed-source markup language. Or it was, until MS decided to implement Office Open XML Formats..

As far as formats go, documented != open. (even for suitably cynical values of "open")

Alastair on May 9, 2006 01:15 AM

Whilst I have nothing against WYSIWYG editors, I've never personally got on with them and still prefer to use things like TeX/LaTeX for all my documentation needs. Once learnt, and with a few useful template documents you can put together a really nice looking document just as quickly as you can in word (quicker if you have to do any maths stuff).

Chris M on May 9, 2006 01:19 AM

This has come up time and again in the Word blogs. The problem is, Word does not use such a thing as "formatting tags", ergo it can't show them. Word documents are internally represented as an impossibly complicated, impossibly error-prone, and totally counter-intuitive tree of nested C structures. It's a miracle that Word even manages to display the correct formatting most of the time.

This incomprehensible internal structure has been inherited from Word for DOS and rewriting it would mean rewriting Word from scratch, which is why it doesn't happen -- even though this internal structure is responsible not only for randomly dropping formatting while editing, but also for frequently destroying documents wholesale once they exceed a certain length.

Chris Nahr on May 9, 2006 01:33 AM

I tried to point out to Sun ages ago that Star Office being WYSIWIG is no good if you need large fonts on screen to edit a document intended to be in small fonts when it goes to paper. It is no good if glare from white screens causes pain (which, funnily enough, you don't get from paper (except under bad lighting), so it's *not* what you get, is it?) The whole point of this newfangled wordprocessing stuff [:-)] is that the computer should allow more flexibility than you had with a quill. Maybe disability lawsuits might wake people up...

hgs on May 9, 2006 04:03 AM

I guess "ages ago" people didn't have LCD monitors. Glare from a white background isn't really an issue anymore, unless your monitor brightness is turned up too high.

Chris Nahr on May 9, 2006 04:18 AM

> Please, tell what tool you did use to
> make that kind of gif-based animated demo ?

I second that.

Pete on May 9, 2006 06:54 AM

I've learned the hard way that when you're using Word it's best to write the text first, and only *after* the content is 100% correct do you start on the layout and formatting. It's also best to do as much of the formatting as possible using Word's Styles feature; although it suffers from some strangeness of its own it cuts down on the number of "invisible" formatting codes your document contains, and thus alleviates the pain induced if you need to make changes later.

The pasting problem is also tedious; in any application that supports it I always remap Ctrl-V to run a macro that performs a "Paste unformatted", and then map the regular paste to Ctrl-Shift-V...

Mat Hall on May 9, 2006 07:19 AM

I just wrote a 100 page document in Word 2003, cursing the entire time, because of the formatting. Using the Word Styles and Formatting view is a must, but the problem is that passing documents around and giving them to people accumulates all this formatting cruft. I spent 15 minutes trying to figure out why, all of a sudden, my Heading 5 text was tabbed over half an inch -- and how to fix it, and it just wouldn't go.

I hate Word. I hate Visio. I hate Outlook for the exact reason that wumpus mentions. Excel isn't bad though, probably because I haven't used it much.

Alex on May 9, 2006 08:55 AM

> Please, tell what tool you did use to
> make that kind of gif-based animated demo ?

In this case, it's Camtasia, but I've used gif-gif-gif before for similar effects. Check out the Donation Coder roundup of screencasting tools for more options:

http://www.donationcoder.com/Reviews/Archive/ScreenCasting/

Jeff Atwood on May 9, 2006 09:02 AM

I'm surprised that no one here has bothered mentioning simply writing emails in plain text. First thing I do with any email client is set editing mode to unformatted text. It's clean, platform independent and you can be sure that the recepient will see exactly what you type. Besides, the only HTML you really need in email for is for weblinks, and even then, most clients convert plaintext links into hypertext anyways.

Mozilla on May 9, 2006 09:20 AM

hgs,
You do know about the "zoom" function in most modern word processors? The one that displays the document in 200% or 400% of the actual size.

Mozilla on May 9, 2006 09:34 AM

For as powerful a tool as a WYSIWYG editor like Word is supposed to be, I find it most useful for writing relatively simple documents with uncomplicated formatting. Editing more complex documents becomes a torture as Word tries to "help" me with automagical formatting. Visio is even worse. At least with a plaintext HTML editor I know I can get what I want every time, in markup that I'll be able to read and understand later. Maybe I should take some time and learn LaTEX as well.

SK on May 9, 2006 10:23 AM

Although this topic concerns WYSIWYG products (or lack thereof), I agree with Mozilla regarding
"writing emails in plain ... unformatted text".

However, it's not entirely correct that "it's clean, platform independent and you can be sure that the recepient will see exactly what you type". Depending on the recepient's email client & settings, it can convert the plain text back to HTML text & although it will be very SIMILAR to the original plain text email, the recepient's version might be in another font, font size, add/subtract line breaks, etc.

Ian Johns on May 9, 2006 02:54 PM

And ironically, as others have pointed out previously, this simple text-box-and-post-but-no-preview-button is certainly NOT WYSIWYG! :)

Ian Johns on May 9, 2006 02:55 PM

@Paul Coddington

You might check out "PureText" by Steve Miller. It maps Win+V (or the key combination of your choice) to the "paste without formatting" functionality you describe -- the same as pasting into Notepad and copying from there without actually having to go through the hassle of doing that. :-)

http://stevemiller.net/puretext/

Jon Schneider on May 10, 2006 06:06 AM

Chris Nahr: I have a LCD monitor now and it's still a strain to read black on white. Also trying to get contrast and brightness set to useful values is difficult: this monitor seems more nonlinear than the CRTs of the past

Mozilla: Zoom helps as far as it goes, but it involves a lot of scrolling. I try to get the biggest monitors I can. Then there is the case of other visually impaired people who need to work in sans serif fonts but have the doc come out in serif fonts for other people (and this seems to apply to dyslexic people, too). Add to this comments by people who prefer to read text off paper to reading off a VDU and it is clear that "WYSIWYG" is "being economical with the truth", at best.

hgs on May 10, 2006 06:16 AM

I can honestly say the only thing that's more annoying than working with a WYSIWYG program with these issues is trying to rewrite a WYSIWYG editor to not cause these problems.

Ian Muir on May 10, 2006 11:39 AM

What is this, the 80s?

"Modern" text-processors are style-driven, meaning there are no formatting-marks.

Why morons use non-plaintext eMail is above me, anyways.

fg on May 10, 2006 02:13 PM

(I tried to add this reply yesterday but it didn't work)

Chris Nahr: Yes, this was with a CRT, but even with an LCD display I find the light background uncomfortable. Even with the contrast/brightness
adjusted for maximum clarity this is true. People differ, and photophobia can occur for many reasons, such as post LASIK eye surgery (for a while, anyway).

Mozilla: yes, I know about zooming, but that means a lot of scrolling. Also, it doesn't solve the problem for dyslexic people who need sans serif fonts, as some do. some prefer to read off a green background, but print to white paper in the final result. Again, this should be configurable.

hgs on May 11, 2006 04:54 AM







(hear it spoken)


(no HTML)




Content (c) 2008 Jeff Atwood. Logo image used with permission of the author. (c) 1993 Steven C. McConnell. All Rights Reserved.