News for hackers. Stuff that matters.
Re:Robust Programming by figment on Thursday September 16, 2010 @04:17PM (#1699007)
one other useful thing to point out. It can often be harder to implement robustness at the bottom of your call chain. You may need to step up a layer.

user_method() call_to_get_info_from_remote_system()

Just because call_to_get_info_from_remote_system fails doesn't mean you have to be done.

user_method(tries) while i < tries if call_to_get_info_from_remote_system() == FAIL # log error if check_remote_system_reachable() # fatal error be done i++

granted this makes all kinds of assumptions like you can afford to retry this operation up to N times. It also may break the rule of "Stupidity"

There are no comments on this comment yet.