"need robust software? make it fragile" yegor bugayenko

18
Need Robust Software? Make It Fragile

Upload: yulia-shcherbachova

Post on 17-Feb-2017

171 views

Category:

Engineering


1 download

TRANSCRIPT

Need Robust Software? Make It Fragile

@yegor256

Yegor Bugayenko

“Robustness is the ability to continue operating despite abnormalities”

— Wikipedia

public int size(File file) { if (!file.exists()) { return 0; } return file.length();}

public int size(File file) { if (!file.exists()) { throw new Exception( "file doesn’t exist" ); } return file.length();}

Fail Safe vs

Fail Fast

try { // something may go wrong} catch (Exception ex) { ex.printStackTrace();}// keep going...

concealing vs

revealing

size()

size()

size()

size()

tolerance vs

arrogance

size()

“Robustness is the ability to continue operating despite abnormalities”

surviving vs

operating

What do you think?

@yegor256Yegor Bugayenkowww.yegor256.com