The long way through Software Craftsmanship

Redesign as a new TDD phase

Apr 13, 2015 - 2 minute read - Comments - redesigntddtheory

In the last TDD workshop (experience report here), a conversation with Gary McLean Hall introduced to me this new concept of “Redesign” as a TDD phase.

Concept

As Gary introduced it to me1, it is a phase that might appear after refactor.

It is about changing the outside design without changing the expected behavior. I thought this was also included in the refactor phase.

How I do redesign

I usually do this “changing of the outside design” by applying a series of refactors 2 to the production code but not changing the test code; using a bridge / adapter to get to the new API from the old one. Later you can inline the scaffold and use the new API directly.

The same for the test code: when you want to change design in the test code, do not modify production code (a.k.a. model code).

Other thoughts

Merriam-Webster defines “redesign” as

to change the design of (something)

or

to revise in appearance, function, or content

an example:

The book’s cover has been redesigned for the new edition.

The Refactoring book (by Martin Fowler) describes “refactoring” as

Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure

Taken literally, the public API is not internal but external structure, so changing it, should belong to a phase that is not refactor (see definition), nor red (no failing tests), not green (making it pass). Maybe this phase is “redesign” or we have to take the refactoring phase less literally so it includes redesign. Any thoughts?

Other references

I’ve searched for redesign and refactor and this blog post came up. They cite redesign as a way of rewriting

This answer and the original question in StackOverflow is interesting

Redesign also appears cited in this blog post


  1. Excuse me if you explained it differently and I understand it wrong; you can always open a pull request to fix it here ↩︎

  2. thanks for the clarifying refactor vs refactoring here ↩︎

Disclaimer about AI/GenAI

As of 2026-05-06, the text in these articles and blog entries has been written without AI/GenAI, except I sometimes use a spellchecker to fix errors. Think Word's spellchecker, not ChatGPT.

Notes, as of today (2026-05-06):

  • No code snippet has been automatically generated, nor vibe-coded, nor generated and reviewed.
  • I don’t have any article with AI contribution.

For future entries:

  • I may have used GenAI for the code in the repo. The code I exemplify/copy in the article will always be reviewed and tested, not vibe-coded. I will specify it in each snippet or at the top/bottom of the article.
  • I normally don't use it for the text contents, although if I have used it for the article text, it would be indicated as such.

Any entry before 2026-05-06 does not contain any AI/GenAI.

For more information, read the AI/GenAI Policy

Experience report: Test-driven development intensive, by Jason Gorman Destructuring as a refactor in Clojure