Creating a “personal curriculum” podcast with del.icio.us

Posted in Small Projects with tags , on July 24, 2008 by hugman

At my current client, I have found myself throwing out a number of links at people. I often do this, but more recently, I’ve begun passing links to my del.icio.us account, appropriately segmented by tag or tags.

For instance, at a certain point in almost every project involving a UI, there’s usually a hunt for set of good icons.

Of course, none of this is news worthy, Jon Udell was here l o n g before me.

What was a revelation to me was trying to work out how to get the series of random mp3s I was recommended to listen to on to my iPod. While researching the Jon Udell link, I found someone else was here long before me too. Though we came up with different refinements, we both used the same idea.

Both of us use the special system:filetype:mp3 tag that del.icio.us has.

My own special refinement is making the publishing slightly neater – the colons in the URL seem ugly, and I’m not quite sure how iTunes deals with podcasts that haven’t got their special extensions.

Passing the desired feed through feedburner’s SmartCast service cleans up the URL and puts the silly iTunes enclosures in, so you don’t have to.

So now, I’ve got a mechanism to get the dispersed mp3 files that I recommend straight into your iPod, without too much fuss for you, dear podcast listener. And I can do the same for people recommending mp3s for me.

This gives a tidier frontend to the podcast; but I have found that the generation of these del.icio.us entries has been a pain.

Pascal van Hecke’s method, above, concentrates on this very problem. I haven’t tried it (not using firefox on this machine), but I’m looking for a “bookmark this link with the data from this page” type functionality.

If I can get this production workflow going more smoothly, I shall be adding to my own personal curriculum more frequently.

The best RSS reader in the world.

Posted in Uncategorized with tags on June 11, 2008 by hugman

I’ve been using Firefox since it was Phoenix. It was lightweight and speedy, but didn’t have the ads that Opera had in its top right hand corner. The nascent ecosystem of extensions looked much more vibrant than Opera’s. And you could do real ad blockng.

I was a relatively late starter to RSS, but when it came to selecting a client, the plethora of web clients weren’t around yet.The dominant paradigm was RSS was like a newsgroup, and to be presented in an email client.

This didn’t make sense to me, so when I found Sage, I thought I had something that fit. Sage turned out to be exactly what I needed – a way to read slashdot stories and comments without all that green and white. Right from the browser. Being in the browser informed my understanding of what RSS, and later Atom, was.

But more than that. Sage was exactly in the place I wanted it – a tab of my browser, and didn’t get in the way of what I was doing.

I’ve been with Sage every since. Not for me the alure of Google Reader. Say no to RSSOwl.

So it was with great sadness when I found that Sage wouldn’t work after I upgraded to Firefox 3.0. The original developers seemed to have died or lost interest in the add-on, so there seemed like no choice but to find a replacement.

In my stumblings, I tried some others, Brief came close, but suffered the same incompatibility after version 3.0rc2.

I looked again at email type readers, but found it jarring that the RSS item just reloads the permalink as the item body.All the content, including ads, from the web page, but in my email client.

I tried, without success, to make do with Live Bookmarks, which I’ve never felt quite cut it.

There was nothing for it, I was going to have to have to scratch that itch. I really didn’t want to, it’s not like I didn’t already have a pile of other projects I wanted to do.

It’d be a better use of time to adapt. Either adapt the existing code, or continue with the default path of adapting myself to another client. I was resigned.

So it was with great gratitude I came across a project which was to become Sage Too. Mike Kroger has picked up the source of the abandoned Sage project, and adapted it to the new Places infrastructure in Firefox 3. A few other people joined in, and started adding features, and bugfixing, and general polish.

Today they hit their Version 1.0.0. It started as a straight port of the old Sage, but has added a whole slew of extra features.

Congratulations to the Sage Too team.The web is a better place than it was before.

You can install the addon from here.

Processing Layers

Posted in Small Projects with tags , on May 20, 2008 by hugman

I’ve been really interested watching the success of John Ressig’s Processing.js.

So much so, it’s inspired me to dust off and release a small processing project which didn’t really have a place in life. I call it Processing Layers.

The Problem

Processing is a domain specific language based on Java. It contains a lot of Java idioms, including packages, objects and classes.

However, it is also aimed at non programmers.

The programming model is contained in a separate IDE, and re-use is only through using libraries.

Sketches are supposed to self-contained, and are not really designed to be re-used.

But, suppose you have a particular favourite way of setting up a sketch, or you’ve crafted a nice lighting configuration so you can drag around the light source with your mouse. Or you’ve got a nice head-up display with the debug information that you find useful. And now you want to use it again in another sketch.

The only way at present is to add a new library, or just copy/paste the code into a new sketch.

A Solution

Enter Layers. This small project is designed to try and re-use sketches. You can download it from here.

This is what layers are for. They are supposed to make re-use of existing sketches easier. Each sketch you already have can be decomposed into one or more layers.

With a handful of layers, making new sketches should become easier: you can compose most of the functionality using a stack of layers, and then add any remaining functionality with a new layer.


The screenshots here show layers derived from the Directional demo and RGB Cube.
But the coolest thing is that the user can toggle each layer on and off at runtime.

Discussion

Any one familiar with the GOF Design Patterns will recognise this pattern.

This is composition over inheritance. Layers are a proxy for PApplet, which pass simply pass through any calls by the layer to the real PApplet.

The PApplet works in the same way it always has, but the sketch – MultiLayerPApplet – is a reusable base class which
• collects Layers
• for each method that the user can implement, simply iterate through each layer, calling the corresponding method.

This is really just a special case of composite pattern – special in that the class that inherits from PApplet isn’t a layer, so you can’t add an instance to itself; I suppose that makes it not really a composite – you can only add leaf nodes to the composite node.

Caveats

So, is this interesting? Maybe.

Is it useful? Currently, in its current form you need to be developing Processing in Java mode.

Difficult to compile

Processing compiles its source code into Java source code, before using the Jikes Java compiler into Java bytecode.

One of the transformations is to wrap the source code in a class definition, which ends in “extends PApplet“. For example the first line of LayerOne.pde sketch compiles to a class which starts:

public class LayerOne extends PApplet

To use LayerOne as a Layer, it should inherit from Layer, and then be added to the a MultiLayerPApplet.

Difficult to run

Processing sketches can be deployed as an applet. However, in its current form, layers can’t be deployed in the same way.

I’ve provided a small application to make it at least usable in your own development.

Extensions

  • Is this possible to do as a processing library?
  • Could layering be a viable extension mechanism? What would layer development look like?
  • If this is interesting enough and can’t be added as a library, how easy would it be to make the core use it?

Technorati tags: ,

Follow

Get every new post delivered to your Inbox.