Blog archives

Flickrstreamr v0.3 released

I’ve uploaded the newest version of FlickrStreamr. FlickrStreamr is a tool to view a continuously updating stream of all recently uploaded photographs from Flickr. On a normal day, around 3000-6000 photos are uploaded to Flickr every minute. This tool lets you view those photographs in a way that is a little bit more sophisticated than hitting ‘reload’ on the recent photographs page on Flickr.

I’ve done a lot of work on making this new version more easier to use, with a less cluttered interface. There’s just one button right now: play/pause. Hit it, and watch the photographs refresh, hover over a photograph to view a preview or click it to go to the photo page on Flickr.com

I’ve added some JavaScript that adjusts the number of thumbnails on your screen. The larger your screen resolution, the more thumbnails you will see. So, you don’t need to scroll the FlickrStreamr page to view more thumbnails. When all thumbnails are updated, the new thumbnails simply update again at the top-left corner.

You can try FlickrStreamr or download the source code and run it for yourself (you’ll need a Flickr API key though).

Blog archives

Wij leveren niet aan lange adressen…

Stel dat je ergens wat dingen wilt bestellen bij een webwinkel, dan moeten die ergens worden afgeleverd, toch? Helaas kan dat bij Overtoom alleen op adressen met een straatnaam van 24 letters of minder:

Achterlijk.

En nog zoiets leuks: men gaat er blijkbaar ook van uit dat mensen, als ze zich eenmaal inschrijven bij Overtoom nooit meer verhuizen, aangezien er geen enkele manier is om het factuuradres te veranderen, of om oude adressen te verwijderen.

Blog archives

JSON viewer with URL support (in PHP+jQuery)

Like many other people, i’m quite charmed by the JSON data interchange format as a replacement for the almost ubiquitous XML format. Unfortunately, there are less tools for viewing JSON than there are for XML, which gets a bit annoying if you have large JSON files that you need to view, such as the JSON feeds for Flickr.

There is a useful JSON viewer made for Adobe Air but unfortunately it doesn’t accept URLs (only text), so you need to copy-paste JSON text around to view the output.

So, you might have seen this coming, i made my own JSON viewer. It’s a very simple thing, using only PHP (which has JSON support since 5.2.0) and the fantastic jQuery JavaScript library for some AJAX calls and effects. If you want you can try it yourself.

The source code is released under the open source MIT license and can be downloaded here.

Update (06/10/2008): Some API’s deliver invalid JSON, such as Flickr and Google Suggest, usually because they deliver the JSON as a JavaScript variable, e.g.

JSONResult = ({"foo": "bar"});

