I am not a developer. I am a tinkerer

I write small stuff. At work, I have been tricked into doing some java development. Its kinda fun, getting make into the grind. But there are some things that I have be finding ( or refinding; its been a long time since I wrote usable java.)

Anyway, I was implementing the singleton design pattern. You may have heard of this. I have done it many times in many different languages, but never really had to make it enterprise ready. So I started to look into it making sure I understood the voodoo.

First I normally use something like double-check locking.
Well I shouldn’t. I see lots of articles on the web that use this. Well it really doesn’t work. Me not being the best java programmer didn’t know that. But then I found this.

So instead, I am using something like this.
The cause for double-check locking to fail for use on singletons is complicated, and was hotly debated before the Java Memory Map was revised in 5.0.

I am really glad I didn’t just go with the double-check locking. I have a feeling that the rare race condition that is exposed would be really hard to detect.

        	        

I have been using google reader for a while now. I like the way I can get my “internets” spoon fed to me.
My shared items are here. There is an rss also.

I have a bunch of good feeds, and I don’t always share some of them.
Since I am a bit of a music freak, I wanted to highlight some sites that have rss feeds that I like.

  • http://www.tinymixtapes.com/
  • http://freakytrigger.co.uk/
  • http://www.cokemachineglow.com

I really like tinymixtapes. I am even a “robot”. Basically, anyone can go to the site, and enter a few words on which to have a mixtape generated. Then, one of use “robots” can create a mixtape (well, really a playlist) that we feel captures the mood of the request. Think exploding dog for playlists.

Its fun.