On the Hard Problems
by in Coded Smorgasbord on 2020-02-06As the saying goes, there are two hard problems in computer science: naming things, cache expiration, and off-by-one errors. This little snipped of anonymously supplied PHP code highlights the first one of those challenges:
// if no error commit
if ($is_fail) {
$binder->commit();
}