[pcductape] Now THAT'S good programming

  • From: Victor Firestone <vlfll@xxxxxxxxxxx>
  • To: Micha Silver <micha@xxxxxxxxxxx>,PCDuctape <pcductape@xxxxxxxxxxxxx>
  • Date: Fri, 02 Apr 2004 19:39:33 +0200

Now THAT'S good programming

It's the 1950s, and an oil refinery wants a computer to help plan the best mix of products on a daily basis, reports a programmer pilot fish who was there.

But it's not as simple as just wanting it. For one thing, programmers
are so rare that this vendor actually sends one along with each machine
it ships. "At that time, there were probably fewer than 50 capable
programmers for this model in the whole world," fish says.

And the vendor is so selective about who gets one of these incredibly
big machines that there's actually a committee that decides whether a
potential customer is worthy of a lease.

But the machine is installed at the refinery, and fish is installed
with it. He writes the custom product-mix program. And it works -- the
program takes about an hour to run and produces exactly the output

That's when the vendor's approval committee steps in -- and nixes the
lease because the machine will sit idle for 23 hours each day.

"But the only other machine in the company's line was orders of
magnitude slower," grumbles fish. "It couldn't have done the daily job
in less than two or three days, which would have made the results

So fish ponders. Then he allows that there MAY be a bug in the program.
He returns to the refinery and adds a delay to the code.

Now the program takes eight hours to run. The vendor's committee is
satisfied that the machine won't be wasted. The multimillion-dollar
lease is approved, and everybody is happy.

Time passes. Business managers at the refinery find more uses for the
computer. Then still more uses. Each new program takes up a slice of
the machine's idle time. And eventually, the total runtime required
approaches 25 hours per day.

Panic sets in, and the refinery sends for fish once more.

Fish ponders. Then he allows that, now that he has more programming
experience, he MIGHT be able to make his original program run faster.

Then he removes the delay from his program code.

Now the program again runs in an hour. There's great rejoicing at this
8-to-1 speedup. Total daily runtime drops to well under a day.

And everybody is happy once more.


TTFN – Vic /

"To laugh often and much; to win the respect of intelligent people and the 
affection of children;
to earn the appreciation of honest critics and endure the betrayal of false 
to appreciate beauty, to find the best in others; to leave the world a little 
whether by a healthy child, a garden patch or a redeemed social condition;
to know even one life has breathed easier because you have lived.


To unsubscribe from this list send an email to
pcductape-request@xxxxxxxxxxxxx with 'unsubscribe' in the Subject field
OR by logging into the Web interface.

To view the message archives simply go to: 
Take a look at our homepage at http://pcductape.freewebpage.org/

Other related posts:

  • » [pcductape] Now THAT'S good programming