3 ms·
Is it difficult to believe that functions can be "too small"? I've found myself in both code bases with enormous 5kloc functions as well as code bases where I h
by aaron-santos 6y ago
Is it difficult to believe that functions can be "too small"? I've found myself in both code bases with enormous 5kloc functions as well as code bases where I had to juggle 10 1loc functions in my head in order to figure out what the hell was going on. Both are their own forms of torture.
A 5loc/function sweetspot sounds about right.
- christophilus 6y agoExtremes are generally suboptimal, but the prevailing wisdom seems to be to have many small functions, so I’m all for a study that pushes us back to the middle.