Re:What to Do When Your Colleague Creates Spaghetti Code
by laurent123456 on Friday September 16, 2016 @10:02AM
(#12514039)
> With regards to the article's example, refactoring your code for unit tests is making life easier for the computer, not humans.
I often find that writing programs with testability in mind leads to more self-contained code, with less dependencies and cleaner interfaces. All this tends to make the code easier to reason about. I'd be curious to see an example of code that's good for unit testing but bad for humans.
I often find that writing programs with testability in mind leads to more self-contained code, with less dependencies and cleaner interfaces. All this tends to make the code easier to reason about. I'd be curious to see an example of code that's good for unit testing but bad for humans.