Successfully reported this slideshow.

Need Robust Software? Make It Fragile

1

Share

Loading in …3
×
1 of 18
1 of 18

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Related Audiobooks

Free with a 14 day trial from Scribd

See all

Need Robust Software? Make It Fragile

  1. 1. Need Robust Software?
 Make It Fragile
  2. 2. @yegor256 Yegor Bugayenko
  3. 3. “Robustness is the ability to continue operating despite abnormalities” — Wikipedia
  4. 4. public int size(File file) { if (!file.exists()) { return 0; } return file.length(); }
  5. 5. public int size(File file) { if (!file.exists()) { throw new Exception( "file doesn’t exist" ); } return file.length(); }
  6. 6. Fail Safe
 vs
 Fail Fast
  7. 7. try { // something may go wrong } catch (Exception ex) { ex.printStackTrace(); } // keep going...
  8. 8. concealing
 vs
 revealing
  9. 9. size()
  10. 10. size()
  11. 11. size()
  12. 12. size()
  13. 13. tolerance
 vs
 arrogance
  14. 14. size()
  15. 15. “Robustness is the ability to continue operating despite abnormalities”
  16. 16. surviving
 vs
 operating
  17. 17. What do you think? @yegor256 Yegor Bugayenko www.yegor256.com

×