Monday, November 04, 2002


Improving Radio's Story Shortcut Automation, is a story created using Radio's outliner (i.e. it is an OPML file). Radio does not automatically create shortcuts for such stories (only for stories created through the browser-based desktop). However, the link above was built from an automatically generated shortcut. The solution, outlined in the story above, works for category-specific stories as well.
4:52:50 PM    Google It!  

I like Radio's shortcuts feature. Actually, it is not so much the screen within Radio that I like as the ability to use shortcuts when I write. Some time back Userland added a feature to Radio that automatically creates shortcuts for stories. However, this only works if you create the stories through Radio's browser-based desktop. It does not work if you create your stories in some other way (from Radio's outliner or some other text editor, for example). I would like to have Radio automatically create shortcuts for all of my stories, no matter how they were created.

I think the best way to do this is to use Radio's callback mechanism to detect when a story has been rendered and then use the story's title to create (or update) a shortcut. Radio provides two candidate callbacks for this task, but I am not yet sure which I want to use. user.radio.callbacks.upstream gets called with a list of files that have changed and are about to be upstreamed to the server. user.radio.callbacks.upstreamFileRendered gets called after a file has been rendered (and is now elgible for upstreaming). The former callback would require me to loop through all of the files to see if any of them are stories from which I should create a callback. On finding one, I would have to open it, read the text (or OPML), and look for a #title attribute. This all sounds pretty inefficient. The latter sounds easier because it provides the callback script with the text (HTML) that has been rendered. The downside is that I cannot easily tell if the file represents a story or not.

A third solution presents itself! I could handle this in the same way I did metatags. The advantages are a) I can easily ensure that I am only adding shortcuts for stories; b) it is fast and efficient. The disadvantage is that I must update the #template.txt file with a new macro that "automatically" creates the shortcut.
11:17:30 AM      


Although John Lam's article is about code generation, he nicely summarizes my feelings on the use of Object-Oriented Programming.
... Some folks motivate OOP as a code reuse technology, others motivate OOP as a mechanism for building abstractions. I think that today, most OOP practitioners would agree that it is really about building abstractions that let you visualize the problem more clearly. Not many people would claim today that they have seen significant code reuse opportunities arising out of their use of OOP.

9:30:43 AM    Google It!  

It looks like a new release of Zoe was posted this morning. It looks interesting - first because I am hopeful it will fix my currently broken Zoe UI and second because it provides an XML-RPC interface. That is exciting. However, it is an alpha release; I think I will wait at least a few days for others to try it out first.
9:04:37 AM    Google It!