Briefle
LearnGlossaryPricing

Briefle words · Code & architecture

Double negative

A condition that negates something already negative, like 'not unoccupied', which the reader has to untangle in their head.

Say it to an AI

Python should_heat(thermostat, home, room_temp_c) for the hub's heating rules, with a Home dataclass. Use positive boolean naming throughout (is_enabled, is_occupied, is_window_open), no negated fields like is_unoccupied or no_window_open, so no condition ever becomes a double negative; guard clauses first, then pick the comfort or eco target.

How an expert would brief the stronger version of “Heating rule”.

See it

Try it as a puzzle →

Python rule on a smart-home hub that decides whether to switch the heating on.

Study A · the stronger one
Study B · the weaker one

Why: B's 'if not home.no_window_open' and 'if not home.is_unoccupied' are both double negatives; A's versions are 'if home.is_window_open' and 'if home.is_occupied'.

Related words

  • Intention-revealing name
  • Magic number
  • Single responsibility principle
  • Boolean
  • Predicate
  • is/has/can prefix
  • Flag argument
  • Abbreviation

Room 2 · Naming

Learn “Double negative” in a five-minute lesson

Start free
AI can build almost anything. The bottleneck is saying what you want.
WordsPricingTermsPrivacyRefundsContact
© 2026 Briefle