Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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)



I present you Uncle Bob's own pretty horrible code: https://qntm.org/clean


Thanks: 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).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: