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

What's the least testable code you've had the pleasure of dealing with?

From my first commercial software job: a few thousand lines of complex C++ (mix of decoding the output of a mathematical model mixed with business rules) structured as a single "god class" with heaps of internal state and a dozen methods -- comically all of the methods would return void and took no arguments, and would call each other. It took days of careful refactoring and consultations with a colleague until it was possible to instantiate one of the things in a test harness and do nothing with it. In some sense this was dead simple code as there were no dependencies on external resources or concurrency.



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

Search: