This programmer discovered the hard way the importance of testing:
in 1998, i made a C++ program to calculate pi to a billion digits. i coded it on my laptop (pentium 2 i think) and then ran the program. the next day i got a new laptop but decided to keep the program running. it’s been over seven years now since i ran it. and this morning it finished calculating. the output: "THE VALUE OF PI TO THE BILLIONTH DIGIT IS = "
mindblowing eh? i looked in the code of my program, and i found out that i forgot to output the value :(.
Comment: true story, i fixed the code and am running it again. (Source)
This cautionary tale reminds me of a certain fictional computer that worked for 7-1/2 million years to calculate the meaning of life, only to output the number 42:
"I think the problem is that the question was too broadly based…"
"Forty two?!" yelled Loonquawl. "Is that all you’ve got to show for seven and a half million years’ work?"
"I checked it very thoroughly," said the computer, "and that quite definitely is the answer. I think the problem, to be quite honest with you, is that you’ve never actually known what the question is." (Source)
Article published on August 18, 2008
|If you like this article, please share it:|