DEV Community

Discussion on: Refactoring is not so scary

Collapse
 
lobsterpants66 profile image
Chris Shepherd

"Functions length should be 7-20 lines of code." - shouldn't that be "Maximum 7-20 lines of code?".
Your example functions are not 7 lines long ;)

Collapse
 
spalonytoster profile image
Maciej Posłuszny

Of course it should. Thank you :)

Collapse
 
moopet profile image
Ben Sinclair

Well that could be simplified to "maximum 20 lines of code" if we were being all programmery about it.

Collapse
 
lobsterpants66 profile image
Chris Shepherd

Ahh but then it would all go wrong when someone puts in 0 or -1 lines of code.
and are we only allowing integers....

this is trickier than I thought ;)