Conversation

Replying to
Don't really see how having a bunch of non-reused tiny functions helps if you aren't using any complex control flow or mutable variables. I don't think that makes the code more readable aside from naming sections of the code, which doesn't require functions.
2
1
Replying to
yep. i actually bought into this when i started programming and my code was **awful**. i re-wrote a 1k source file into 300 lines afterwards, and i could suddenly understand my own code again.
Replying to and
I'm all for finding ways to reuse code which make things simpler and easier to understand rather than more complicated. Lots of small functions, sure, but they should be used at least twice. I don't see the point of splitting things up into a bunch of ad-hoc functions and files.
1
1
Replying to and
Often I start refactoring and then realize I actually made the code longer and/or harder to understand so I don't bother applying it in the main branch. Unless the API makes a LOT of sense by itself or returning early simplifies things, I'm not making a single use function.
1
1
Show replies