Its astounding how often I find maps being used like this. for(String name: names.keySet()) { mymap.put(mymap.get(name),name); } Its inefficient because you have to fetch the keys and perform a lookup in the map with the key. Instead using the EntrySet you can get all the keys and values in one hit. This saves having to [...]
Google have a nice equals method to make boiler plate equals easier to read. Particularly good if you have many attributes in the method. http://publicobject.com/2007/09/coding-in-small-with-google-collections_8175.html Be careful to check that your objects are consistent with equals though. I have mentioned this before.
I have found that quite a few programmers struggle to work in a completely test driven fashion. I myself whilst writing tests for many years, took a long time to move over to writing the test first. I think one of my problems was that I always wanted to do my thinking in the implementation [...]
Every one has a collection of favorite Eclipse templates. I find the simple ones are often the most useful. The examples below create you a static import and finish the method your typing. They even put the cursor in the right place if you need arguments in the method. I am going to collect more [...]
Gigaspaces is an excellent product. Supplying a flexible cache, the ability to run processes, underpinned with spring, good desktop space management tools and some well thought out configurable and scalable architectures. The documentation and programmers api design could do with some effort though. Lets take a look at the GigaSpace interface and the design of the write method as a small example where improvement is much needed.
