Maarten Decat

My last post was about the Chuck Norris joke WordPress plugin. That project has now been extended.

I’ve recently set up the website The goal is a free and open database of Chuck Norris jokes and facts, available as a RESTful web service and ready for anyone to use. A nice little extra is the possibility to change the name of the main character and star in the jokes yourself. I’ve already created some applications myself (the WordPress plugin and a jQuery plugin) but there is much more to come! If you want, you can cook something up yourself.

15.000 requests per day and counting, can’t guess how this will evolve :)

Chuck Norris WordPress plugin

Forgot to post on this before: Since my disappointment in Facebook about not being able to make a Chuck Norris joke profile box, I’ve found some other ways to put the database to work. As a first little project, I developed a simple WordPress plugin allowing you to add a Chuck Norris joke to your WordPress blog, possibly starring yourself. The plugin has been out there for over a month now, currently receiving about 1000 requests a day. If you have comments or remarks, please let me know!

No more Facebook profile boxes, no Chuck Norris jokes…

Chuck Norris jokes are awesome. And I think there are many out there who agree to that.

Last year, I started a collection of these jokes in a local database, now it contains over 400 of them. A couple of weeks ago, I got the idea to set up a Facebook application using this database. Wouldn’t it be cool to show a random Chuck Norris joke on your profile? And wouldn’t it be even cooler to show that joke, starring you instead of Chuck Norris? I thought so too.

So, I began developing this little app. The database would be addressable as a web service and the Facebook app would just use the user’s name to address this service. The app itself was finished in one day, but then I began to search on how to add the app to your Facebook profile. After a week of browsing through Facebook developer docs, forums and blog posts, I began wondering how something that simple could be so hard? Millions of apps have done this in the past, no?

But now I’ve found the answer. In a small blog post to it’s users, Facebook states “boxes on profiles and Pages […] will be going away.” It’s as simple as that, profile boxes aren’t supported any more. Personally, I can’t understand this decision. Customizing your profile was one of the neatest features of Facebook, in my opinion. And how can small applications gain publicity without profile boxes? Profile tabs? Yeah right…

Ah well, at least I can share a joke here: Chuck Norris is the only man to ever defeat a brick wall in a game of tennis.

Online Normal Distribution Calculator

A normal distributionLast week I was searching the web for an online normal distribution calculator, you know, the thing with the bell-shaped curve and the Z-scores. I had to solve some exercises about this and wanted to check my solutions. I wanted an easy-to-use application that gave a quick and accurate solution. A graphical representation about what I was calculating could be useful too. And I didn’t want to install anything.

The available calculators on the web disappointed me. Most of them were unpractical HTML-forms that gave an answer after doing some server-side calculations and refreshing the page. Overkill, too slow and no graphics. The ones that did have a graphical representation were old Java applets. What seemed to be missing was a nice, clean and easy-to-use JavaScript application. No installation or plugins needed, just visit the application, input your variables and get your answer. So I made this myself.

The result can be found here. I’ve used the new canvas tag for the graphics and jQuery for the tabs and some other logic. The programming wasn’t very hard, drawing to the canvas just takes a lot of lines of code… I’ve tested the page on Firefox, Google Chrome, Safari and Opera, seems to work. Internet Explorer doesn’t support the canvas tag yet (doh…), a problem that (theoretically) should be solved by using the ExplorerCanvas project. In practice, I still get errors, which I’ll try to solve in the near future.

Any comments are welcome!

1K JavaScript contest

I’ve just entered my own demo for the 1K JavaScript competition. The purpose is to create a demo of just 1K of JavaScript and see what you are able to build with that. Check out my demo here, it’s a version of the all-famous Flash game Bubble Trouble (or at least what I was able to shrink into 1K). A readable version of the source is available here. Comments are appreciated :)

Be sure to check out the other demo’s at, it’s incredible what just 1K can do… If you enter the competition too, let me know!

Gmail tricks: searching for unread conversations

Gmail is a great e-mail client, no doubt about that. But if there’s one thing missing, it’s the “Unread conversations” button. What most people don’t know, is that there actually is an easy way of searching for unread mail: just search for label:unread.

