The long way through Software Craftsmanship

Demand for TDD and Refactor

Apr 25, 2015 - 2 minute read - Comments - ideaoverheardjason-gormantddrefactorworkshopquote

When I went to the Jason Gorman’s TDD workshop (experience report here), he said something interesting regarding refactor and TDD:

In job offers / advertisements, TDD is much more in demand than refactor. But the latter is included in the former as an integral part.

Jason Gorman

I agree with the second thought: you cannot properly do TDD without refactoring, as it is an integral part; also the third phase.

For me, sometimes refactoring is the difference between code and “Clean Code” (as defined in the book by the same title). If I cannot find the (algorithmic) pattern for the software I’m writing, I try to introduce scaffolds to keep investigating until I can find a viable, general solution (if the problem requires it.)

Even after doing the refactor replace algorithm, the code might not have the responsibilities in the right place, the methods might be long, value objects not extracted yet, etc. This is where further refactor is needed to introduce all those qualities in the piece of software.

I believe that we programmers have done a bad job of communicating with the rest of the organization what refactoring is about. It has nothing to do with beauty, style or design (in the visual sense) but is related to maintainability, coupling, defects and quality. Money, in the long run, as its objective is to make it cheaper to change in the future, a better investment and ROI. This is the common language that the rest of the company understands.

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

Talks I have attended at the Craft Conf 2015 How I read Apprenticeship Patterns