Various rules to keep in mind
Abraham's Rules (source: Wikipedia)
The rules apply to class implementations (components) in the presence of exceptions; they are as follows:
-
The strong guarantee: that the operation has either completed successfully or thrown an exception, leaving the program state exactly as it was before the operation started.
-
The basic guarantee: that the invariants of the component are preserved, and no resources are leaked. Often referred to as the weak guarantee, because following an exception the system is left in a safe but unknown state.
-
The no-throw guarantee: that the operation will not throw an exception.
Clarke's Three Laws (source: Wikipedia)
-
When a distinguished but elderly scientist states that something is possible, he is almost certainly right; when he states that something is impossible, he is probably wrong.
-
The only way of discovering the limits of the possible is to venture a little way past them into the impossible.
-
Any sufficiently advanced technology is indistinguishable from magic.