3 ms·
Garrett Smith did a talk on Writing Quality Code in Erlang[1] which highlights this priciple of separating intention from implementation. He starts with a 20 li
by benjaminjosephw 10y ago
Garrett Smith did a talk on Writing Quality Code in Erlang[1] which highlights this priciple of separating intention from implementation. He starts with a 20 line function and refactors it into 16 separate functions. The result is much more verbose but it's much easier to read, understand and change. I think terseness rarely does programmers any favours in the long-run.
[1] https://www.youtube.com/watch?v=CQyt9Vlkbis https://www.youtube.com/watch?v=CQyt9Vlkbis
- lsaferite 10y agoIt would be interesting to see an IDE that displayed tiny functions inline (collapsable) in cases like this. This way I get both worlds. Small functions, but the ability to read the program flow straight through.