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?
@yegor256
Yegor Bugayenko
www.yegor256.com
Need Robust Software? Make It Fragile

Need Robust Software? Make It Fragile