Tweets

Follow @pietrosperoni (592 followers)

Categories

Hierarchical Delicious Free Mind Map

So, I just modified the deli.mind script, originally from brownhen.
The original would take the public bookmark from delicious and make a free mind map out of them.

(For those who have no time to read the whole post, I immediatly tell you that I modified the code. The new code can be found here, and an example is here -open some nodes to see the difference!-).

The program is written in python, and I wasn’t very happy with the result. I mean it was great to have the map, but at the same time I have so many tags, that it was pretty much useless. Now the fact is that we tend to reuse tags that we have already used. This generates a positive feedback dynamic, that tends to create a bunch of very common tags (even among your own tags) and many many tags used only one or two times. I bet you could also plot them into a nice power law picture (but, alas, you need at least 1000 tags, to make it statistically meaningful!). This is generally true, but is particularly true for people who, like me, tend to store each link with around 10 different tags. This means that this long list of tags, that was using up my screen, was mainly composed of completely unimportant tags, with only few interesting among them.

Not only this, but some tags, tend to appear only in conjunction with other tags. For example, the tag “python” comes always with the tag “programming”. In a sense it is a “sub tag”.

Oops, are we back into hierarchy, aren’t we?

Well, not exactly, first the same link can be present in different non hierachically related tags, and second two tags can have links in common, but not be completely hierarchically related (think about the tag ‘September11′ and ‘GeorgeBush’ as a good example). The last thing to note is that from time to time there are tags which have exactly the same links inside, either because they are synonimous (‘del.icio.us’ and ‘delicious’ for example) or because I had not stored enough links to differentiate between the two.

So the new program extracts the information about the relation among the tags, and uses it to build a more interesting mind map.

More precisly two tags can be:

  • Identical,
  • One inside the other,
  • Viceversa,
  • With a non empty intersection, but with some extra links,
  • Completely disjointed.

This information is then used to create the new mind map.

With the following novelties:

  • Sub tags are shown as a sub branch of their parent tag.
  • Tags that are equivalent are shown together with a little empty branch as their parent, to connect them all.
  • A sub tag can be sub tag to more than one tag.
  • Each tag also is followed by two numbers: # of links & # of sub tags.
    So you have an idea about how big is the tree you are going to explore.

Detail of a tag and its sub tagsYou can see my “hierarchical delicious free mind map” in java format here while the code is here.

I also fixed a couple of bugs. That would give some fake results. (i.e. being tagged as ‘socialsoftware’ does not mean being tagged as ‘war’, etc…)

This isn’t the end, I am planning to work on this some more, when I have time.

Disclaimer: This was also my first tentative hack in python. So I am sure I did plenty of things in a clumsy, slow and redundant way. But I am learning.

Acknowledgment: I am very grateful to brownhen., because if he didn’t release the first version of the script I would not have started at all.

Please Ban Me!

I can’t believe how stupid I can be. I think I surpassed myself this time. I was playing with my new toy the blog setting, and I was trying to get it to append an rss of the category at the end of each category page. So I needed an image of the little rss red button. You know the one that appears like this: RSS. I remembered that del.icio.us had it, so I went forward to steal it lend it. But as I went and right clicked on the picture the menu did not list the option save picture as. Uh?
I went to check out the code, thnking: what the hell are they doing here?

I could not find and <img ...> at all. What I found instead was a link to
<a href="/PleaseBanMe//%username%"><span></span></a>

Ok, you already have understood what I did.

I wanted to try the link out… and I did not even logged out before. Well, now I can assure you, the link works, and I was banned for 30 minutes. I can imagine Joshua laughing at all the people who ban themselves.

Still thinking about the rss image? Well, it was not an image at all, but a carefully crafted text:
<span style="font-family: verdana, sans-serif;
font-size: 10px;
font-weight:bold;
text-decoration:none;
color: white;
background-color: #F60;
border:1px solid;
border-color: #FC9 #630 #330 #F96;
padding:0px 3px 0px 3px;
margin:0px;">RSS</span>

Pietro