click below
click below
Normal Size Small Size show me how
Software robustness
Question | Answer |
---|---|
Robustness | 1) Fault tolerant 2) Graceful shutdown 3) Meaningful feedback on errors 4) Recoverable 5) Reliable |
How to obtain robust code | 1) Program defensively 2) Hide information 3) Reduce Complexity 4) Expect the impossible |
Program defensively | 1) Require your preconditions to hold 2) Ensure your postconditions hold 3) Defend your gates against intruders 4) Let no spies get out |
Hide information | 1) Use the language’s build in incapsulation mechanisms 2) or trick the language to hide the information 3) With no walls, defending the gates alone is not very effective 4) Never reveal your weaknesses. |
Reduce Complexity | 1) Bundle parts of code with high cohesion 2) Decouple bundled parts 3) Be sure that your units are well organized and cooperating 4) Don’t let one unit’s defeat loose the battle |
Expect the impossible | Remember Murphy’s law . . . Anything that can go wrong will go wrong |
Defensive programming | 1) Always check the preconditions, trust nobody! 2) Check your postconditions, doubt yourself! 3) Check your invariants, Remember the ACID rules Atomicy Consistency Isolation Durability |
The Big V | 1) Validation Planning - Validation Reporting 2) User requirements - User Acceptance Testing 3) System requirements - System Testing 4) Technical Architecture - Installation Qualification 5) Detailed Design - Unit&Integration Testing 6) Config,dev |
Testing documents | 1) Specification of invariants, pre-, and postconditions. 2) Specification of tests to run (perform). 3) Specification of the coverage of the tests. 4) Specification of expected output of the tests. |
How to encapsulate | 1) Only use public where nescesary according to contract. 2) Use Facade objects. 3) Use Data Transfer Objects and tokens. 4) Be as abstract as possible 5) Don’t promise more than required |