[ Content | View menu ]

Archive for 'Coding'

Calling an Oracle stored procedure with a Table parameter with Spring’s StoredProcedure class

11 Feb 2010

I don’t normally do this sort of thing, but this took my colleague Tony Lawrence and me a while to figure out and we didn’t find a good explanation on the web. This will be a very dull posting unless you need to fix this particular problem. Sorry about that.

We happen to be using the [...]

Coding - 0 Comments

Keep tests concrete

7 Sep 2009

This popped up on a technical discussion site recently. The original question was how to write tests for code that invokes a method on particular values in a list. The problem was that the tests were messy, and the author was looking for a cleaner alternative. Here’s the example test, it asserts that the even-positioned [...]

Agile Programming, Coding, Test-Driven - 0 Comments

IWonderAboutInterfaceNames

27 Apr 2009

InfoQ has just published Udi Dahan’s talk from QCon 2008 on “Intentions and Interfaces”. It’s good to see the message about focussing on Roles rather than Classes being pitched to a new audience. That’s what we were trying to talk about in our “Mock Roles, Not Objects” paper.

I wonder, however, about his style for naming [...]

Coding - 8 Comments

Java synchronisation bug on OS/X?

18 Mar 2009

I’ve come across what might be a synchronisation bug while working on the book.

The end-to-end tests for our example application use the WindowLicker framework to drive the Swing user interface. Our test infrastructure starts the application up in another thread (it’s as close as we can get to running from the command line), then [...]

Coding, Test-Driven - 2 Comments

Mock Roles not Objects, live and in person.

8 Mar 2009

At the recent Software Craftsmanship conference in London, Willem and Marc ran a session on Responsibility-Driven Development with Mocks for about 30 people. Nat Pryce and I were sitting at the back watching and occasionally heckling.

The first striking thing was that when Willem and Marc asked who was using “Mock Objects” most everyone put [...]

Agile Programming, Coding, Test-Driven - 2 Comments

SOLID Development Principles – In Motivational Pictures

12 Feb 2009

Excellent series of images from Derick Bailey. Here’s an example:

Single Responsibility Principle
Just because you can, doesn’t mean you should.

RT @Jtf

Coding, Software culture - 0 Comments

Expressiveness makes the difference

17 Dec 2008

I was chatting with Keith about what the Software Craftsmanship event should really be about, in the context of a discussion of whether some of Jason Gorman’s list of guitar heroes are actually worth listening to (you still with me?) 1.

The next obscure piece of evidence is Maurice Murphy’s YouTube masterclass. For those who don’t [...]

Coding, Software culture - 2 Comments

Unpack the bag

6 Sep 2008

There’s a common pattern where an object is constructed with a Context object that carries all the dependencies the new object might need. It’s often used, for example, with classes that package up domain behaviour based on lower-level services, something like this:

public class PriceReconciler {
private final Context context;

public PriceReconciler(Context context) {
[...]

Coding - 4 Comments