Failfast
28
Welcome to Fail Fast Session By @AlSayedGamal 1
-
Upload
al-sayed-gamal -
Category
Design
-
view
221 -
download
0
Transcript of Failfast
Assertions
What’s assertion ?!
Make sure that your language fails on assertion error.!
When is the most suitable time to do assertion.!
Assertion doesn’t conflict with logging.
13
–Jim Shore
“However, it’s tough to know when to add assertions. One way to tell is to look for comments.”
16
23
and even better
If the maxConnections wasn’t found or mistyped it will throw!something like this one:
Summary
Don’t fail silently and save your time and out time.!
Assert whenever you comment.!
Assert.notNull(_instanceVariable).!
Fail with description.!
Use a global handler for users sake.
25
References
http://www.martinfowler.com/ieeeSoftware/failFast.pdf!
en.wikipedia.org/wiki/Fail-fast
26