Hi all,
Programming languages: FORTRAN, various kinds of Basic (best for quick and dirty programs), Aion 7 (an expert system language); occasional C, C++ (I don't like assembly languages, however they're renamed), java rarely.
In ancient history, assembly, algol and pascal. The later two, as well as Aion, insist on declaration. It is actually from those languages that insisted on typing that drove me away from it.
The declaration statements and the rule-of-thumb about one page code are tied together to some degree. For a lot of us, the more pages you have to juggle to understand a procedure, the harder it is. Lengthy declarations extend the pages; they obfuscate important declarations by surrounding them with a forest; and, if you don't have some default typing scheme, make you flip back and forth between the code and the declarations. Kinda like trying to read a book when you have to keep flipping back to the glossary or dictionary. My declarations are usually saved for important variables that, even though they follow the implicit typing scheme, need commenting for clear understanding of the code.
Certainly there is no point to artificially break up code that is clear as it is. Sometimes one has a very sequential method that trudges on with little branching or logical complexity. But even if it sequential, it often improves the readability to intermix comments and calls to subroutines. This way one has an upper-level program: e.g., First we're going to do a setup for the program; then we do step a, which calculates the widgets; then we do step b which sorts the widgets; then, depending on b, we either do c, invert the widgets or d, calculate an adjusted set of widgets, etc. Each step has one or a few calls to some well-named/commented subprograms.
I often write programs of thousands or tens of thousands of lines of code. A current project I'm working on --spectroscopic data reduction -- currently is about half done and contains 3360 lines of code (not counting comments, blank lines, etc., spread across 128 subprograms. That is about 25 lines of code per subprogram and six lines of declarations. There are two or three subprograms that spread over two pages or more and those are the ones I have the least faith in (although they seem to be working). They are complex because I don't understand them fully enough to make them shorter. Like Mark Twain said at the end of a letter --' I'm sorry but I didn't have the time to make this shorter'--
A second, more mature program, having to do with non-local thermodynamic equilibrium radiative transfer in turbulent plasmas, currently has about 5000 lines of code in only 26 subprograms. These are way too long and are really difficult to debug or to add new physics to. My only excuse is that some routines grew as we learned more about the physics. I've seriously considered taking a month or so and rewriting it into smaller, better organized routines. These also have about one line of declaration to five lines of code.
I would say that other fields I've written software for, such as ops analysis, dp, huge rule-based programs that compute benefits for millions of people, pretty much conform to these kinds of numbers.
I'd say the one page rule of thumb is primarily a human limitation to what one can hold completely in one's head at one time. Beyond that, you're probably thinking of it at multiple levels...various levels of summary or outline. It seems, for many of us, to let the code reflect that mental organization.
You keep mentioning efficiency. I've written lots of real-time code, concurrent code, and code that must run tens of thousands of times an hour. My approach, in the 'modern' computer era, has always been to insist on clarity of code first. If the hardware can't keep up, buy more hardware. It is almost always cheaper that software that cannot be maintained or passed on. I have a counter example to this but it is much more complex to discuss and would extend this lengthy post to an intolerable length.