Skip to main content

Posts

Showing posts from 2009

Running the iTunes genre tagger script with OS X Automator

Due to public demand here's a little recipe how to run last post's mp3 tagger without using the command line on OS X:
Open AutomatorStart a new "Application" projectDrag the "Run Shell Script" action into the right workflow panel, set the "pass input" drop-down to "as arguments" and edit the script to (see screenshot below):for f in "$@"
do
/opt/local/bin/python /Users/michaelmarth/Development/Code/mp3tagger/tag_groupings.py -d "$f"
done

(you will have to adapt the paths to your local setup)
Save the application and happily start dropping mp3 folders onto the application's icon.

Python script to set genre in iTunes with Last.fm tags

Now that I have started to seriously use iTunes I figured it might be nice to have the genre tag set in a meaningful way. Since I have a reasonably large collection of mp3s doing that manually was out of question - I wrote me a Python script to do that. There seems to be a large demand for such a functionality (at least I found a lot of questions on how to automatically set the genre tag) so maybe someone else finds the script useful. It is pasted below.

General Strategy

The basic idea is to use Last.fm's tags for genre tagging. In iTunes the genre tag is IMO best used when it only contains one single genre, i.e. something like "Electronica", not something like "Electronica / Dance". On the other hand dropping all but one tag would lose a lot of information, so I decided to use the groupings tag for additional information that is contained in the list of tags that an artist has on Last.fm. In the example above that would be something like "Electronica, Dance…

Colayer's approach to collaboration software

Chances are you have not heard of Colayer, a Swiss-Indian company producing a SaaS-based collaboration software. I did a small project with the guys, that is how I got to know. When I first saw their product I immediately thought the guys are onto something good, so it is worthwhile to share a bit of their application concepts. They follow an approach I have not seen anywhere else.

On first look Colayer seems to be a mixture between wikis and forums: the logical data structure resembles a hierarchical web-based forum and the forum entries are editable and versioned like in a wiki. But there is more: presence and real-time. All users that are currently logged in are visible and one can have real-time chats within the context of the page one is in or see updates to the page in real-time (similar as in Google Docs). These chats are treated as atomic page elements (called sems in Colayer parlance) just like the forum entries or other texts. Through this mechanism, all communication around …

Found out about FlexEvent.UPDATE_COMPLETE

Here is a small bit about the asynchronous nature of the Flex layout mechanisms that I learned while slapping together a presales demo yesterday:

When changing properties of UIComponents listen for FlexEvent.UPDATE_COMPLETE events. They get fired when the change is actually done. In my case I needed to get the textWidth of a Label after changing the label text. Right after calling the setter of text the getter of textWidth will still return the old value.

[Some background reading]

Ruby script for generating Google sitemaps

I just wrote a small Ruby script to generate a Google sitemap out of file directory. I thought that it might come handy as a quick start for someone, so here is the code (requires the builder gem)

require 'builder'
htmlfiles = Dir.glob("*.html")
x = Builder::XmlMarkup.new(:target => $stdout, :indent => 1)
x.instruct!
x.urlset( "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" ) {
for file in htmlfiles do
x.url{x.loc "http://www.example.com/#{file}"; x.lastmod "2009-09-17"; x.changefreq "monthly"; x.priority "0.8"}
end
}

NoSQL: A long-time relation(ship) comes to an end

(cross-posting from here)

OK, I admit it, declaring that "the RDBMS is dead" is a meme that has been going around the software industry for a while. Remember object-oriented data bases that were supposed to replace the relational ones? Well, guess who is still here. However, despite the RDBMS's amazing survival skills I would like to propose a related prediction:

I believe that the year 2009 will go down in history as the year when the "relational model default" ended. The term "relational model default" was coined by me to describe a peculiar thing that goes on in application development: start talking to your average application developer about some arbitrary business requirement and chances are that simultaneously he mentally constructs a relational model to fit those requirements.
That relational approach to modeling your problem may or may not be suitable. The real problem is that all too often this default does not get challenged. As a consequence,…

Jazoon talk on "Scalable Agile Web Development"

On Thursday, I will give a talk at the Jazoon conference in Zurich. It will be about Apache Sling, the web framework for content-centric applications. The agenda is:

Scalable Agile Web Development: REST meets JCR meets OSGI

This session is a very hands-on lab that shows how a real web application is developed from scratch in a very agile fashion leveraging a heavy-weight enterprise ready back-end yet allowing for unprecedented agility in development in building rest-style web applications. Thinking of a classic j2ee stack this may sound like a contradiction.

Agility of development begins with the amount of tooling and setup we need to get started, so expect to see the entire walk-through from installation of the server software to the development of a complete application within the time constraints of the session.

Agenda:
(1) Web architecture, think outside the box.
(2) Meet: apache sling.
(3) Building a real-life webapp from scratch.

The full conference agenda is here. I shall also help Mic…

CMIS Technical Committee

It has been a while since I have been on a standards committee (the last one was OMTP), but I have now joined the Technical Committee of CMIS: Content Management Interoperability Services. Better interop is certainly something the CMS world is in dire need of.

minimeme.org says: Hello world!

Today, I am happy to announce that minimeme.org is finally "officially" going live. minimeme is a news aggregator focused on tech and software development news.

minimeme was born out of a personal frustration of mine: each morning I would skim through my feed reader only to find the relevant items twice or more times. On the other hand the signal to noise ratio of many feeds was way too low. I felt like a machine trying to retrieve the important items. So I decided to build a machine to do that for me.

There is no human intervention in the news selection - it is all done in a bias-free, neutral algorithm. Hence there is the claim "little Switzerland of tech news", minimeme is supposed to be neutral like Switzerland.

Having tested the algorithm for a couple of months I believe minimeme is now stable enough to be officially let loose. On top of the two currently implemented sections "dev" (feed) and "valley" (feed) there is a Twitter account you migh…

The Lifetime of a CMS Installation

(cross-posting from here)CMS analyst Janus Boye has blogged about the expected lifetime of a CMS installation, i.e. for how long an installed CMS can be expected to be in production. His guess is a lifetime of 3 years. On the blog's comments Janus and I got into a discussion about the accuracy of that guess where he asked Day to publish actual real data about this topic.

I like this idea because publishing this data provides a benefit to our potential new customers: a reliable indicator (without any hand-waving or gut feelings) of the CMS's lifetime that can be used in business plan
The dataThe data I have used is taken from Day's support contracts. Only customer data from outside ouf Europe was used (simply because it was available to me). This selection is likely to bias the results towards shorter lifetimes as Day's oldest customers are based in Europe. The basic assumption is that the life time of the CMS is equivalent to the duration of the support contract. The use…

The misuse of the term "RESTful" in the Rails community

Today I went to a talk at the local Ruby on Rails group. The speaker was quite clueful. He had even implemented his own DSL to describe his business problem. Obviously, the guy was not a noobie in Ruby.

However, what really turned me off was his usage of the word "RESTful". For him, it seemed to be a way to describe the inner workings of his application, like, say, "separation of concerns". RoR guys are generally not the most clueless people, but nobody in the audience challenged him about this. It seemed to be the generally accepted usage of the term in the Rails community.

This made me think that DHH and Rails have done two things to REST:
First, they greatly help to evangelize the term "RESTful"Second, they hijacked the meaning of the term and changed it from "architectural style" to "application architecture"As it happens I listened to a podcast from the Pragmatic Programmers on my way home. It was about the .Net Ruby implementation a…

Microformat rel-tags are a broken spec

In my current pet project I do a fair amount of parsing of rel-tags (the microformat spec for "tagging"). At first I got a bit agitated how many occurrences there are where the spec is not implemented correctly. But I have come to realize that the spec is simply broken. There are two ways I can think of a spec to be broken:
If it's internally inconsistent or inconsistent with other specs.If it's somehow useless.The rel-tag is almost 1.), which makes it a little bit of 2.). Here's why: the spec says that this tag
<a href="http://technorati.com/tag/tech" rel="tag">fish</a>denotes "tech" rather than "fish." This means that this microformat restricts the URL space on your server. You need to have the "tag" folder and in it there must be a file "tech" - unless you link to another site which is not a solution to the problem.
Being able to control my own URL space is one of the pronciples of the web. T…