This is a useful thread to address the all too common question of: "Don't abstractions make it harder to debug code?" In other words, with lots of layers, doesn't it make it more confusing to follow code. Or, "isn't it annoying to have to look in 15 different classes for a problem instead of 2 or 3 bigger ones?"
Naturally, I tend to be in the camp that says no to the above questions. The link above gives some good explinations why.
I think one quote that summarizes it well is below:
In fact, if you're debugging, you want to be able to abstract away all of the trustworthy code. You know there aren't bugs there. You want to be able to tell your debugging tools that you trust that code to obey certain contracts or types, and be done with it. Now you can focus on the untrustworthy, buggy code.
No comments:
Post a Comment