Erik Engheim
1 min readJul 6, 2021

--

Maybe my article was unclear on this, but I am not actually advocating replacing tests with REPL interactions. Rather I am using the REPL to help drive the development of the tests.

A REPL works as a combined testing and development environment. The testing in the REPL environment is what I use to develop my unit tests, regression tests and integration tests.

REPL based development doesn't mean you don't have automated tests. The difference from TDD is that you don't write your tests first. Instead you used the REPL to develop your intuition about how to best formulate a test.

Observing people much smarter than me with years of TDD experience, I have observed that TDD can really hamstrung otherwise brilliant developers. You force developers to design tests before their understanding of the code they are developing is sufficiently good to design a good test.

My impression from observing TDD practioneers is that TDD causes the production of a very high quanity of low quality tests. Poor tests are in my opinion determimental to developing quality code.

I have made this mistake in the past myself seeing unit testing as a sort of silver bullet. We ended up with too many poorly thought out tests which made refactoring and rewriting of code too difficult. And a low quality test doesn't help you catch problems that arise when you simply change design, but functionality is actually fundamentally the same.

--

--

Erik Engheim
Erik Engheim

Written by Erik Engheim

Geek dad, living in Oslo, Norway with passion for UX, Julia programming, science, teaching, reading and writing.

Responses (1)