Browsing All posts tagged under »tdd«

fun and games at xp-manchester

October 15, 2010


Last night was the October 2010 meeting of XP-Manchester, a local group set up by me and Jim McDonald. As always the meeting consisted of two halves, the first being a workshop (this time led by me) and the second being a coding dojo. For the workshop this month I ran a version of James […]

interviewed on railscoach

May 13, 2010


Charles Max Wood has just posted an interview he did with me a couple of weeks back. It’s about Reek, Refactoring in Ruby and agile development practices. I waffle too much, and make a couple of historical mistakes. Ho hum.

microtests for exceptions

March 2, 2010


Over on the Dev@Pulse blog Jim raises some interesting points about how and when to microtest the messages in thrown exceptions. Jim’s discussion got me thinking about how I solve the same problem myself, and on reflection I discovered I use a slightly different tactic than Jim’s: I write one test for each important piece […]

extract class or substitute algorithm?

January 31, 2010


I have a dilemma. In fact, I frequently have this dilemma, so I thought I’d ask your opinion on which way you would address it. I just completed a CRC session for the next feature I want to add to my codebase. One of the classes identified for the new scenarios is a particular kind […]

why i broke 89 tests

October 18, 2009


A couple of days ago I made a little change to Reek and to my surprise 89 tests broke, which is bad. I tweeted about it, and soon @logosity had asked me to write about why it had happened. I know the same sort of thing happens to people all the time, and it can […]

today’s kata

September 28, 2009


In Ruby, one easy way to check for palindromes would be to write a method such as this: class String def palindrome? self == self.reverse end end But the C++ part of my brain screams that this is likely to be very inefficient. So, today’s kata: test-drive a palindrome? method for String, ensuring (with tests) […]

a different use for CruiseControl

January 18, 2009


Until recently I had always thought of CruiseControl as a backstop, something that would check for silly mistakes during commit, or certain classes of environmental dependency in build, tests or deployment. And then, during December, two things happened to change that view; and now I use CruiseControl quite differently. As you know, I’ve been developing […]

the saff squeeze

November 27, 2008


In Hit ‘em High, Hit ‘em Low: Regression Testing and the Saff Squeeze Kent Beck outlines a very nice technique for isolating a defect using regression tests: “To effectively isolate a defect, start with a system-level test and progressively inline and prune until you have the smallest possible test that demonstrates the defect.” Kent provides […]

red, green, refactor … commit

September 29, 2008


As time passes I find myself getting more and more nervous about the amount of time between passing tests, and between commits to the source code repository. So when Neil asked me today where I put the “commit” step in my TDD practice, I said: red green commit refactor commit That extra “commit” at the […]

write tests for old or new features?

August 30, 2008


You have a pile of legacy code that’s hard to modify, hard to test, and never seems to be bug-free. You have some testers who are available to be moved to the front of the flow to write regression tests. Is it more cost-effective to have them write regression tests for current features or for […]


Get every new post delivered to your Inbox.

Join 1,105 other followers