Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So instead of that 300 line function you'll need to have a complete grasp over thirty 10 line functions and how they connect to do what you want. Yes, that is perhaps an improvement, but his point still stands. Just because you isolate certain units does not mean that a mental model of the entire program flow is "fairly useless". The majority of the software that I use (that I know of) is developed outside of the Agile/XP "revolution", and it seems to be doing just fine.


Just be sure that each one of the 30 function is doing something interesting and obvious at the same time.

For example, if your language lacks a CopyTagedMatrix then you just write one, it gets the correct size, allocates the memory if necessary, copy the elements and return the new matrix. Now you can use it without remembering the implementation details, and it’s much clearer than the 10 lines that necessary to get the bounds and the fors to iterate over the matrix.

An extreme example is the GMP bignum library. You use each function as magic, and never read the implementation details. (Unless it’s in a very tight loop in a very hot part of the most important feature of your program, but I doubt that it’s good to use GMP in that place.)


Can someone have a complete grasp over the 15M lines of code in the Linux kernel?


I think his observation is relevant at any level of abstraction.

Gates had a complete sense in his head of how his program worked at the level of machine language. But not at a lower level of CPU microcode, or transistors. So even he, even then, was not claiming to have "total" understanding in the sense I think you mean.

Likewise if the Linux kernel (or your distributed web app) is organized into a reasonable set of "chunks", then it is possible to have usefully complete sense of how it works. The implication being that if it's not organized -- or organizable -- like that, you have a problem.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: