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: |
August 18th, 2008 at 11:33 am
[…] The Answer is 42, aka The Importance of Testing wwe summerslam 2008 […]
August 18th, 2008 at 12:22 pm
[…] The Answer is 42, aka The Importance of Testing wwe summerslam 2008 […]
August 18th, 2008 at 7:40 pm
[…] The Answer is 42, aka The Importance of Testing wwe summerslam 2008 […]
August 20th, 2008 at 2:35 am
[…] The Answer is 42, aka The Importance of Testing wwe summerslam 2008 […]
September 24th, 2008 at 7:19 am
Gutted!
As a fellow developer I can’t think of anything worse that does not involve someone dying.
Don’t forget to turn off automatic update on your new computer, or you might never get to the end of the calculation (it seems to reboot your PC terminating all processes if Microsoft determine an update important enough). Of course, you should get your answer a lot quicker this time if you run it on your new old laptop, as I should imagine it is at least twice as fast.
Would love to know the answer, btw. Hope it’s not a circular reference…
August 25th, 2010 at 7:32 am
The importance of testing? What if you hadn’t injected the fault in the first place? I’ve written a post that explores “Is more testing the answer?” Find it here http://mauriceonsoftware.blogspot.com