royvanrijn: You can use "Twitterific for iPhone", another app from iTunes. A newer version, but not as good as the previous.

Creating Shazam in Java

June 1st, 2010

A couple of days ago I encountered this article: How Shazam Works

This got me interested in how a program like Shazam works… And more importantly, how hard is it to program something similar in Java?

Continue reading »

Some of my software development rules

April 12th, 2010

Here are (in my opinion) five of the most important ‘rules’ in software development.

Continue reading »

Handling null in Java

February 1st, 2010

Its a problem I encouter in most JEE projects I’ve worked on so far. Handling null-values. But why is this a problem? And what strategies can we follow to reduce the problem? That is what I’m trying to find out in this post.

Continue reading »

Placement of circle over points

January 27th, 2010

For the Queue ICPC programming game Capture I ran into a geometrical problem.
While programming my little robot I wanted to have an algorithm calculate this for me:

  1. I have a field with 122 points
  2. I have a circle of fixed size

How do I calculate where to put the circle so it encapsulates the most points?

This is what I came up with, three algorithms:
Continue reading »

Guess the algorithm

January 23rd, 2010

Yesterday I found and programmed a nice little algorithm. I’m not going to tell you (yet) what it does and how its called, but I’ll just show the code:

	private int function(int x, int y) {
		int r = 0;
		while(x!=0) {
			if((x&1)==1) {
				r+=y;
			}
			x>>>=1;
			y<<=1;
		}
		return r;
	}

So tell me, what does this do, and what is the algorithm called?

Edit:

And indeed (it was a simple one) the correct solution is multiplication, and to be specific, Ethiopian or Russian Multiplication.

I’ll probably do more, harder ones, in the future..!

Page 1 of 3123