Briefle
LearnGlossaryPricing

Briefle words · Code & architecture

Magic string

A raw text value typed directly into the code whose meaning, and correct spelling, is only known by convention.

Say it to an AI

TypeScript helpers for helpdesk tickets. Model status as a TicketStatus enum (open, pending, resolved, closed) as the single source of truth, type Ticket.status with it, and never compare or assign magic strings. canReply(ticket) and resolve(ticket), both pure.

How an expert would brief the stronger version of “Ticket status”.

See it

Try it as a puzzle →

Shared helpers a customer-support helpdesk uses to check and change a ticket's status.

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

Why: B compares against "closed" and assigns "Resolved"; the two don't even agree on capitalization.

Related words

  • Single source of truth
  • Error code
  • Problem Details
  • Naming convention
  • REST
  • Resource
  • Path parameter
  • Pagination

Room 5 · APIs & data

Learn “Magic string” in a five-minute lesson

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