Advertisement
Advertisement

More Related Content

Advertisement

Need Robust Software? Make It Fragile

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