Displaying posts filed under

java

Java Programming

Feb
16
2010

Google Objects.equal, useful but be careful.

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.

Feb
1
2010

Leveraging Eclipse for TDD

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 [...]

Jan
25
2010

Eclipse, Static imports quickly and GitHub gist.

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 [...]

Jan
11
2010

Gigaspace API design – the GigaSpace write method

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.

Jan
6
2010

TimeUnit use it more of the Time please!

Time for my first blog of the year. Yea! Mind you its a bit small, but then perhaps that is a good thing.
Look at these two setters. Setter methods like the first example are very common. Take a look at the second its so much better. With the second the [...]