But still, there should be a button for this :)

C++ sucks, or at least a little

Stumbled upon this cool comment in the Mozilla source code:

// C++ sucks! There's no way to do this with a macro,
// at least not that I know, if you know how to do
// this with a macro then please do so...
static const PRUnichar sHTMLTagUnicodeName_a[] =
{'a', '\0'};
static const PRUnichar sHTMLTagUnicodeName_abbr[] =
{'a', 'b', 'b', 'r', '\0'};
static const PRUnichar sHTMLTagUnicodeName_acronym[] =
{'a', 'c', 'r', 'o', 'n', 'y', 'm', '\0'};
static const PRUnichar sHTMLTagUnicodeName_address[] =
{'a', 'd', 'd', 'r', 'e', 's', 's', '\0'};
static const PRUnichar sHTMLTagUnicodeName_applet[] =
{'a', 'p', 'p', 'l', 'e', 't', '\0'}; 

He/she has got a point :)

Bioshock and Windows 7

bioshock_logoJust bought me BioShock from Steam, but running it on Windows 7 gave me some errors. I’ve searched around and the solution for me seemed to be almost too easy to be true, so I’ll share it with you all here.

First of all, BioShock wouldn’t start. The splash logo showed, followed by an error message claming “BioShock has stopped working“. This can easily be fixed by setting the compatibility mode for BioShock to Vista or Windows XP. To do this, locate Bioshock.exe (C:\Program Files\Steam\steamapps\common\bioshock\Builds\Release\Bioshock.exe for me), right-click, select Properties and set the Compatibility mode in the Compatibility tab to Windows Vista or Windows XP. Now the game launched.

Then a second problem showed: I didn’t have in-game sound, although the menu and the intro did. I’ve found a lot of possible solutions for this, ranging from using Windows 2000 compatibility mode (works for me, but the graphics degrade) to installing the latest sound drivers (didn’t work for me). But the most effective solution – strange as it may seem – appeared to be plugging in a device in the audio input of your computer, no kidding. You don’t even have to use the device, just plug it in. I think it can even by headphones…

So now everything works, and the game gives an astounishing first impression. Later more on that subject :) Hope this post saved you some trouble, and happy gaming!

Gordon: the JavaScript Flash Player

Check this out! Gordon is a JavaScript implementation of Adobe’s Flash Player. This means it allows to run Flash movies without having installed Flash Player itself, which is a pretty awesome thought if you asked me. Supporting as much Web features as possible without the need of browser plugins always is a good idea, as has also recently been shown by the native support for video with HTML tags.

Gordon seems to work pretty well when running the given demo’s, it even supports user interaction. How far this support goes and how good the performance is, isn’t clear for the moment. It doesn’t seem likely that this will replace the Flash player soon, but it sure makes you think!

Be sure to check the demo’s out at If you’re really interested, you can find the source code at

Original post at Ajaxian:

Processing.js: more than a free canvas drawing and animation language

The Processing language is “an open source programming language and environment for people who want to program images, animation, and interactions”. It has now been ported into JavaScript, as processing.js. Processing.js scripts are linked to <canvas> tags. By using the methods for drawing shapes and controlling animation, drawing graphics in webpages becomes remarkably easy! Responding to keyboard or mouse events is made simple as can be too, reducing this to implementing the correct methods.

Processing.js represents a new scripting language that can be used in the browser. It uses a Java-like syntax and even supports the use of classes with inheritance and encapsulation. This makes processing.js easier to learn than JavaScript itself. But of course, since it isn’t JavaScript, it cannot be used for general scripting in the browser; Ajax calls or manipulating the DOM tree aren’t possible for example. And I haven’t seen anything about a Processing to JavaScript interface either.

I’ve tried out the language in a simple program and it really makes drawing shapes and animations child’s play – or at least for the child of a Java programmer. It’s a shame utilizing classes with encapsulation and inheritance seems to give errors at some points, making the development of big projects a rather difficult at the moment. But still, be sure to check the project out!

Fork me on GitHub