10,000 Lines of Crap (?)
August 9th, 2006Here’s an interesting software philosophy that tries to put a hard limit on manageable code. Is more than 10,000 lines of code too much to manage? Is the “Keep It Simple Stupid” principle taken a bit too far?
While they happen to be the authors of the best X11 Window Manager on Earth, I may not subscribe to their philosophy. Manageability of large applications can be achieved with a solid architecture, good set of development tools, and an open communication policy between the programmers. It’s all about having the right resources to scale. Does that mean that any application over 10K is not well written or optimized? No. It simply means that lines of code shouldn’t be the determining factor for when you should stop coding. That’s my opinion.






August 10th, 2006 at 1:01 am
All such metric shibboleths are bullshit.
August 14th, 2006 at 4:29 pm
The idea of the 10,000 lines boundary is primary dedicated to the UNIX environment, however it might be a sane metric for other environments as well.
In the UNIX environment the pipe-filter software architecture is one of the key ideas. Any filter which exceeds 10.000 lines must be seriously wrong.
In other environments, such as Java or Smalltalk, this rule can be applied as well. Any package which exists of more than 10.000 lines must be seriously wrong.
It is hard to judge about the general case, but no heavyweight UNIX process should depend on more than 10kloc on its own (of course it will depend on libraries, but even those shouldn’t exceed this maximum each). See Minix or Plan 9 for examples where much care was taken to not exceed such boundaries, even if they choosed not the 10kloc metric…
Also take into account, that the 10kloc rule has been choosen with simplicity in mind, a basic paradigm must be easy to grasp. ‘Not exceeding 10kloc’ is one principle of many others, which might be much more important…
–Anselm