4 ms·
Whether it's 200 lines or 2,000 lines, what's with the fascination of "X lines"?
by palish 16y ago
Whether it's 200 lines or 2,000 lines, what's with the fascination of "X lines"?
- enanoretozon 16y agoIt causes readers to either slap their foreheads and say 'oh wow, 200 lines? I could have done that! why didn't I think of it?' or 'oh wow, it takes true genius to hit just the right 200 lines. I could have never done that!', the common factor being 'oh wow'
- palish 16y agoWhy is the "I could have done that" reaction a good thing? That implies "this should have been done from the beginning, but the developers were lazy / incompetent" Also, it is better to have 500 lines of well-commented code with informative variable names, than just the right 200 lines. Software development should not be reserved for voodoo witch doctors who know just the right mysterious incantation to produce the desired effect. Encouraging people to have the mentality "do it in < N lines or don't try" seems silly.
- geoka9 16y agoRight. I'd also hazard a guess that it is not right to compare kernel-mode C to a shell script on a line-for-line basis.
- mikeryan 16y agoI imagine when you're talking about a code base the size of the Linux kernal, there is likely something to be said for code brevity. (There is also something to be said for "readable")
- theoj 16y agoNumber of lines is used as a proxy for complexity, especially among those who are less familiar with how the programming sausage is made (management, non-IT folks, etc.). To non-technical folks, it sounds pretty impressive that you can do a simple change (low # of lines) and get a huge improvement. Nevermind the fact that behind those couple of lines could be days of code analysis and several rewrites. It's the allure of the easy, "why didn't I think of that" kind of thing.