Twitter

JUnit 4 with Hamcrest Examples

I’ve been meaning to put together an example of all the Hamcrest assertions that have been added to JUnit 4 way back in 2007 now. My assumption based on a number of recent client engagements is that if unit testing is being done with JUnit the default is still to rely on assertEquals() as the [...]

Clean Code Band

The image above probably needs a bit of explanation. After having a lingering todo I finally made a donation and requested a Green Clean Code band from Uncle Bob Martin. I was at a talk of his at SD West 2005. At that point he pointed out a rubber band he was wearing that he [...]

Faulty Hopes for UI Testing Tools

Michael Feathers wrote a tough post recently on UI testing tools. The fact of the matter is that UI based testing should be used for UIs: that’s it. You should not be testing your full application end-to-end through a UI Testing tool. First of all, that sort of testing couples some of the most important [...]

Developer Expectations

I came across a note of mine from last year on my baseline expectations for developers: All code is checked into source control on an hourly basis or at most daily. Every project has an automated build. (Maven, Ant) All projects are setup in continuous integration (Hudson) All code follows the current Java/Groovy coding standards. [...]

Java Development Skill Defaults: Spring/Hibernate/jQuery

Not too long ago a local recruiter noted at a JUG meeting: “I don’t care what else you have on your resume, but you have to have Spring and Hibernate. I know it was all EJB and SOA just a few years ago, but now if you don’t have Spring/Hibernate you’re not getting past the [...]

JUnit Not a Default In JDeveloper 11g

It’s almost 2010 and JUnit runners are still an optional download for Oracle JDeveloper 11g. JDeveloper is a reasonable IDE and it’s improved over the years. It has most of the basic features an Eclipse or IntelliJ IDEA user would expect including plenty of refactoring support. Leaving out JUnit integration was unfortunate. My assumption is [...]

Main Methods in Java Training Labs

A common pattern when going through labs for various java classes is the pattern of building some main() method, performing a number of operations and spitting out a bunch of System.out.println()s. It’s an easy way to get feedback and avoid having to start with much context. Unfortunately it’s really a procedural style and requires eyeballing [...]

Continuous Integration Game One Year Later

Hudson has a Continuous Integration Plugin game that gives you points for successful builds, adding tests, removing TODOs, etc. As a plugin it started out simple, but now allows you to get points based on: Doing a successful build. Adding new successful tests. Fixing PMD, FindBugs, or Checkstyle warnings. Fixing a compiler warning. Fixing a [...]

PHP and Javascript at OSCON 2009

I took an opportunity to head down to OSCON a week or so ago on a free expo pass. I always wanted to attend OSCON up in Portland, but I never had the opportunity to go. Anyway I invited another developer along and made the morning drive down to San Jose amid unusually light traffic. [...]

TDD Takes Years

Unit testing is a practice that takes years to sink in. For many the first experience with the green/red bar is interesting, but not life altering. Maybe it was just a quick demo. They go back to the normal debugging patterns in the IDE or with printing output to the terminal. They try testing for [...]