Error Prone [draft]

Embed Size (px)

DESCRIPTION

A small assignment as a part of our introductory session of our algorithms class.incomplete and draft

Citation preview

* [2015-08-28 Fri 04:44] Computing is error-prone - 'On two occasions I have been asked [by members of Parliament], Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out? I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.' Charles Babbage, Passages from the Life of a Philosopher. - A 100% of the time, the output, or at least the nature of output is to be desired. If the nature of output is unknown, the computer's output "looks" erroneous. - In other cases, even if the outputs are expected, but the inputs being of an erroneous nature, the outputs are garbled too. This phenomenon is explicitly referred to as "Garbage in Garbage out". - Computation or data is sent or received over an unreliable network, and the applications themselves are unable to correct it - leading to wrong results. The program may just freeze or the machine come to halt. - Hardware issues like dying HDD leading to bad sectors ends up with the same fate as above. - Syntactical errors by the programmer leading to unknown behavior(output) - Wrong implementations (of algorithms or requirements) which could either end up giving wrong results or give delayed results which in some(impatient) cases could like an error. - Just wrong algorithms. Blame the programmer! - Precision errors - Rounding off in calculation between some rationals coruld result in values with unpredictable precision. We can understand how this little misunderstanding could wreck a havoc in a program. Nobody can help it! - Nonrandom random numbers - Some keys and calculations depend on randomly generated numbers, if they follow some pattern, the performance of the program can quickly deteriorate if not hang abruptly. - A bit too much of "bit frugality" - Attempt to conserve bit memory could mean errors in unfathomable situations. Y2K e.g! - A bit too much of optimization. "Premature optimization is the root of all evils" ~DonaldKnuth - Wrong paradigm or design, which doesn't conjure up as an error all by itself, but due to it maladies seep into the code from nowhere leading to all or few of the problems mentioned above. - There could be categorically some types of errors 1. Programming 2. Bad input 3. The position of earth, phase of moon and every unrelated aspect - The above are just attempts to find the roots of the error-prone nature of computers. There are many aspects to it other than just reasons, and,.. I'm not sure what they are! Prevention & solution could be two of them.