… or any word processor for that matter. What I am talking about is the difference between using Microsoft Word the same way you used a typewriter, and using it properly by declaratively marking regions of text with styles that control formatting. Let me give you a concrete example using text generated from cupcake ipsum, one without styles in use, and one with.
Styling the WRONG way
In this first image you can see some cupcake ipsum generated text. There are two paragraphs with reasonable spacing between them. Unfortunately the styling in this simple document is incorrect. If you look at the following screenshot of the same document with paragraph marks turned on you can see that there is a paragraph mark that doesn’t need to be there.
This document only has two paragraphs, but the presence of three paragraph marks indicates that there are three. If a program were to automatically process this document and output the paragraphs you’d probably get an empty one somewhere in your output stream. In this case the user wanted to add a space between the two paragraphs, so they used Microsoft Word like it was a type writer and inserted another carriage return. This is one of my pet peeves and the thing that really burns is that you have to go out of your way to generate text this way. If you just use the paragraph formatting styles that word includes out of the box, you get automatic spacing between paragraphs. So what does it look like if you do it correctly?
Styling the RIGHT way
Pretty much the same. There is slightly less space between the first and second paragraphs because it is just a paragraph space, not a new line, plus two sets of line spacing. The end result is just as pleasing but more correct.
If we look at the correctly formatted document with paragraph marks turned on you can see the middle paragraph mark has now been removed.
So who cares? Really – what are the consequences of getting this wrong. Often times, nothing. In a world where documents are written and never read who really cares whether you have invoked a level of craftsmanship producing a document – other than yourself. One practical example of when this will hurt you is when you start restyling documents that have inconsistent style usage. Because you have forced specific paragraphs into different styles, if you want to uniformly increase the spacing between paragraphs, or headers and trailing paragraphs you’ll find that some re-style, and others don’t.
You can’t work in a professional services firm without coming across at least one discussion about document templates. The sad fact is that consultants need to write reports to represent findings to customers. You don’t want to always start from scratch so you want to have document templates. I do find it strange however that in an organisation of people that talk about software craftsmanship and semantic mark-up that so many people still can’t achieve either when using Microsoft word.
The ultimate irony about this post is that no matter how hard I try to stick to semantic mark-up when using Windows Live Writer and Word Press that you’ll end up with either strange looking posts, or non-semantic mark-up. Sometimes you have to decide which is more important. For example, the headers in this post are way out of proportion of the rest of the text, but the CSS template of the site layout I use in Word Press really controls how they look. I should probably err towards semantic mark-up but I know I haven’t always. So I’ll pay the price when I decide to export my content and push it to another blogging platform.