Unstable Terrain

Software development in the real world

Archive for August 2011

Efficient Singletons in legacy code

leave a comment »

The app I’m maintaining is not Spring-enabled so I am faced with the possibility of writing code for singleton objects. To my mild surprise, I discovered that Java 5 has made singleton creation considerably less bug-prone. There’s also better practices for double-checked locking, if your code (attempts to) swing that way.

Advertisements

Written by Trent

August 30, 2011 at 11:25 am

Posted in Software Development

Tagged with , ,

Separating Unit tests from Acceptance tests in maven

leave a comment »

Have been playing with Maven a lot in the last week and a half. One thing I liked about Ant was the control over whether various classes of test would run in which target.

Found a post by Abhi which demonstrates that a judicious use of profiles will accomplish this.

Written by Trent

August 25, 2011 at 3:33 pm

Maven: Not as terrible as it seems

leave a comment »

I once read a quote about Maven, that

it makes the simple things effortless, and the difficult things impossible

After working with it full-time for, wow, has it been a year already? I still believe that statement is true for beginners. Eventually, though, you learn how to work with Maven rather than against it, but still get it to do what you want.

Written by Trent

August 24, 2011 at 3:43 pm

Posted in Software Development

Tagged with