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

You write tests for it. Really, the complexity of the whole doesn't necessitate complexity of the parts. Hell, I'll go as far to say that a facial recognition algorithm that is a single piece of complex code is also a horribly bad piece of code. And yes, if you are writing that sort of code, it will be hard to test. Because it's bad code.

> or any other sort of real-world code whose operation can't be summed up exactly in two lines of code?

By this, I assume you mean real-world code whose operations consist of 10,000 lines of un-modularized spaghetti code.



>>By this, I assume you mean real-world code whose operations consist of 10,000 lines of un-modularized spaghetti code.

That is the same thing that came to my mind. Indeed, if you write code like that it will be really hard to write automated test cases, debug, maintain, etc. etc.




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

Search: