this is aaronland

Feed me, Princess Cake!

Reason over passion

Needless to say, no one is talking nor dreaming about sovereignty now. The only thing that really matters is winning the Stanley Cup, so much so that if there was a referendum tomorrow giving Quebecers a choice between the Cup or sovereignty, a devastating majority would go for the Cup.

Nathalie Petrowski

e(r)dfg-writer

I have written a web-based interface for creating e(r)dfg recipes, offline. Ingredients, directions, etc. are entered in to a standard HTML form and, when submitted, are converted into RDF/N3 and displayed in the browser window (hiding the original form).

When I started, I had three goals in mind. That the application should be able to :

  1. Work in any browser with JS/CSS — It doesn't. It works fine in Mozilla and Opera but not in Safari or Internet Explorer (yet).
  2. Work on my 770 — Screen-size and minor layout issues aside, it does.
  3. Save to disk — Nope. Not even a little bit. There is presently no way to write to disk in JavaScript without relying on some sort of not-on-by-default extension. If you use the browser's Save As menu option, Mozilla will save the (formatted) contents of the recipe along with the form itself. Opera will save only the empty form.

I wanted to see if it made creating recipes easier and to see where the pain was (is) at the code level. The overall success of the project, at this point, is debatable.

For simple recipes it is a pretty useful tool in that you can quickly enter, or copy and paste, most of information. The ingredients list is, and will always be, a nuisance. If identifying the relevant parts of individual ingredients weren't important we could get away with paragraphs and unordered lists (which is what every other recipe site on the Internet does) call it a microformat and go home.

I remember reading somewhere that Recipezaar (authors of the infamous RecipeML format whose creation was the motivation behind my own Eatdrinkfeelgood format) spent a lot of time and energy trying to solve this problem by letting users enter ingredients free-form and then tackling the meaning using natural language processing. Good on them!, I say, but since they have a commercial interest in not sharing that magic it is just another lock-in. Even if it weren't I still have concerns that watching and accounting for the edge-case is a never-ending battle and, ultimately, a waste of time. (To be fair, I also said the same thing about using RDF for recipes.)

Adding ingredients, from scratch (that is : not from a copy-and-paste-able source) is not so bad. It's easy enough to tab through the various fields and adding magic type-ahead capabilities to try an guess what you're writing would be a helpful addition.

Adding ingredients from a recipe that is found on the Internet is not so much fun. It involves a lot of switching between windows, copying and then pasting small pieces of text or copying some parts of a text and remembering the rest and then a very involved keyboard dance to get everything into the various form fields.

I don't typically think of needing a scratch-box with web forms but that is probably what is needed in this case. A scratch-box would simply be a large-ish text input box where you could copy and paste chunks of text, so that it is visible in the context of the form itself. This would allow you to :

I will probably focus on the first and third options while someone with more time and money and brain-power will do the second and reap all the fame and glory.

I try to remind myself that this is okay. I tried to remind myself of that when I saw Google's very clever recipe hack.

Meanwhile : Request for Feedback - Structured Recipes...

Patches for Lightbox JS 2.0

I've patched Lightbox JS 2.0 so that the larger images will link to remote URLs. This is good if for no other reason than it means you can use the script with images from Flickr and not violate the site's terms of service.