Just bought some sugru

30. July, 2010

I just bought myself some sugru.

What’s that? It’s sticky clay. Why do you want some? See for yourself.

UltraViolet: Death of digital content

29. July, 2010

UV radiation is invisible but extended exposure causes sunburn. It can also cause skin cancer which leads to certain death if not treated immediately. What an appropriate name for a new DRM system.

My guess is that it will help to kill sales of digital media like no technology before it. Why?

  1. It is supported by most of the important companies, so in a few years, you won’t be able to find consumer devices which don’t support it. Outside the OSS world that is.
  2. Did you know that you buy products because you like them? If that is so, then the products you buy tell about your psyche. In which mood are you today? Did you buy ABBA or Motörhead? Hmm… Imagine who might long for such information and how much.
  3. Finally you don’t have to spend hours selecting music for a friend, a coupon is enough. You can’t buy the music for them anymore because you can’t give it away anymore. Anything you buy will be yours. And yours only. Except if they are members of your family. Finally children can know what their parents read. And which movies the parents watch after the children were sent to bed. Did you know that most parents turn to their children for help with electronic devices?
  4. At long last DVDs and BlueRay disks will “just work“. No more sitting in front of a black screen because your DVD player can’t play the disk in the drive. And you won’t get an FBI warning either. They will know where you live the instant you try to play “content” you didn’t buy and sue you. Or kick your door in. Whatever they feel like. You’re just a petty criminal, like the molesters, thieves, murderers and other scum.
  5. UV will be anywhere (like in daylight). There will be no way to avoid it. Unless you stop buying. What an odd idea. Why would you stop giving money to greed…great companies who sue toddlers? Babies stink anyway. Stop making them. They only pollute the planet even more, they take room, breathe our air, eat our food and then refuse to pay for our pension. Buy more music instead! In UV2, we’ll figure out a way to sell condoms, too. Everything for our consumers!
  6. Of course this is a very complex technology, so the company behind it has meticulously created a roadmap which makes sure the most important features are available first. Which will be the ones that are paid for. By the companies using the technology to sell you stuff. But don’t worry. Eventually, when they run out of ideas how to spend the fortune they’ll make, they will eventually consider adding features for consumers. Eventually. Housing on the moon is so expensive. But well worth it: You can’t hear the complaints. And the view is priceless.
  7. Only very few, unimportant companies like Apple and Disney aren’t on the big, happy bandwagon. But don’t fear. In a short time, they will either be out of business (like they deserve) or see the light like everyone else.

Doesn’t that sound great? At last no more aggravation that you can’t play music on your Linux PC because the MP3 codec isn’t installed. No, finally you can be sure that no digital content, even if you bought it on a DVD and physically carried it home, will be owned by you. Or can be played on Linux. The Linux community, which has been spread like a virus for years, will be reduced again to the weirdos, sociopaths and communists. McCarthy would be so happy.

There is just one tiny problem. In Europe, there are some people called “data protection commissioners”. Unlike the name suggests, they are purely evil and as soon as they learn what the companies behind UV can do with the data they collect about the valued customers, they might try to outlaw the technology! Fret not, dear reader, the stupi…insight of the masses have always worked in our favor.

It won’t take long before new governments will be elected by careful persuasion of you with a little help of the, say, more “private” or, well, “odd” purchases you make. And if that doesn’t work, it should be possible to extrapolate your income this way and gently nudge the IRS who will be thankful of the service rendered by the law-abiding[*] companies behind the great new technology Ultraviolet!

[*] Read “we are the law”! And don’t you forget it! Now buy! The tires on my Ferrari are already dusty from the ride this morning! Yuck! I need a new one! Life is so … so … unjust!

Missing Missy

25. July, 2010

I have two cats and I once lost one, so I know the pain when your poor animal is missing and you spend sleepless nights and have no idea what happened to it.

That said, the following mail exchange is one of those where you really shouldn’t laugh but it’s just so hilarious. You have been warned: Missing Missy.

Dependency Injection and Reference Passing

21. July, 2010

When you start using dependency injection (DI), you probably come from the painful world of singletons. Singletons are a lie. When we were doing structured programming (remember? What we did before OO?), that was called “global variable” and everyone knew they were bad. But hey, OO came along and we had the same problem and to solve it … we used global variables. Only we didn’t name them that. We said “It’s a Singleton!” and everybody was happy.

Except that the mighty singleton has the same problems as the global variable – because they are the same thing.

A solution was sought and DI was invented. When people start to use DI, they are still in the “Singleton” mind because you can’t get rid of an idea that has served you (more or less) well over many years. Since a human can’t simply forget what he’s been doing for a long time (it’s traditional), singletons leaked into DI leading to odd design which felt wrong.

Software developers are paid for their brains. If something feels wrong, it usually is. Most of the early code we come up with then starting with DI violates the Law of Demeter.

A common solution to the problems with many singletons is to replace them with a single singleton (for example one which loads and offers the application context in Spring). While this is convenient, we still have a global variable left.

Another solution is to write constructors that take 27 parameters so you can pass in all the parameters. If you avoid that trap, then your class will have 27 setters. Holy Ugly, Batman.

How to solve that? Use more DI. Most of the 27 ex-singletons will be passed on to other worker classes. So instead of passing on the singletons to create the worker classes deep down in the code, create the worker classes using DI (so the DI framework can fill in all the ex-singletons they need) and then pass in the 2-3 workers.

For some code, see this article: Dependency Injection Myth: Reference Passing

FreeType with hinting after patent expires

19. July, 2010

From the announcement:

Since May 2010, all patents regarding the TrueType bytecode interpreter have expired worldwide. Consequently, we now define TT_CONFIG_OPTION_BYTECODE_INTERPRETER by default (and undefine TT_CONFIG_OPTION_UNPATENTED_HINTING).


Sins of Commissions

18. July, 2010

If you plan to measure the performance of your employees or to improve their performance with a bonus, then you should read this: How Hard Could It Be? Sins of Commissions.

Using the FindBugs plugin for Maven with Java 5

16. July, 2010

If you use the Maven 2 FindBugs plugin with Java 5 code, you will get a lot of errors like:

    Can't use annotations when running in JDK 1.4 mode!
    Can't use JDK 1.5 for loop syntax when running in JDK 1.4 mode!
    Can't use generics unless running in JDK 1.5 mode!
    Can't use enum as a keyword in pre-JDK 1.5 target

The solution is to set the targetJdk (even though this option isn’t mentioned in the docs and even mvn help:describe can’t find it):


Note that you should clean your project; otherwise the new option may not be used for some reason.