5 exercises — choosing if, when, unless, and provided-that correctly in runbooks, error messages, API docs, and post-mortems.
0 / 5 completed
1 / 5
A runbook says: "__ the health check fails three times consecutively, the load balancer removes the instance from the pool." Which word correctly begins this conditional for a documented, repeatable procedure?
"When" is the best choice for a documented operational procedure that describes what always happens under a specific condition. In technical documentation, when implies "every time this occurs" — it's a statement of system behaviour, not speculation. If implies uncertainty: "this may or may not happen." Compare: "When the token expires, the client must re-authenticate" (documented behaviour, always happens) vs "If the token is malformed, return 401" (conditional case that may or may not occur). In runbooks and system documentation, prefer when for automated system responses and documented protocols. Use if for troubleshooting scenarios where the condition is uncertain. Option C ("Unless") means "except if" — negative conditional, changes the meaning. Option D ("Provided") is overly formal.
2 / 5
An error message in the application reads: "__ you see this error, check that the DATABASE_URL environment variable is set correctly." Which conditional starter is most appropriate for a user-facing error message?
"If" is the standard choice for user-facing error messages and troubleshooting instructions. Error messages address a specific scenario the user may be experiencing right now — it's not describing a universal behaviour, but a particular case. "If you see this error, check…", "If the connection fails, verify…", "If authentication fails, ensure your credentials are valid." Option A ("When") would imply this error always occurs under this circumstance — too strong for an error message. Option C ("Should") is a more formal conditional often seen in API documentation: "Should this error occur, contact support." It's correct but slightly more distant in tone — better for formal docs than inline error messages. Option D ("Unless") is a negative conditional — wrong here.
3 / 5
An API reference uses a hypothetical scenario: "__ you need to support multiple regions, you would configure a separate replica set for each." Which form creates the correct hypothetical (second) conditional?
"If" starts a standard second conditional here — but context matters. A second conditional uses: If + past tense, would + base verb. "If you needed to support multiple regions, you would configure…" — this is the hypothetical/advisory form. However, the sentence as given uses "need" (not "needed") and "would configure" — making it a first conditional with advisory tone. In technical documentation, the first conditional (If + present, present/will) is more common for advice and guidance: "If you need to support multiple regions, configure a separate replica set." Second conditionals appear when describing scenarios that are unlikely or theoretical. Option B ("Were you to") is a formal inversion of the second conditional — grammatically correct but overly formal for API docs. Option C ("Should") is also a formal inversion: "Should you need to support multiple regions, configure…" — acceptable in formal API reference.
4 / 5
A post-mortem root cause analysis states: "__ the rate limiter been enabled, the cascade failure would not have occurred." Which conditional type and form is this?
The original sentence uses an inverted third conditional — a formal alternative to the standard form. Standard form: "If the rate limiter had been enabled, the cascade failure would not have occurred." Inverted form (formal): "Had the rate limiter been enabled, the cascade failure would not have occurred." Both are correct. The third conditional (If + past perfect, would have + past participle) refers to a hypothetical past — something that did not happen and its imagined consequence. Post-mortems frequently use the third conditional to discuss what could have prevented the incident: "If the circuit breaker had triggered, the downstream services would not have been overwhelmed." Option B is the second conditional — for hypothetical present/future. The distinction is crucial in post-mortems: use the third conditional for past counterfactuals.
5 / 5
A deployment guide states: "__ you follow these steps in order, the migration will complete without data loss." Which conditional conjunction is most appropriate here?
"Provided that" is the most precise choice here. It means "on the condition that" and signals a required dependency: "Provided that you follow these steps in order, the migration will complete without data loss." This is more emphatic than if — it stresses that following the steps is a prerequisite, not optional. Other alternatives: As long as, So long as, On condition that — all carry the same nuance of strict prerequisite. Option B ("If") is grammatically correct and more common, but less emphatic. Option A ("Unless") means "except if you follow" — it reverses the logic and creates a negative conditional ("Unless you follow these steps, data loss will occur" — a valid different sentence). Option D ("Even if") means the outcome holds regardless — the opposite of what is intended here.