PMD vs Findbugs vs Hammurapi

Posted in blog city on June 21st 2004  
There are quite a few open source static code analyzers for Java. Here is a comparision chart of three tools that I found useful/promising.

Feature
PMD
Findbugs
Hammurapi

Website
http://pmd.sourceforge.net

http://findbugs.sourceforge.net

http://www.hammurapi.org

Version Number
1.8
0.7.4
2.2

JDK Version
1.3
1.4
Ant 1.5.2

Ease of Installation
Easy
Easy

Difficult. Ant is kind of pre-requisite

License
BSD-Style
LGPL
GPL

Number of default rules
available
Could not count the total rules easily. However, it is easily comparable with [...]

Unit Testing - Necessary but not Sufficient

Posted in blog city on July 12th 2004 
Mike Spille wrote his opinions on unit testing and JUnit in his recent blogs. Read some of them here and here. As is the case with any post, there are many points I agree and quite a few that I disagree. As a disclaimer, I am not a die hard [...]

Usage of new Java5 method - inheritedChannel()

Posted in blog city on September 3rd 2004  
I am struggling to understand how to use the new method inheritedChannel() in java.lang.System.
Any example code on the usage? The method returns an instance of Channel interface which has only two methods close() and isOpen(). So, unless one knows the exact class that is returned by this method (SocketChannel, DatagramChannel, [...]

Deleting untested code!!?

Posted in blog city on October 7th 2004  
Just learnt about this rather inane tool Guantanmo which *deletes* all code that is untested!!!
While it is amusing to see this kind of tool, I doubt if this has any kind of practical, real-life use.
All I am interested at any point is the %age of my test coverage so that [...]

Practical problems of client-side session storage

Posted in blog city on May 19th 2005  
There is a recent thread at serverside on client side session management using hidden form elements. Having architected and implemented similar solutions quite some time back in past, here’s my take on this -
1. This approach works well if the session data is not huge. In my experience, the amount [...]

Why should javadoc be inside the .java file?

Posted in blog city on July 13th 2005 
One of the problems I face is related to javadoc. Most of the people would agree that the documentation of any code does not match with the functionality of the code. This could be due to various reasons, ranging from developer discipline to lack of time to update documentation. [...]