Footnotes

June 10th, 2006

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.

This time around, my little project was to add support for adding footnotes like what Daring Fireball uses. Since my thought process tends to ramble a fair bit, I wind up using a whole stack of parenthesis in my writing which makes things a little hard to follow. Hopefully with this new plugin making a footnote just a keystroke away, I'll wind up with a more coherent main text with the extra information still available in footnotes2.

The downside at the moment is that I've also stuck with Daring Fireball's use of the Unicode left hook arrow for the jump back link at the end of the footnote. This seems to display incorrectly on Windows a lot of the time3 which is unfortunate but doesn't break the functionality. The current implementation somewhat unfortunately doesn't use an actual list for the footnotes even though in hindsight it wouldn't have been significantly more difficult to do. I just happened to choose paragraphs without thinking about it and by the time I noticed the difference there wasn't enough time to change it. Using a list would also make it simple to have a divider line between the content and the footnotes whereas it requires extra markup or complex CSS that isn't well supported when using paragraphs.

 

1 - Particularly our Java APIs, or advanced APIs as the product documentation calls them.

2 - Of course, I could just learn to write better but this seems more likely to happen.

3 - Sadly this behavior seems quite inconsistent and depends on the particular font. Font fallback routines in browsers should make this work, but apparently don't.

Why Opensourcing Swing Won’t Fix HTML

June 9th, 2006

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.

So why hasn't it happened? Because everyone wants someone else to fix the problem. Rendering HTML is hard, it's a very complex standard and real-world usage makes it even more difficult. Opensourcing Swing won't make the task any easier and it won't suddenly bring a whole bunch of talented developers out of the woodwork that are happy to commit their time to fixing HTML support. If there were developers like that out there, they'd be working on Mustang right now - or more likely, would have been working on a replacement HTML renderer/editor for Swing way back.

Many companies have taken up this challenge, in the comments Patrick Wright mentions WebRenderer, the company I work for, Ephox, has written a better HTML editor based on the Swing text APIs and there are plenty of others out there.

Opensource isn't some magical solution to developing software - it doesn't make hard tasks suddenly simple, it doesn't suddenly get the whole world working for you to develop your every whim. Opensource has its advantages but it isn't the solution to a lack of developers to work on things. Even if you do get external developers working for free, you'll probably spend just as much time building and managing the community as you would have doing the work. Opensource is great, it provides a huge range of benefits, just don't expect it to magically do your work for you.

Relearning To Close Windows

June 9th, 2006

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.

Whether or not you should be able to close windows by double clicking the top left corner isnt' really important, what matters is that the interface behaves consistently and doesn't surprise users.

Andy Invoked The Magic E Word

June 9th, 2006

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!

Well hope you've got it worked out Andy because you invoked the magic E word and turned up in my Ephox watch RSS feed.

So for all those that know Andy and didn't know he had or blog or just for those Ephox engineer groupies I'm sure hang out around here, go subscribe to Andy's blog.

I’ll Tell You Where You Can Drag Your Icon…

June 8th, 2006

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:

Messenger Install Screenshot

I normally have my sidebar showing so it would have been easy for me to just drag it to my Applications folder - except that Microsoft went out of their way to make it difficult. It gets worse though, some installers go to the effort of using carefully laid out folders, icons or background images so that they can provide instructions to drag to that magical Applications folder which has been so carefully hidden. For example, Camino:

caminoInstall.png

There is one shining beacon of hope in all this idiocy though - Adium has finally cottoned on to the idea that to be able to drag something to your Applications directory, you need to be able to see it. I particularly like the abstract images that provide instructions - drag the pointy circle to the folder marked A, then drag the footstool with the same pointy circle mark to the whole marked with a triangle and a rectangle. They've included a symlink to your Applications folder right there in the disk image - drag adium to that and it's installed. No mess, no fuss. Oh and really simple graphics to show what to do, accompanied by actual text explaining the process as well.

adiumInstaller.png

Other suitable solutions are to just leave my windows the way I want them, like NetNewsWire does. Just don't assume that your careful layout of files will still work, like HamachiX does:

hamachiXInstall.png

That just looks crap. It should have looked like:

hamachiXIntended.png

Another fine example of giving instructions and going out of your way to make them difficult to follow.