News for hackers. Stuff that matters.
Re:Book Review: A Philosophy of Software Design (2020) by bvrmn on Wednesday June 30, 2021 @07:58AM (#27687433)
The book's design approach suites TDD perfectly. Narrow deep modules allow to freely refactor internals and keep tests green.
Re:Book Review: A Philosophy of Software Design (2020) by _wp_ on Wednesday June 30, 2021 @08:00AM (#27687448)
I didn't say that the book's approach contradicted TDD, I'm merely quoting from the book and refuting one its claims (that TDD doesn't lead to good design). I agree that narrow and deep modules support refactoring internals if their unit tests are written to treat them as black boxes.
Re:Book Review: A Philosophy of Software Design (2020) by bvrmn on Wednesday June 30, 2021 @08:06AM (#27687486)
TDD in classical form (understood by most devs) aka "one test per function/method" leads to poor design indeed. There is a little training about why this approach couples code with tests and what to do instead.
Re:Book Review: A Philosophy of Software Design (2020) by rileymat2 on Wednesday June 30, 2021 @08:24AM (#27687605)
Yes, that would make for both terrible design and terrible tests.

I think sometimes people refuse to go past the words naming a practice or past the tldr; and it causes problems.