Wednesday Apr 29, 2009

Adding twitter to my blog using Scala

Having added javascript widgets to my blog a few months ago, I found that this slowed the page downloads a lot. Here is a way to speed this up again, by pre-processing the work with a Scala script, and using iFrames to include the result.

Here are the short steps to do this:

  1. I wrote a Scala Program (see source) to take the twitter Atom feed, and generate xhtml from it.
  2. I wrote a shell script to run the compiled scala jar
    export CP=$HOME/java/scala/lib/scala-library.jar:$HOME/java/scala/lib/learning.jar
    /usr/bin/java -cp $CP learning.BlogIFrame $\*
  3. Then I just started a cron job on my unix server to process the script every half an hour
    $ crontab -l
    5,36 \* \* \* \* $HOME/bin/ $HOME/htdocs/tmp/
  4. Finally I added the iFrame to my blog here pointing to the produced html <IFRAME src="" height="300" frameborder="0"></IFRAME>

As a result there is a lot less load on the twitter server - it only has to serve one atom feed every half an hour instead of 1000 or so a day - and my html blog page does not stall if the twitter site itself is overloaded.

Also I learnt a lot about Scala by doing this little exercise.

Saturday Dec 13, 2008

Typealizer: analyzing your personality through your blog

illustration of the scientist Thanks to Mark Dixon I discovered Typealizer, a service that reads your blog and finds your psychological type. So of course I tried it on my own blog, as you will on yours shortly :-) . This is what it had to say:

INTJ - The Scientists

The long-range thinking and individualistic type. They are especially good at looking at almost anything and figuring out a way of improving it - often with a highly creative and imaginative touch. They are intellectually curious and daring, but might be pshysically hesitant to try new things.

The Scientists enjoy theoretical work that allows them to use their strong minds and bold creativity. Since they tend to be so abstract and theoretical in their communication they often have a problem communcating their visions to other people and need to learn patience and use conrete examples. Since they are extremly good at concentrating they often have no trouble working alone.

Well that not bad for flattery. So I reward them with this blog post.

They accompany their analysis with a brain activity diagram. This is the one I got:

Brain activity diagram for main blog

illustration of the travel category There is a lot in the cross section intuition and thinking, with some but not a lot of positioning in the practical. So being all happily scientifical I decided to try out what it would say if I pointed Typealiser to the Travel category on this blog. This is what it has to say on that aspect of my personality, perhaps it is true, a little in retreat recently.

ESTP - The Doers

The active and play-ful type. They are especially attuned to people and things around them and often full of energy, talking, joking and engaging in physical out-door activities.

The Doers are happiest with action-filled work which craves their full attention and focus. They might be very impulsive and more keen on starting something new than following it through. They might have a problem with sitting still or remaining inactive for any period of time.

This also came with a brain activity diagram for that part of the blog

So clearly a lot more biased towards action, as a travel blog should.

Still both of these blogs are not allowing me to capture around half of my brain activity. The spiritual idealistic side is not very visible. I wonder if that means I should speak more about open source and linux? ;-) I tried the Art category of my blog but that did not move me more to the feeling type, nor did the philosophy section make me more idealistic, just again more of a thinker, which they characterise like this:

INTP - The Thinkers

The logical and analytical type. They are espescially attuned to difficult creative and intellectual challenges and always look for something more complex to dig into. They are great at finding subtle connections between things and imagine far-reaching implications.

They enjoy working with complex things using a lot of concepts and imaginative models of reality. Since they are not very good at seeing and understanding the needs of other people, they might come across as arrogant, impatient and insensitive to people that need some time to understand what they are talking about.

Now what could be interesting would be some way then to do the inverse search. Find out what your brains activity diagram should look like, and ask to find blogs that fit those categories, which one could then use as a guide to help one develop that aspect of one's personality - or find a partner :-)

Ps. a thought: after categorizing people into 16 different groups this still leave you with 8 billion people/16 = 500 million people to chose from and if every person just had 1000 web pages that would leave you with half a trillion pages to look at. So this character analysis can be useful, but there still has to be a lot of other criteria to make a good judgement call.

