The distinction between "new code" and "maintenance" doesn't quite cut it.
A more interesting percentage might be: maintaining one's own code versus
maintaining someone else's code.
This is important. If you advocate code re-use, it follows that
you advocate spending more time maintaining and less originating. If
your preferences run the other way, you are not re-using enough code.
When I was young (shovelling coal into the furnaces of the early
steam-powered computers, and leering lasciviously at Lovelace), memory
was short and CPU cycles long: Both were scarce and hence expensive.
Programmer labor (sometimes called human labor, but that's debatable)
was cheap in comparison. The product of that labor was therefore also
cheap, easy to discard and re-write. "Re-doing it better" was laudable.
But memories have grown and CPU cycles have shrunk. I recall a
machine whose time was billed at $100/hour, during which time it could
perform maybe 0.3 billion instructions (if it never had to wait for
I/O and there wasn't too much floating-point in the mix). Today's
machines can get through 0.3 billion instructions in a second or two:
That's more than three decimal orders of magnitude faster. That same
machine deployed 1/8 MB of memory; nowadays even a bare-bones El Cheapo
laptop has 2 GB, four decimal orders of magnitude more. And the old
machine cost maybe $500,000 instead of $700 (which is about $125 in
1970 dollars), for another three-plus decimal orders of magnitude
improvement.
Meanwhile, the appetite for code -- the demand for programmer
output -- has risen, and although the supply of programmer labor has
increased and the tools of programmer productivity have improved, they
have not kept pace with demand. The balance is reversed: Programmer
time is scarce and expensive, CPU time and memory are plentiful and
cheap.
So if you want to produce software cost-effectively, it follows
that you *must* re-use existing code. And if you must re-use code,
it follows that you must maintain it -- and the really cost-effective
programmer, the one who will get to market first and with lower
overheads than the competition, will be the one who writes *no*
original code at all. It's too slow and expensive, and too last
millennium.
Ponder this, while thinking about the average Computer Science
curriculum. "Students, today you will implement an AVL tree." Bah!