Briefle
LearnGlossaryPricing

Briefle words · Code & architecture

Positive boolean naming

Naming true/false values after the positive fact (is_enabled, is_occupied) and adding 'not' only where needed.

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: A stores is_occupied and is_window_open; B stores their opposites, is_unoccupied and no_window_open.

Related words

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

Room 2 · Naming

Learn “Positive boolean naming” in a five-minute lesson

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