Briefle words · Code & architecture
is/has/can prefix
The naming convention of starting true/false names with a question word so the meaning of 'true' is obvious.
Say it to an AI
TypeScript predicate canInviteMembers(member, isGuestInvite): boolean for our workspace invites. Name every boolean with an is/has/can prefix (isActive, isEmailVerified, hasPaidSeat, isAdmin) so each condition reads as a question, and use guard clauses for the inactive and unverified cases.
How an expert would brief the stronger version of “Team invite check”.
See it
Try it as a puzzle →A pull request adding the rule for who can invite people into a team workspace in a SaaS project tool.
Why: B's isEmailVerified is true only when the email is verified; A's emailStatus: true could mean verified, pending or bounced.
Related words
Room 2 · Naming
Learn “is/has/can prefix” in a five-minute lesson