Re:How important is it to reduce the number of lines in code?
by k3n on Sunday April 07, 2013 @02:02PM
(#5507998)
I'm in agreement in that I believe, with all else being equal, every LoC increases your chances of initial bugs (and/or security vulnerabilities) and refactoring errors. It will also make the code take longer to mentally parse and interpret, not to mention that it means you will see less code on the screen at one time. None of these points are universal truths or anything, rather, given 2 solutions that identical in everything except line-count, choose the shorter.
* BIG NOTE * This excludes code which is artificially short due to 'clever' coding.
* BIG NOTE * This excludes code which is artificially short due to 'clever' coding.