I keep tripping over "true, false, true"

Programmers are fed up with mystery yes-no code and the comments got spicy fast

TLDR: A developer called out confusing code that uses strings of yes-or-no settings, saying it slows everyone down because readers have to guess what each one means. In the comments, people split between “make it explicit” and “don’t overcomplicate it,” turning a tiny coding gripe into a surprisingly fiery readability war.

A seemingly tiny coding annoyance has turned into full-on comment section theater: developers are venting about those dreaded lines packed with mystery yes/no switches, like true, false, true, that force you to stop, squint, and play detective. The original complaint was simple: when a line of code makes even its own author scroll away to remember what it means, something has gone wrong. The proposed fix? Write it in a way that actually says what’s happening, instead of making readers decode a secret message.

But the real fireworks came from the crowd. One camp basically said, “Yes, this is awful, make it readable!” with people praising object-style inputs as the closest thing to named settings in JavaScript. Another camp pushed back hard, warning that this can become a team obsession and add extra baggage everywhere. One commenter even waved the old-school flag for bitmasks, arguing that ADMIN | SENDMAIL is way clearer than a soup of random true and false values. Others tossed in quieter fixes like documentation notes, while one commenter dropped the gloriously dramatic phrase “boolean blindness”, which sounds less like a coding issue and more like a medical emergency.

The vibe? Equal parts therapy session and nerd cage match. Everyone agrees unreadable code is a time thief. They just can’t agree on whether the cure is elegant, verbose, or a language redesign.

Key Points

  • The article examines how multiple positional boolean arguments make function calls harder to read and understand.
  • It uses examples such as `createUser(user, true, false);` and `updateSettings(user, true, false, true, false);` to show how readers must decode argument meaning.
  • The article says inline comments explaining boolean parameters indicate that the function API may be unclear.
  • It recommends replacing positional booleans with options objects so argument names appear directly at the call site.
  • It also suggests that some boolean flags represent distinct actions and may be better expressed as separate functions, while noting that a single obvious boolean can still be acceptable.

Hottest takes

"createUser(user, ADMIN | SENDMAIL); has a lot more clarity" — PaulKeeble
"these things start to become idee fixes in teams" — trgn
"Also known as ‘boolean blindness‘" — bradrn
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.