Skip to content

Instantly share code, notes, and snippets.

@rodigu
Last active February 17, 2025 14:03
Show Gist options
  • Save rodigu/0a4dcf6b6f9dbac490a6d1e8af3077e5 to your computer and use it in GitHub Desktop.
Save rodigu/0a4dcf6b6f9dbac490a6d1e8af3077e5 to your computer and use it in GitHub Desktop.
unit testing considered harmful?

in searching more in depth for topics in software architecture, i have come accross Simon Brown's Software Architecture vs Code lecture, for GOTO 2014.

the section that most caught my attention, was his reference to Why Most Unit Testing is Waste 1, by James O Coplien.

in the paper, a specific quote from Coplien caught my attention:

(...) notions such as: “Every line of code has been reached,” which, from the perspective of theory of computation, is pure nonsense (...)

which is, undeniably true and, as i tought more about it, also comically unfortunate that lines of code reached is used as a measurement of test coverage.

the lecture and paper also reminded me of Dijkstra's Go To Statement Considered Harmful. mostly because the former was given at GOTO, but also due to how the latter would seemingly fit into the classic considered harmful phrasal template.

Footnotes

  1. here, i have included a reference to a reproduction in PythonTest because the original source seems to be a dead link

@rodigu
Copy link
Author

rodigu commented Feb 17, 2025

I tend to find this more in Eastern European countries, where the lack of widely available computing equipment forced people to think. There simply weren’t enough computers to go around. When I first visited Serbia back in 2004, the students at FON (the faculty where one learned computing) could get to a computer to access the Internet once a week. And the penalty for failure is high: if your code run doesn’t work, you have to wait another week to try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment