Category Archives: Java

You can use XMLUnit without subclassing

I had almost written off XMLUnit because I assumed it required subclassing XMLTestCase and I already have my own JUnit TestCase sublass that I like to use. However, to my delight I discovered they have refactored out an XMLAssert class … Continue reading

Posted in Java | Leave a comment

It's still too soon to upgrade to J2SE 5.0

We're a small enough company that we can make the move to J2SE 5.0 whenever we want but we're holding off right now for 3 main reasons: 1. I'm not interested in being an early adopter unless the gain will … Continue reading

Posted in Java | Leave a comment

Tired of checking for null arguments in the method body

One thing I find annoying at times is adding in null checks in a method body to throw an IllegalArgumentException for method arguments that shouldn't ever be null. Most of the time as programmers we skip it and rely on … Continue reading

Posted in Java | Leave a comment

Code coverage from within the IDE followup

Two weeks ago I wrote about code coverage from within Eclipse using djUnit. Since discovering djUnit I've become a huge fan of code coverage in the IDE to improve the TDD process. Since we're going to be using Idea at … Continue reading

Posted in Java | Leave a comment

Eclipse versus IntelliJ Idea

The Java developer I hired to lead the Java side of our port from Perl to Java came from a background of using Idea rather than Eclipse. He liked it so much that we're going to be using Idea as … Continue reading

Posted in Java | Leave a comment

Fed up with Java, switching to a new language

I’ve had it with Java, too much technology to learn with Unit testing, ORM, IoC, AOP, and SOA, not to mention static typing and waiting to compile. That’s why as of right now I’m a converted .BAT programmer and here’s … Continue reading

Posted in Java, Software Engineering | 21 Comments

Unit testing with coverage reports from within Eclipse

The ever verbose (if you've seen his blog) Pjammy pointed me to this nifty Eclipse plugin called djUnit. Just right click on a JUnit test, select run with djUnit, and it runs the JUnit test with instrumentation to produce a … Continue reading

Posted in Java | Leave a comment

Static typing increases productivity and reduces errors

I’m going to come right out and say that I have a strong preference for static typing in a programming language, especially as it applies to medium and large sized applications with multiple developers. Here’s why: 1. Refactoring: IDE’s make … Continue reading

Posted in Java, Ruby, Software Engineering | Leave a comment

Testing with mock objects

I put together a workshop for the team at work on unit testing and design with mock objects. I opted to show a small sample using both EasyMock and JMock. I'd used JMock before but EasyMock had some nice surprises … Continue reading

Posted in Java | Leave a comment

Java's verbose XML API

It feels like it takes me too many lines of code in Java to create a new XML document, transform it, and then validate the result. At every company I've worked at we've ended up with an XML utility class … Continue reading

Posted in Java | Leave a comment