Diffing HTML
I think this is the final episode in my series of responses1 to Alastair’s Responding to Adrian. What’s the aim of diffing HTML, how hard is it and how do you go about it?
The aim is really important to identify. The most common and most useful aim that I see for diffing HTML is to be able to show users what changed between two versions of a document. Since the management of most content is centralized2, this equates to showing the combined changes in each version between the original version to compare and the final version to compare. If you’ve ever wanted to see what’s changed on a wiki page, you’ve wanted this type of diff. If you’re sending Word documents back and forth between people you probably want this type of diff too.
The Invisible Formatting Tag Problem
Continuing with my response to Alastair’s Responding to Adrian, let’s take a look into the problem with invisible formatting tags in WYSIWYG editors.
The example I gave was to delete the final character of some hyperlinked text. The delete operation removes the internal formatting tag, and hence removes the hyperlink entirely, as well as the final character.
In this behaviour Outlook is no different to many other HTML editors, and is a completely appropriate example. The problem of the invisible formatting goes directly to the heart of the limitations of WYSIWYG editors. There is no visual representation of the tag, so there are bound to be some surprises when the user starts editing in the vicinity of the tag.
On The Importance Of Rendering Fidelity
A while back I promised I would get around to fully responding to Alastair’s Responding to Adrian, sadly I’m finding lots of little bits of time to blog but not enough time to reply to the whole post at once. Hence, I’ll have to respond in parts when I get time.
First up, the problem that HTML doesn’t render the same on different systems. My assertion is that generally the differences aren’t significant enough to worry about.
Footnotes
Every fortnight or so the Ephox engineering team lets off steam by taking a couple of hours on a Friday afternoon to do cool stuff with our products using just the publically available APIs. Theres been some cool prototypes come out of it that may be turned into features later on but mostly it allows us to get a sense of what our customers go through when they try to extend or customize our products. You should see a number of improvements to our API appearing in future versions because of this experience1.
Why Opensourcing Swing Won’t Fix HTML
Rick Jelliffe holds the poor HTML support in swing up as an example of why Swing should be opensourced. There’s a very major flaw in this argument though: you’ve been able to fix the HTML support in Swing since at least Java 1.3 and probably well before. It was actually designed to be replacable. Just implement your own HTMLDocument and HTMLEditorKit and you can plug it into a JTextPane all you like and render HTML to your heart’s content.
Relearning To Close Windows
Jensen Harris has a post about how they tested out removing the ability to double click in the left corner of a window to close it, but that people couldn’t get used to it so they’re putting it back. Might I suggest that people didn’t get used to it mostly because Office was the only application that didn’t allow it?
If you want to really test out whether or not people could retrain themselves (and they can, even if they complain about having to) you’d need to remove the functionality from all the windows, not just a few of them. Otherwise, the other windows preserve the user’s habits and it just becomes really frustrating that the interface is inconsistent.
Andy Invoked The Magic E Word
So apparently one of our engineers here at Ephox has been secretly writing a blog and not telling us.
I’m not ready to start advertising the existance of this blog to anyone and everyone I know. I’ll do my best to start posting on impulse though, it should make this whole process easier.
Either way I’m going to try and work on actually getting back into blogging this time, it can’t be too much longer before my workmates discover that I have a blog, hopefully by then I’ve found my style!
I’ll Tell You Where You Can Drag Your Icon…
I love the fact that most OS X software is installed simply by dragging it to your Applications folder but there is one thing that really, really annoys me and I just can’t understand why developers who are clever enough to write useful software are so utterly incompetent that they distribute their software on a dmg that hides the sidebar in the finder so you can’t see your Applications folder. For instance, here’s the window that opens automatically when you mount the dmg for Microsoft Messenger:
Setting Up Jabber Build Notifications
We took a little time this morning to set up Jabber notifications of build failures since we now have a dedicated pairing machine with no email account (plus the sooner you find out about a failed build the better really).
It’s all pretty straight forward to set up, the latest CruiseControl includes a jabber publisher so you just put the details in an it all happens. I’d suggest you put it inside an onfailure element to avoid getting a message every time a build occurs (and if you’re checking in regularly that will be often).
Testing Your Way To Bug Diagnosis
Sometime you run into a bug that you can reproduce off an on, and you just get this feeling that it’s because each time you try to reproduce it you’re doing something slightly different and that’s causing it to appear and disappear. I encountered just such a bug today.
The bug report came in, select a word at the end of a list item, hit backspace and the word is deleted correctly but the next list item is incorrectly moved up and appended to this one (as if you’d hit forward delete at the end of the list item with no selection). I’d seen this problem happen with my own eyes, the first time I tried it I reproduced the problem. So I made a change to the code base to try and track down what caused it and all of a sudden the problem disappeared.
Unlockable Features In Games
It’s not often that Slashdot comes up with something genuinely interesting that I haven’t seen from somewhere else before, but they managed it today. Puritan Work-Ethic, How I Loathe Thee really struck a chord with me:
Nearly every video game since “tank pong” has buried its best content behind layers of work. Unlike any other retail product I can think of, when you buy a video game, the chances that you will actually get what you paid for are infinitesimal. I can’t think of a single game I’ve played where I am confident that I’ve seen every single level; unveiled every coveted secret; unlocked every whatsit and pretty and soundtrack left like kipple by the designers in the dark corners of the code.
Using Ant As An Installer
Since its inception, our IWWCM integration has been a bit of a pain to install – the instructions differed based on which version of IWWCM you where running and which version of WebSphere or Workplace you used and you had to move and edit files in various locations. Nothing difficult but it was just too easy to forget a step and have things go wrong.
The simplest way to improve things – provide an installer that automates the process. The problem is, most installer tools are ridiculously complex to work with because they attempt to provide a way to do anything you could ever want. It would have taken us days just to get our heads around how to use the tools.