4 ms·
I challenge you to write code that is "testable" (easy to cover with tests for all the important functionality), but which is generally badly designed and struc
by necovek 2y ago
I challenge you to write code that is "testable" (easy to cover with tests for all the important functionality), but which is generally badly designed and structured.
(FWIW, while naming is probably as important, I am not accepting bad naming as that is too easy)
- morbicer 2y agoI present you Uncle Bob's own pretty horrible code: https://qntm.org/clean https://qntm.org/clean
- necovek 2y agoThanks: yeah, that's indeed pretty bad. FWIW, I don't see any tests for this, nor it looks simple to test it, so I don't consider this "testable" code — it looks like this was made to make other code testable, yet it fails to be testable itself. Also, naming is horrible as well (also noted in the article).