Showing posts with label word processors. Show all posts
Showing posts with label word processors. Show all posts

Wednesday, 25 May 2011

Soda: a document editor

Hello! I’ve been working on a thing! It’s called Soda, and it’s a document editor. It’s sort of like Google Docs, only a bit simpler and, well, different. The most important difference is the way you create documents: rather than do it visually, you write them in a sort of code.

Now I realise this doesn’t sound terribly brilliant, but there’s a reason for it. When you type stuff using a WYSIWYG editor, it’s often difficult to maintain consistent formatting across a complex document. The ideal way to do it is to use some sort of style system – Word 2007 has those nice big style buttons if you have enough screen space, while LibreOffice has a handy Styles pallete/list thing.

However, neither of them really encourage the user to make use of these facilities, which I think is a shame, albeit understandable from a historical perspective. The ‘apply formatting to a selection of characters’ style of editing was laid down in The Beginning, and it’s probably far too late to do anything about it now. Still, I made Soda anyway, because it’s something I want to use (I wrote this blog post with it).

Anyway, the idea is you use various ‘control characters’ to apply semantic styling to blocks of text. For example, rather than say “make this text bold, size 22 and centred”, you instead say “make this text a level 1 heading”. In other words, you apply meaning to sections of text, and then you can control how all text with that meaning appears throughout the document (well, you can’t control it yet, as I’ve not actually implemented a style editing interface, but there is going to be one).

Caveat Emptor

Soda is not finished. It probably never will be, completely – there’ll always be something to add or something to fix. In its current state it’s quite usable, and I’ve tried to make sure the main part of it, the editor, has no glaring bugs.

That said, there’s still plenty to do before I’d be comfortable with declaring it fit for general use. Here are some things I have in mind at the moment:

  • Making registration/sign-in easier. I’ve been experimenting with OAuth login and it’s really just a question of putting the code in place, after which you’ll be able to sign in using Facebook, Twitter etc.

  • Smooth off the rough edges. At the moment, when you leave the editor with unsaved changes, there’s no warning/confirmation. Likewise for deleting documents.

  • Editor and preview preferences are not saved.

  • Needs a Markdown formatting guide.

This isn’t a comprehensive list, obviously, but these are the priority things. Like I said, none of them are really show-stopping problems, but they’re definitely obstacles which shouldn’t be there.

So yeah, if you want to poke around with it, feel free. It’d be good to get some feedback, too, as it’s hard to know what kinds of issues users may encounter when approaching it fresh.

Oh yeah and I know it’s silly, and I really do keep meaning to do something about it, but after logging in you need to click the ‘Your saved documents’ link at the top to create a new document. Once I’ve put the OAuth stuff in place, you’ll be redirected to that page after signing in or registering.

http://soda.heroku.com/

Thursday, 14 April 2011

Word Processors: A Rant

Note: this was originally going to include a rant about image editors and their general lack of support for adjustment layers, but it got a bit long so I've put that rant into its own post.

This is a semi-rant about word processors, and how so many of them persist in Doing It Wrong. This is going to be a long post…

Wrong?

"What's wrong with the way they work now?" The basic problem is that word processors are too focussed on character-level formatting. To make a block of text into something that looks like a heading, the common approach is to select the text, change its size using the Font Size drop-down on the toolbar, then maybe make it bold too, or use a different font family. If you want to change the look of a paragraph, you'd select it, then change its appearance using the usual controls.

This works for documents with one heading and where all the paragraphs have nothing else between them, but what about more complex text (like this one)? To continue the old way you'd have to go through the entire document changing each paragraph or heading individually; Microsoft Word even has a tool to make this process more efficient: the Format Painter. Here's what the MS Office help page has to say about it:

Say you've written a report in Word. You like the look, especially your headings, which are 14 pt. Bookman Old Style, centered, green, and bold, with a nice subtle shadow.

Fifteen minutes before you're supposed to present the report to the team, your manager asks you to add four new sections to the report. You spend thirteen minutes adding the information, and the next two wishing that you hadn't chosen such complicated formatting for your headings, since you now have to apply it to all the new ones.

Using Format Painter saves you that time and duplicated effort. Instead of having to manually apply the font, font effects, centered paragraph alignment, and other formatting to each new section heading, you can quickly copy all of the formatting attributes by using one toolbar button.

That's great and all, but it's a case of fixing the symptom, not the cause of the problem, which is that the application encourages users to format text the wrong way.

Ok then smartypants…

Any modern web designer knows that an HTML document should be styled with CSS. Gone are the days of <font> tags littering the page, and <body bgcolor=gray> and the like – these days we do it the right way by separating content/structure from presentation, with a (normally) external CSS file which contains rules on how document the document should look. This allows an entire site's presentation to be changed by editing a relatively small file dedicated to the purpose.

You can see where I'm going with this. I'm not suggesting word processors should use CSS, or that users should have to edit a separate file in order to format their documents. Rather, I just would like to see the applications make stylesheet-based editing the main way to do things. Not the only way, of course: like I said, for very simple documents it's easier to just apply the formatting you want to the text directly, instead of giving the text some structural meaning (heading, normal paragraph, block quote etc.) then editing the style rule for that.

Naturally, many people will reject this idea. It's not what they're used to, they like it how things are, etc. But, for anyone who needs to write a moderately complex document I believe it's by far the better way to work. It lets you concentrate on the content and structure of your document, rather than the superficial appearance. Yes, once you've written your document you could easily spend hours tweaking the style to perfection, but if sensible default styles are provided, or if it's easy to save new ones, this step will be a quick one. This was the thinking behind Soda, my (unfinished) attempt at writing a styles-based word processor: good default styles that let you write nice-looking documents in a structured, easy-to-change way.

With Soda, there is will be no font size or font family drop-down on the toolbar. Documents have a base font size (12pt by default), from which other sizes are derived – level 1 headings, for example, are 150% of the base size. Similarly, you can't change the font family of a block of text except by marking as having some particular meaning (such as emphasised or a citation), then modifying the rule for text with that meaning.

The idea is to enforce consistency and structure throughout the document: using the example above from the Office help page, if you were using a style-based editor the new headings would automatically match the existing ones. There would be no need to to copy styles, with the possibility of missing one, or applying it incorrectly. You just create a heading, and it looks like all the other headings.

To continue Microsoft's example, let's say you were asked at the last minute to make all the headings red instead of green. No problem using the Format Painter if you only have one or two headings, but what if this is a 20-page report with 45 or so headings? Changing one style rule is hugely more convenient than having to go through the entire document clicking each heading to change it to the new format.

But Word can already…

Yes, yes, I know. You can already use Word (and OpenOffice/LibreOffice, and presumably most other word processors) this way. The point is they don't make it as easy as it should be. Word even comes across to me like it's trying to get you to not use the Styles functionality, as if it'd prefer it if you did things the old-fashioned way. I understand why Microsoft do this – people have been using Word for years, and people generally don't like change (just look at how people reacted when MS Office introduced the 'ribbon' interface).

I'm also not naive enough to think that anything can reasonably replace Office in, well, offices. Microsoft and Office are deeply entrenched in the business world, and there's little anyone can do about it. So why bother ranting about it? Mostly just because it's been bothering me for a while, and writing is cathartic, and maybe there's a chance someone more influential than me will read it. A large part of the reason I started working on Soda was frustration with existing tools. I want to make it easy to create good-looking, easily-maintainable documents.