Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: blmblm@myrealbox.com Newsgroups: comp.lang.java.programmer Subject: Re: Style Police (a rant) Date: 20 Sep 2011 11:28:08 GMT Organization: None Lines: 63 Message-ID: <9drbm7FtpjU1@mid.individual.net> References: <4e6d1fc5$0$308$14726298@news.sunsite.dk> X-Trace: individual.net rZuz5gURxlylMeDDKS4HQwNzJON94pxtSykIfG4cZvORH91Q9t X-Orig-Path: not-for-mail Cancel-Lock: sha1:/6nHwauDwNJyVaEDk5EXrd+VGik= X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8171 In article , Eric Sosman wrote: > On 9/14/2011 8:30 AM, Andreas Leitgeb wrote: > > Arne Vajhøj wrote: > >> On 9/11/2011 11:45 AM, Arved Sandstrom wrote: [ snip ] > 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! > Well, yes, but .... You don't think there's pedagogical value in having students reinvent some fairly basic wheels? (I'm a bit uncertain myself -- it's hard not to think that every programmer should do some of these basic things *ONCE*, since otherwise there's some basic understanding that's lost, but then again the knowledge base keeps expanding, and expanding, and maybe these days it really is so much more important to know how to use the building blocks than to create them that nothing is gained by making sure you *know* how to create them.) -- B. L. Massingill ObDisclaimer: I don't speak for my employers; they return the favor.