She may be wrong about that particular number, but it is really no secret that reducing the scope is a key ingredient to solving problems and avoiding bugs. Another key ingredient is to stay far away from side-effects and Erlang does a fairly good job of riding that fine line between ideal theory and pragmatism.
edit: gender of author corrected, thanks Nathancahill
Re:Erlang beauty
by nathancahill on Tuesday November 17, 2015 @08:41PM
(#10585358)
*she
When in doubt, 'they' is a safe bet too.
To be fair, in our circles, "he" will be right about 95% of the time.
Re:Erlang beauty
by nathancahill on Wednesday November 18, 2015 @11:22PM
(#10592725)
:/
shim also works
Pretty sure nobody did a study with a specific number of LoC for best understanding, because it probably depends on a lot of things. But quick understanding is a function of consistent style and a small number of things to keep in mind required to understand each part.
Things are easier to understand when the deciphering part is done quickly and also when you only have to keep as few things in mind as possible.
An example of a Python statement that is short, but difficult to understand:
'\n'.join([map(some_func, a) + 'somth' for i, j in c.items() for a, b in i.items()])
https://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus...
This has got to place as one of the most misapplied research findings in history. If you have an aesthetic preference for 7 as a limit to the number of lines of code in a function, then, sure, do that, but don't pretend there is science behind it (or at least not this particular science.)