I love guard clauses and conditions. Simply put, a “guard” in programming is something that checks that inputs are as expected. If they are not, the code either fails or defaults to some predefined result. I want to argue that
So I met this comment the other day†: †anonymized and exaggerated for entertainment purposes
/// The purpose of an objective highlighter is to highlight the relevant objectives.
public class ObjectiveHighlighter
Don’t write comments like this. Let’s break this down: “The purpose of an objective highlighter is to highlight the relevant objectives.” First off, we are
Designing finite state machines requires good discipline and a shift in design paradigm. It’s very easy to “break” a state machine by implementing improper design. It is very tempting to take shortcuts, but it never leads to clean lasting code.