Friday, November 30, 2007

The Superstar Premium

An interesting article appeared today on the BBC website about the Superstar Premium. It basically says that the superstars are getting richer because of nu-media allowing them to be a global phenomenon. Instantly.

The Superstar Premium idea also applies to products such as music and video games.

For example video games fall into two categories, triple-A games and the rest. The AAA games go on to sell millions worldwide, whilst the rest - although costing virtually the same amount to make - can sell just a few thousand.

Even though the Premiership footballers and the triple-A games aren't thousands of times better than the rest, they earn tens or hundreds of times more. Why? Because they are better.

And when you are excellent, being just a couple of percent better - to make you the best - makes you so much more valuable. After all, who wants to finish second? And if you can sell your brand of "the best" product to a worldwide audience you're going to make a considerable amount of money.

Wednesday, November 28, 2007

AJAX Breaks my Back Button.

My last post about whether programmers should be allowed to wear headphones sparked a fair bit of debate, both in the comments and on the dzone website.

So, today I'm going to continue the controversy by talking about the problems with AJAX.

Now, don't get me wrong, I'm a massive fan of the potential of AJAX.

But it breaks the browsers back button.

This might not sound like such a big deal, but there are millions of web users who like to surf through links randomly, aimlessly wandering their way through cyberspace. To them, the back button is their piece of string in the dark cave of the internet.

Without it, the internet doesn't work as a link stack any more.

AJAX is essential for the future of the web, but developers should make it their priority to try to fix the problems that is produces.

Monday, November 19, 2007

Should Coders be Allowed to Wear Headphones at Work?

I mean I love my music - I played as a resident DJ for a year spending all my student loan on records! - but when I'm at work, I'm there to work, not to be entertained.

I also understand that when you've got one of Nokia's latest remixes blasting out every five minutes, having some background music - some familiarity - can be a good way to get into the coding zone. Especially if you've got your bug hunting hat on:

But what about senior coders?

Doesn't it say in their job description that they are meant to help and mentor their more junior peers?

But how can they recognise the signs of a coder-in-need if they are taking in their latest track from iTunes?

And then for managers and those in a leadership position, those who should be aware of the rest of the team at all times, how can they lead fully when they don't hear any or all that happens?

It seems like there must be a happy medium somewhere between headphones on productivity and headphones off knowledge sharing. But it also seems that the further up the tree you go, the less you should be wearing them.

Friday, November 16, 2007

Can't Delete?

So you want to delete a file? Or move it? Or simple rename it?

But every time you try, XP throws up an access denied message:

Access Denied

The thing to do is to download Unlocker. In fact, it's so good you should download it now. Go on.

Wednesday, November 14, 2007

There are only 6 numbers you need to know when testing ...

... and they are -1, 0, 1, some, n - 1 and n.

Generally, if you algorithm works with these 6 variations on the input (-1 being the error case) it'll work with anything you want to throw at it.

If you've tight on time, I'd recommend testing at least 0, n and 1 (in that order) as they are normally the problem children.

And there is always an argument about how your algorithm should handle error cases. Does it cope with them softly by returning false or throwing an error, or violently by asserting?

Both are correct.

At least one should be present.

But if you are writing code with unit tests, testing inputs [-1, 0, 1, some, n - 1 and n], those tests will show how your functionality is suppose to be used and the ambiguity is reduced.