The long way through Software Craftsmanship

What versus How

May 6, 2015 - 2 minute read - Comments - bookideawhat-vs-howgoos

After reading the GOOS1, the more and more I get this feeling of what vs how:

  • Information hiding
  • The total simpler than the sum of the parts
  • Extracting a concept so you can think about this. Makes you find better names:
    • test name
    • variable name
    • method name
    • interface / protocol name

I also got this feeling when reading Clean Code. But with this other book the smell is much harder, stronger. This same concept is repeated all over the book. In our discussions about the book, this concept appears again and again. I’m thinking of adding a sub-title to the book:

Growing Object-Oriented Software, Guided by Tests
What and not How

Applying this in your team

Now, there might be a problem if your team has a split opinion on ‘what vs how’ (i.e., part of the team prefers what and another prefers how)

Reasons I’ve heard to defend how:

  • The ones cited above
  • Concision / shortness
  • Code reusability
  • Easier to test, extracting to collaborators2

Reasons I’ve heard to defend what:

  • Knowing exactly what the code is doing: i.e., do not have to think what the name means and to what this corresponds

  1. Growing Object-Oriented Software Guided by Tests ↩︎

  2. Altough I believe you shouldn’t do anything just for the purpose of tests. If it also improves your design, OK, but only for the tests, no. ↩︎

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

Internal training: Testing is hard - just do it Self-study in May 2015