I ‘fixed’ this in JSON Viewer v1.1 by stripping out all code before and after the { and [ characters. Unfortunately that takes a little bit of extra code, and we are essentialy fixing things that Google or Yahoo should fix, but because these feeds are so popular we do it anyway.

Update (13/02/2009): Two small usability fixes: the first node of the tree is now always shown and clicking on the url field only deletes the complete field if it is the default url. Get the source here.

Update (05/08/2009): For your and my convenience JSON viewer’s source and downloads are now available via Google Code. For your hacking pleasures you can also download the source using Subversion. I’ve updated the source a little bit, so let’s call this release 1.3.

Update (11/10/2009): Some minor updates, changed the SVN repo and revised the design to make it a little nicer on the eyes. Release 1.5

Blog archives

Fietsen en Utrecht Centraal: onmogelijk

Nu dat ik naar het centrum van Utrecht ben verhuisd heb ik het genot om elke dag naar het centraal station te fietsen en daar mijn fiets te stallen. Twee dingen die bijna onmogelijk zijn. Als u overweegt om te verhuizen naar het centrum van Utrecht en vervolgens elke dag per fiets naar het station te gaan heb ik voor u drie adviezen:

  1. Neem de auto
  2. Ga lopen
  3. Verhuis niet

Het eerste probleem is Überhaupt op het centraal station te komen. Sinds dat ze daar aan het bouwen zijn op het Smakkelaarsveld is om onduidelijke redenen de normale fietsweg (blauw op het kaartje) afgesloten en moet iedereen verplicht een heel stuk omfietsen (rood op het kaartje) over een hobbelig paadje.

Kaartje van OpenStreetMap / CC-BY-SA

Er is nog een andere route vanaf de fietsenstalling maar die is eveneens afgesloten vanwege de verbouwing aan het Vredenburg (ook om onduidelijke redenen, maar dat is een ander verhaal).

En dan ben je pas op het station! De fiets stallen is helemaal een ramp aangezien er bijna geen plaats is en het nauwe paadje tussen de fietsen door regelmatig wordt onderbroken door een fiets die er dwars overheen ligt en mensen die langs elkaar moeten (met een fiets in de hand) over dat nauwe paadje. Je fiets ergens neerzetten is geen garantie dat-ie om 18.00 ‘s avonds niet verbogen en kapot is omdat er per ongeluk 100 fietsen overheen zijn omgevallen. Het onderstaande plaatje laat het een klein beetje zien, maar in het echt is het nog veel erger:

Foto: Wester (Flickr) / CC-BY-NC-ND

Foto: Wester (Flickr) / CC-BY-NC-ND

Ik kwam dus vanavond aan op het station en toen bleek dat mijn ketting van de fiets was gelopen. Ik had nog even geen zin om die er weer op te leggen dus ik liep maar naar huis via het normale voetpad (waar dus wel voetgangers overheen mogen) tot ik werd tegengehouden door een verkeersregelaar:

  • Dit is een voetgangerszone, u mag hier niet fietsen!
  • Ik loop met de fiets aan de hand, ik ga niet fietsen
  • U mag hier ook niet met een fiets lopen!
  • Ook al zou ik willen fietsen, dat kan niet, want de ketting ligt eraf
  • Dat kan wel zijn, maar dit is een voetgangerszone!
  • Maar ik loop toch?
  • U heeft een fiets!
  • Ik vind dit een vreemde regel..
  • Ik voer alleen maar uit, ik maak de regels niet!

Dus zo liep ik, helemaal om via het hobbelige paadje, terug naar huis.

Blog archives

PHP Markov chain generator

Alice same she shore and seemed to remark myself, as she went back to the heard at Alice hastily, after open her sister. Here, Bill! The Duchess too late it a bit had a sort of they are the Queen. An invitation a little of the ran what it was only down her to the other; the Dodo, a Lory and the please that it must as well very good making a dish of time,” she added, “It isn’t a letters”.

If you think that sounds like gibberish, you’re right. But it is a pretty interesting type of gibberish because it is generated by a Markov chain. A Markov chain (if i describe this correctly, i’m not a mathematician or very good in logic) is an algorithm that makes its next state dependent on the previous one. For example, let’s say you have a text, such as Alice in Wonderland (that’s what the text above is based on). You could scan the whole text, and then look at how many times letters follow each other and make a table of that. E.g., the letter N probably follows the letter A more often than the letter Q.

After making such a table and start with a random letter, and then make a random weighted decision on the basis of how many times other letters usually follow, you get a text that quite closely resembles the original text, but takes apart all of its original context, resulting in the gibberish you read above.

It’s quite interesting to program such a markov text generator yourself, so i did exactly that with my PHP Markov chain generator. You can either input the starting text yourself (make sure to make it pretty long for best effect) or select one of the pre-selected texts such as Alice in Wonderland, the Wikipedia article on Calvin and Hobbes or Immanuel Kant’s Critique of pure reason (the last one becomes even more incomphrensible than it already was, can you imagine that?).

For your own experimentation you can get the source here. If you want you can include the generator in your own projects, the sources are released under the MIT open source license.

If you want to know more about Markov chains, be sure to read this article by Jeff Atwood, he explains the whole thing a lot better than i can.

And for your amusement, here’s another Markov generated piece, from Kant’s Critique of pure reason:

Thus common upon nothing that is, is deceptive infinite or as I am free in its or power to the continuous vacillationes demand explanation to this time-determines which they are given therefore necessary in itself respect none those a priori with a possible men course, and determission. Today its merely the conceiving the world in space is finite, neither in the support.

Blog archives

CD versus MP3

Zoals ik al eens eerder heb geschreven is online muziek kopen een drama. Het volgende plaatje bewijst dat maar weer eens:

Hmm.. zal ik voor vijf pond een CD bestellen, met gratis verzending zodat ik iets fysieks in handen heb wat ik overal kan afspelen en kan rippen naar MP3 in 5 minuten, of zal ik het dubbele betalen om minder te krijgen? Oh wacht, ik kan het helemaal niet kopen want voor het downloaden van MP3’s moet ik in Engeland wonen terwijl cd’s overal, voor niks, naar toe worden gezonden. Logisch hoor.

Overigens, play.com (waar dit voorbeeld vandaan komt) heeft wel een hele leuke actie (fysieke cd’s dus, geen MP3’s) met een hele boel goede cd’s voor slechts 5 pond per stuk, inclusief verzending naar Nederland. Die vijf pond word trouwens wel 7,50 euro, ook al staat het pond volgens xe.com lager. Mocht u nog wat tips willen: hier is wat ik allemaal heb overwogen te kopen:

Blog archives

First moving images of Piet Mondriaan

A really unique thing: the Dutch history television program Andere Tijden found the only existing movie footage of Piet Mondrian (or Mondriaan, as we like to call him in Holland). The movie is found at the same time a two-year research project on Mondrian’s last piece, the Victory Boogie Woogie (pictured below), ended. My final project for my study (the European Master of Media Arts at the Utrecht school of the arts) was a short 15-minute movie about Mondrian, so you might imagine i am quite excited about this discovery.

You can view the 16-second movie clip here.

Victory Boogie Woogie (1944)

Blog archives

Why i love my MacBook

Because after one hour on the train, with 10 programs open, including Photoshop, iTunes and NeoOffice my one-year old MacBook still has a 72% filled battery.