Blog Post: Boolean Variable Names #20

Closed
opened 2020-07-15 04:20:25 +00:00 by jeff · 2 comments
Owner

Random notes:

Variable names for booleans: avoid names that are already a negation (notReady, headless).

find examples in OSS (Gitea notify)

Read PoP and PoSD for bool blog post
Use an unambiguously negatable name. No context should be needed for understanding. Ex: “FlexibleName”
Going between configs is problematic. Ex: confA.UseProd = !confB.NoProd
Should be in the affirmative (useProd, not noProd)

answerable with yes or no (true or false)

Random notes: Variable names for booleans: avoid names that are already a negation (notReady, headless). find examples in OSS (Gitea notify) Read PoP and PoSD for bool blog post Use an unambiguously negatable name. No context should be needed for understanding. Ex: “FlexibleName” Going between configs is problematic. Ex: confA.UseProd = !confB.NoProd Should be in the affirmative (useProd, not noProd) answerable with yes or no (true or false)
jeff self-assigned this 2020-07-15 04:20:28 +00:00
steverusso was assigned by jeff 2020-07-15 04:20:29 +00:00
Author
Owner

@steverusso my best thought for an image for this blog post is a yin and yang symbol. Can you get me an image that would look good (in your opinion) on a blog post? You can upload it here and I'll put it in the PR.

@steverusso my best thought for an image for this blog post is a yin and yang symbol. Can you get me an image that would look good (in your opinion) on a blog post? You can upload it here and I'll put it in the PR.
Contributor
No description provided.
jeff closed this issue 2020-07-30 22:59:34 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: simplesystems/website#20
No description provided.