3 ms·
Maybe I'm just charitably interpreting things, but #1 actually seemed OK to me. I think his point was that you want to separate the code that interprets your d
by ajross 18y ago
Maybe I'm just charitably interpreting things, but #1 actually seemed OK to me. I think his point was that you want to separate the code that interprets your data from the code that builds your data so that they can be tested in isolation. That makes a lot of sense to me. The "bad code" end of this spectrum would be an algorithm in the application logic that can only run when connected to a fully-stocked external data store. That's not very testable; ideally you want to suck in a "test set" from a file or whatever and hand it to the algorithm instead.
But yeah, it's not as simple as removing "new" calls from application logic; it depends entirely on what you're trying to construct.
- biohacker42 18y agoMaybe I've just seen one too many factory factories.