You might as well replace "hardware bug" with "a wizard put a curse on the OR operator" or "the president put a tariff on OR imports", and it would be more believable.
I think it should read:
At every place X in the following expression, introduce a boolean negation if there isn’t one and remove one if there is, and
Maybe even better:
At every place X in the following expression, introduce a boolean negation. If you get two concecutive NOT's, they can be removed.
Next, I don't see how
timespent <= duration
is the negation of duration > time_spent
?If user is blacklisted return access denied; If account is expired return access denied; If no conditions match return access granted;
Wouldn't that be more effective?
The idea for the article was to make a real example of logical equivalence, as books on the subject stay pretty abstract. - like others have mentioned, in the real world there are smarter choices to be made.
Thanks.
The issue was that for some reason, different types of code had different font size settings.