Archive for July, 2006

Good API design rule


“It’s not enough to write tests for an API you develop, you have to write unit tests for code that uses your API.”


Thread Groups

Some months ago I was wondering what was the benefit of using thread groups, which is a container of threads in Java. Reading Bruce Eckel’s Thinking in Java, I discovered this quote from Joshua Block, the one who improved the Collections framework in JDK 1.2:

“Thread groups are best viewed as an unsuccessful experiment, and you may simply ignore their existence.”

I haven’t been told about any Sun’s official statement about this topic before reading the book. So, why do they let us spend our effort trying to figure out the value of thread groups? πŸ™‚


About version control

What do java programmers version control? is a good question to ask ourselves in the corporate world of software development. I think we should version control all the stuff regarding to the project knowledge, such as documents, wireframes, prototypes, notes, requeriments and obvious, source code :-). If you have a wiki available, documents about the project can be put and edited there. I think the build process has to take care of creation and manipulation of other dependent libraries, they should not be versioned. At my company we use Ivy, a java based dependency manager for this purpose. I haven’t been told about this tool before but I found it quite interesting to work with dependencies. You can even specify which version of a specific jar you need, Ivy finds the correct version and applies it as a dependency to your project. It seems to be very useful to manage the dependencies of software projects. And in your company, what’s your team allowed to version control?


Software testing purposes

James Bach has a interesting opinion about testing software systems. I think it’s a different opinion from any team project manager or developer. He not only emphasizes the importance of testers but says developers are trying to test software themselves, andfix every bug, before testers even got their first look at it. His software test heuristic is if it exists, I want to test it, even if the product is completely inoperable, with a lot of buggy code. A different opinion, even from mine. As a software developer, I would think to test it before delivering to testers πŸ™‚ . And in your company, are there software testers? What do they think about it?


Guidelines about threads

From Bruce Eckel’s Thinking in Java book, about threads:

  1. If you need to synchronize one method in a class, synchronize all of them. It’s often difficult to tell for sure if a method will be negativelyaffected if you leave synchronization out.
  2. Be extremely careful when removing synchronization from methods. The typical reason to do this is for performance, but in JDK 1.3 and 1.4 the overhead of synchronized has been greatly reduced. In addition, you should only do this after using a profiler to determine that synchronized is indeed the bottleneck.


Eclipse Callisto is finally released!

Eclipse Callisto is available! You can download it here. Eclipse 3.2 build has been released too. Check out the New and Noteworthy.