3 ms·
I wrote something myself trying to figure out my thoughts about this a few years ago (note: I was sleep deprived when writing it...): https://madprof.net/nerdy
by deckiedan 9y ago
I wrote something myself trying to figure out my thoughts about this a few years ago (note: I was sleep deprived when writing it...):
https://madprof.net/nerdy/refactoring-really/ https://madprof.net/nerdy/refactoring-really/
There certainly has been a over-emphasis in some quarters on 'each function should only do one thing' and even 'most of my functions are only one or two lines long'. Possibly because it makes it easier to write tests for, and be certain you've covered all of the possible options. You just then end up writing 4 million tests.
It's all about clarity, I think, but different people find different things clearer in different situations.