PPS. Oddly enough - or not - Ken Wilber's blog is categorised as being of the "executive type".

Sunday Nov 30, 2008

personalising my blog

image of the sidebar of my blog

Those who read me via news feeds (I wonder how many those are), may not have seen the recent additions I have made to my blog pages. I have added a view onto:

This is quite a lot of personal info. With my friend of a friend network it should be clear how you have more and more of the type of information you could find in social networking sites such as facebook on my blog. And this could keep growing of course.

The current personalization is mostly powered by JavaScript (with one flash application for ). Here is the code I added to my blog template, pieces of which I found here and there on the web, often in templates provided by the web services themselves.

 <h2>Recent Photos</h2><!-- see -->
    <div id="flickr"><script type="text/javascript" 
    <div class="recentposts">
     <script type="text/javascript" 
    <div id="twitter_div" class="recentposts">
    <a href="">last 5 entries:</a><br/>
<ul id="twitter_update_list"></ul>
<script src="" type="text/javascript"></script>
<script src="" type="text/javascript">
  <h2>Listening To</h2>
<!-- I am looking for something lighter than this! -->
<style type="text/css">table.lfmWidgetchart_0bbc5b054e26d39362c0a10c7761f484 td 
  {margin:0 !important;padding:0 !important;border:0 !important;}
 table.lfmWidgetchart_0bbc5b054e26d39362c0a10c7761f484 tr.lfmHead 
     no-repeat 0 0 !important;}
 table.lfmWidgetchart_0bbc5b054e26d39362c0a10c7761f484 tr.lfmEmbed object {float:left;}
 table.lfmWidgetchart_0bbc5b054e26d39362c0a10c7761f484 tr.lfmFoot td.lfmConfig a:hover 
    {background:url( no-repeat 0px 0 !important;;}
 table.lfmWidgetchart_0bbc5b054e26d39362c0a10c7761f484 tr.lfmFoot td.lfmView a:hover 
    {background:url( no-repeat -85px 0 !important;}
 table.lfmWidgetchart_0bbc5b054e26d39362c0a10c7761f484 tr.lfmFoot td.lfmPopup a:hover 
    {background:url( no-repeat -159px 0 !important;}
<table class="lfmWidgetchart_0bbc5b054e26d39362c0a10c7761f484" cellpadding="0" cellspacing="0" border="0" 
   style="width:184px;"><tr class="lfmHead">
   <td><a title="bblfish: Recently Listened Tracks" href="" target="_blank" 
         no-repeat 0 -20px;text-decoration:none;border:0;">
   <tr class="lfmEmbed"><td>
   <object type="application/x-shockwave-flash" data="" 
     id="lfmEmbed_210272050" width="184" height="199"> 
   <param name="movie" value="" /> 
  <param name="flashvars" value="type=recenttracks&user=bblfish&theme=blue&lang=en&widget_id=chart_0bbc5b054e26d39362c0a10c7761f484" /> 
   <param name="allowScriptAccess" value="always" /> 
    <param name="allowNetworking" value="all" /> 
    <param name="allowFullScreen" value="true" /> 
    <param name="quality" value="high" /> <param name="bgcolor" value="6598cd" /> 
    <param name="wmode" value="transparent" /> <param name="menu" value="true" /> 
    </object></td></tr><tr class="lfmFoot">
    <td style="background:url( repeat-x 0 0;text-align:right;">
    <table cellspacing="0" cellpadding="0" border="0" style="width:184px;">
    <tr><td class="lfmConfig">
   <a href="" 
    title="Get your own widget" target="_blank" 
          no-repeat 0px -20px;text-decoration:none;border:0;">
    </a></td><td class="lfmView" 
    <a href="" title="View bblfish's profile" 
     target="_blank" style="display:block;overflow:hidden;width:74px;height:20px;background:url(
        no-repeat -85px -20px;text-decoration:none;border:0;">
    </td><td class="lfmPopup"
    <a href="" 
       title="Load this chart in a pop up" 
             no-repeat -159px -20px;text-decoration:none;border:0;" 
       onclick=" + '&resize=0','lfm_popup','height=299,width=234,resizable=yes,scrollbars=yes'); return false;"

So that as you can see is quite a lot of extra html every time someone wants to download my web page. This would not be too bad, but the above javascript widgets themselves go and fetch a lot of html, javascript, code and other content to further slow down the responsiveness of the web pages. This data is served to everyone whether they want to see all that information or not. Well, if they don't they can subscribe to the rss feed by dragging this page into a feed reader. In which case they will just see the blog posts themselves, and not the sidebar.

Why add this information to my blog? Well it gives people an idea of where they can find out more about me. A lot of people don't know that I have a feed, so they may not know that they can follow what I am reading over there. This gives the initial feeling of what it would be like to have a deeper view on my activities.

But as mentioned previously, there are a few problems with this.

  • This makes this page heavier.
  • Every page view on my blog will download that information and start those applets. ( A great way for those services to track the number of people directly visiting these pages btw. )
  • This can become tedious. People who want to follow me can do so by coming to this web page from time. But with enough sites like that this is going to become a bit difficult to do. One does not want to spend all day reading the different feeds of information of one's friends. This is what Facebook does for people: it is a giant web based feed reader of social information.
  • Difficult to track change: If I switch to a different book marking service, perhaps a semantic one like faviki, I will have to redo this page, and all my friends are going to have to update their feeds.
  • If I add more of the resources I am working on this page is going to become unmaintainably long
  • People who read my feed will not notice the changes occurring here.

So those are the problems that Web 3.0, the semantic web is going to solve. By just downloading my foaf file, you should have access to my network of friends via linked data, and via pointers to all the other resources on the web that I may be using. Whatever tool you use will be able to then keep all this data easily up to date, and with great search tools, enhance your view of the many linked networks you will be part of and tracking.

The whole code you see above could then be replaced with one link to my foaf file. That foaf file can itself be point to further resources in case it becomes large. To give a list of some of my the most interesting accounts I have I added the following N3 to my foaf file today:

@prefix : <> .
@prefix foaf: <> .
@prefix rdfs: <> .

:me foaf:holdsAccount 
              [ a foaf:OnlineAccount ;
                rdfs:label "Henry Story's skype account"@en;
                foaf:accountName "bblfish";
                foaf:accountServiceHomepage <>
              [ a foaf:OnlineAccount ;
                rdfs:label "Henry Story's flickr pictures account"@en;
                foaf:accountName "bblfish";
                foaf:accountServiceHomepage <>
                foaf:accountProfilePage <>
              [ a foaf:OnlineAccount ;
                rdfs:label "Henry Story's music account"@en;
                foaf:accountName "bblfish";
                foaf:accountServiceHomepage <>
                foaf:accountProfilePage <>
              [ a foaf:OnlineAccount ;
                rdfs:label "Henry Story's delicious bookmarking account"@en;
                foaf:accountName "bblfish";
                foaf:accountServiceHomepage <>
                foaf:accountProfilePage <>
              [ a foaf:OnlineAccount ;
                rdfs:label "Henry Story's developer account"@en;
                foaf:accountName "bblfish";
                foaf:accountServiceHomepage <>
              [ a foaf:OnlineAccount ;
                rdfs:label "Henry Story's twitter micro blogging account"@en;
                foaf:accountName "bblfish";
                foaf:accountServiceHomepage <>
                foaf:accountProfilePage <>
              [ a foaf:OnlineAccount ;
                rdfs:label "Henry Story's twine semantic aggregation account"@en;
                foaf:accountName "bblfish";
                foaf:accountServiceHomepage <>
                foaf:accountProfilePage <>
              [ a foaf:OnlineAccount ;
                rdfs:label "Henry Story's facebook social networking account"@en;
                foaf:accountName "bblfish";
                foaf:accountServiceHomepage <>
              [ a foaf:OnlineAccount ;
                rdfs:label "Henry Story's linked in business social network account"@en;
                foaf:accountName "bblfish";
                foaf:accountServiceHomepage <>
                foaf:accountProfilePage <>
              ] .

First of all it should be clear that the above is a lot more readable that the javascript code shown earlier in this post. Secondly I listed over twice as many online accounts there than I currently have in my side bar. And finally this is in a file that a client would not need to download unless it had an interest in knowing more about me. This could easily be cached over a period of time, and need not be served up again on each page request.

Again for one possible view on the above data it is worth installing the Tabulator Firefox extension and then clicking on my foaf icon. There are of course many more things specialized software could do with that infomation than present it like that.

On this topic, you may want to continue by looking at the recently published, excellent and beautiful presentation on the subject of the Social Semantic Web, by John Breslin.

variation on @timoreilly: hyperdata is the new intel outside

Context: Tim O'Reilly said "Data is the new Intel Inside".

Recently in a post "Why I love Twitter":

What's different, of course, is that Twitter isn't just a protocol. It's also a database. And that's the old secret of Web 2.0, Data is the Intel Inside. That means that they can let go of controlling the interface. The more other people build on Twitter, the better their position becomes.

The meme was launched in the well known "What is Web 2.0" paper in the section entitled "Data is the next Intel Inside"

Applications are increasingly data-driven. Therefore: For competitive advantage, seek to own a unique, hard-to-recreate source of data.

Most of the data is outside your database. It can only be that way, the world is huge, and you are just one small link in the human chain. Linking that data is knowledge and value creation. Hyperdata is the foundation of Web 3.0.

Thursday Aug 28, 2008

picture of my blog

picture from

Wordle is a fun little Java applet that analyses your blog and builds any number of beautiful word clouds from the content. It has started a movement I think.

Just a pity that one cannot embed the applet in one's own web page. That would make it dynamic and a lot more interesting. Perhaps that will come. At present it seems the author is not sure what the IBM lawyers have decided.

This is somewhat similar to the graphic app I mentioned previously though with somewhat more content, clearly. Long term readers of my blog may find the picture of my blog to not be such a good reflection of my interests though. Statistic analysis of words does not get you that far.

Wednesday Aug 27, 2008

my blog is worth $49,114.98

According to Dan Carlson's program my blog is worth 49thousand dollars. That's nothing next to Tim Bray's who's coming up for 700thousand dollars. Of course Dan Carlson is a big winner in all this, because everybody is linking to his site, so his just keeps growing. He is now at 2 million by his own estimate which has something to do with with some AOL deal a few years ago.

My blog is worth $49,114.98.
How much is your blog worth?

Now would I sell my blog for a new car?

As with a new car you'd have to be a bit careful how you sell your site. Tim Brays is worth $693,819.66 . But [notice the trailing slash] is worth $375,983.64 . So is Tim's site worth the sum of both, 1 million?

Thursday Jul 24, 2008

My Semantic Web BlogRoll

I have not had time to automate my blog roll publication yet. Here is the first step down that path. The following are the semantic web blogs I follow closely. I am sure I must be missing many others that are interesting. Though I already am way past the point of information overload. (For those in the same position here are some tips (via Danny))

AI3:::Adaptive Information - Atom
Mike Bergman on the semantic Web and structured Web
About the social semantic web - RSS
Web 2.0 - what's next?
Bnode - atom - RSS
Bob DuCharme's weblog, mostly on technology for representing and linking information.
Bill de hOra - atom
Bill de HOra's blog
captsolo weblog - RSS 1.0
CaptSolo weblog
connolly's blog - RSS
Dan Connolly's blog
Cloudlands - RSS
John Breslin's Blog
Daniel Lewis - RSS
A technological, personal, spiritual, and academic blog.
Dave Beckett - Journalblog - RSS 1.0
RDF and free software hacking
David Seth - RSS
Semantic Web &amp; my backyard - RSS
Richard Cyganiak's Weblog
Elastic Grid Blog - RSS
The ultimate blog about the Elastic Grid solution...
Elias Torres - RSS
I'm working on a tagline. I promise.
Inchoate Curmudgeon - RSS
I'm getting there. What's the rush? It's about the journey, right?
Internet Alchemy - RSS
Seeing the world through RDF goggles since 2007
Kashori - RSS
Kingsley Idehen's Blog Data Space - RSS atom
Data Space Endpoint for - Knowledge, Information, and Raw Data
Les petites cases - Fourre-tout personnel virtuel de Got - RSS
Lost Boy - RSS 1.0
A journal of no fixed aims or direction by Leigh Dodds. If you see him wandering, point him in the direction of home.
Mark Wahl, CISA - RSS
Discussions on organizing principles for identity systems
Michael Levin's Weblog and Swampcast! - RSS
Software development, technobuzz, and everything else.
Minding the Planet - RSS
Nova Spivack's Journal of Unusual News & Ideas
More News - RSS
Nodalities - RSS
From Semantic Web to Web of Data - RSS
copyright, content, and you
Perspectives - RSS
Interfaces, web sémantique, hypermédia
Planet Kiwi - RSS
... where all the KiwiKnows is!
Planet RDF - RSS
It's triples all the way down
Planete Web Semantique - RSS
French Semantic Web planet
Raw - RSS 1.0
Danny's linkiness
Rinke Hoekstra - RSS
"Time is nature's way to keep everything from happening at once." - John Wheeler
S is for Semantics - Atom
Dean Allemang's Blog - Check out our new book on the Semantic Web!
Semantic Focus - RSS
On the Semantic Web, Semantic Web technology and computational semantics
Semantic Wave - RSS
News feeds and commentary maintained by semantic web developer Jamie Pitts.
Semantic Web Interest Group Scratchpad - RSS
Semantic Web Interest Group IRC scratchpad where items mentioned and commented on in IRC get collected.
Semantic Web Wire - RSS
Comprehensive News Feed for Semantic Web.
semantic weltbild 2.0 (Building the Semantic Web is easier together) - RSS 1.0
Building the Semantic Web is easier together - Atom
Speaking my mind - RSS
The whole is more than the sum
TagCommons - RSS
toward a basis for sharing tag data
TechBrew - RSS
Informative geekery on software and technology
Technical Ramblings - RSS
Ramblings of a GIS Hacker
Thinking Clearly - RSS
Make lots of money through stealth in shadows
W3C Semantic Web Activity News - RSS

I automated the creation of this blogroll by transforming the opml of my blog reader with the following xquery

declare namespace loc = "";

declare function loc:string($t as xs:string) {

   for $outline in //outline
   order by $outline/@title
          <dt><a href="{ $outline/@htmlUrl}">{ loc:string($outline/@text) }</a> - <a href="{ $outline/@xmlUrl}">{ loc:string($outline/@version)}</a> </dt>
          <dd>{ loc:string($outline/@description) }</dd>

I then had to edit a bit of the generated html by hand to make it presentable.

Thanks to the Oxygen editor for making this really easy to do.

Thursday Jan 03, 2008

Scoble gets thrown off Facebook

picture of current version of Beatnik

Scoble, who became very famous for getting blogging started at Microsoft, got ejected from FaceBook for crawling his network of friends. This is the problem with closed social networks and data silos in general. He seems to think the solution is data portability. More than that: the solution is Open Social Networks. You should be able to use a simple web server and just link up to your friends friend of a friend (foaf) file, whichever service they are using be it their own machine located in their basement, a service provider, a government owned machine, ... . Just as I can link from this blog to any blog. This would allow people to own their piece of the network, like they can own their blogs.

This is what Beatnik, a friend of a friend browser, which I described in this email to the social network portability group, will make it easy for anyone to do.

Everyone is welcome to help on this open source project: artists, documenters, Swing experts, testers, RESTafarians, ...




« July 2016