Quantcast
Channel: Steve Freeman » Coding
Browsing all 15 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Unpack the bag

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

View Article


Expressiveness makes the difference

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

View Article


Image may be NSFW.
Clik here to view.

SOLID Development Principles – In Motivational Pictures

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

View Article

Mock Roles not Objects, live and in person.

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

View Article

Java synchronisation bug on OS/X?

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

View Article


IWonderAboutInterfaceNames

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

View Article

Keep tests concrete

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

View Article

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

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

View Article


Machiavelli on code quality

As the doctors say of a wasting disease, to start with, it is easy to cure but difficult to diagnose. After a time, unless it has been diagnosed and treated at the outset, it becomes easy to diagnose...

View Article


Image may be NSFW.
Clik here to view.

Is Dependency Injection like Facebook?

The problem with social networks I think there’s a description in Paul Adams’ talk about online vs. offline social networks of how Dependency Injection goes bad, particularly when using one of the many...

View Article

An example of an unhedged software call option

At a client, we’ve been reworking some particularly hairy calculation code. For better or worse, the convention is that we call a FooFetcher to get hold of a Foo when we need one. Here’s an example...

View Article

Test-First Development 1968

Seeing Kevlin Henney again at the Goto conference reminded me of a quotation he cited at Agile on the Beach last month. In 1968, NATO funded a conference with the then provocative title of Software...

View Article

Another reason not to log directly in your code

I’ve been ranting for some time that it’s a bad idea directly to mix logging with production code. The right thing to do is to introduce a collaborator that has a responsibility to provide structured...

View Article


On the composeability of Hamcrest matchers

A recent discussion on the hamcrest java users list got me thinking that I should write up a little style guide, in particular about how to create custom Hamcrest matchers. Reporting negative scenarios...

View Article

Some mocks

“I don’t use a knife when I eat, if need one it means the food hasn’t been cut up enough.” “Forks are unnecessary, I can do everything I want with a pointed knife.” [1] One of the things we realised...

View Article

Browsing all 15 articles
Browse latest View live