I've been working for a number of years now in the NSLS-II Control System group, creating tools that hook up to the control system. What I do is soft-real time stuff (I can drop data on the floor, I don't have hard latency requirements, etc.) mostly dealing with writing clients to display the data and let operator interact with the control system.
In these conditions, you have have to think...
on Feb 15, 2012
If you, like me, need to build libraries that need to be tested against a live server (integration tests), here's what you can do.
Have all your integration tests either in seprate "itest" packages, such as my.library.itest, or have the test classes end in ITest, such as my.library.ConnectITest. In the main section, have the surefire plugin exclued running the integration tests:
on Apr 21, 2011
Since generics were out and I started using them, there were always a few cases in which I couldn't make them do what I wanted. I always thought it was my problem, and that I didn't understand what was going on... Turns out: it's not. There are at least two things that are implemented in a way that break what I thought were very safe expectations.
Before Generics, you would write...
on Apr 9, 2010
In this post I am going to sum up things I have learned while creating a fluent API (or internal DSL) in Java. I'll talk about the search API I created for my current position: it's not a toy problem, it's a real problem, which has a significant amount of complexity. Because of that complexity, you get to see techniques and ideas that you don't usually see in toy examples. I am not including the...
on Feb 4, 2010
While much have been written on checked vs unchecked exceptions, I found very little practical, down to earth, advice on how and why to use them. Here are my thoughts after years of rumination.
The common wisdom
What we are typically told is to use checked exceptions for recoverable conditions and unchecked exceptions for programming errors. For example here or in Effective Java. Don't get...
on Sep 25, 2009