I kind of like to think code itself could use this analogy. If a piece of code combines data from three systems, then maybe first fetch it from each one (maybe in parallel), then "wash" it (check preconditions, normalize, etc.) Then you hopefully have data which is ready for doing the core work without the code being muddled with fetching missing stuff and cleaning it. I can obviously find counterexamples when it is…
fetch A
wash A
fetch B
wash B
in terms of being easier to read. Of course sometimes there are performance benefits to firing off all the requests right at the start.Anyway I definitely agree that not separating the core logic out from the data fetching/cleaning is a bad idea.