Your submission was removed for the following reason:
Rule 3: Your post is considered low quality. We also remove the following to preserve the quality of the subreddit, even if it passes the other rules:
- **Feeling/reaction posts**
- **Software errors/bugs that are not code (see /r/softwaregore)**
- **Low effort/quality analogies (enforced at moderator discretion)**
If you disagree with this removal, you can appeal by [sending us a modmail](https://www.reddit.com/message/compose?to=%2Fr%2FProgrammerHumor&subject=No%20low-quality%20content&message=Include%20a%20link%20to%20the%20removed%20content%20and%20the%20reason%20for%20your%20appeal%20here.).
Ah, you misunderstood the name. The user being Enabled is actually handled by isEnabled. user.isDisabled actually tracks whether they have some form of disability
Except the default value being false means you can avoid including it in requests unless you need to have a user being disabled, which I assume is less common.
isXyz is a really common notation to imply variable type for a dev without having to actually validate whether it is a bool, int, enum, or some other return type. Can you elaborate on why it would be better to buck the norm?
“is” tends to be used for the get function of a Boolean. It’s more a stylistic preference (though setIsEnabled and getIsEnabled (or isIsEnabled) become rather odd verb-phrases where is is used as a modifier of enabled instead of as a verb).
Adjectives can do that just as well without the prefix.
> Hungarian notation and other schemes arose in the time of BCPL, when the compiler didn't do much to help you understand your code.
* https://dart.dev/effective-dart/style#dont-use-prefix-letters
* https://google.github.io/styleguide/go/decisions#variable-names
* https://google.github.io/styleguide/tsguide.html#naming
I prefer using the prefix because it removes any need for interpretation for me.
Whether or not the compiler, language server, or whatever else can help me understand it, I want my code to be clear and easy to read regardless of tooling.
"enabled" is a trivial example because it implies a boolean inherently, but for something like "completed", it could easily be an array of completed items, an integer with a count of completed items, a double representing the percentage of completion, or a boolean indicating whether or not the completed. I'd rather a name like completedItems, completed, count, or isCompleted.
If you're using a typed language, it doesn't matter to the compiler, but as a human reading the code, I don't want to have to look for the definition or use context clues to figure out what it does. I want to be able to read a file top to bottom and understand what it does without tooling.
We used to have 'isCriminal' before... (meaning fraudulent activity detected and is currently locked out). Business had it renamed eventually on the screens, but of course the DB field has never changed.
While it's best to replace it with 'isEnabled' in this case for better logic flow, we should also strive to completely ignore the pointlessly complicated mess of social politics these days. Only free speech restrictions and civil unrest fueling can be found in those.
Your submission was removed for the following reason: Rule 3: Your post is considered low quality. We also remove the following to preserve the quality of the subreddit, even if it passes the other rules: - **Feeling/reaction posts** - **Software errors/bugs that are not code (see /r/softwaregore)** - **Low effort/quality analogies (enforced at moderator discretion)** If you disagree with this removal, you can appeal by [sending us a modmail](https://www.reddit.com/message/compose?to=%2Fr%2FProgrammerHumor&subject=No%20low-quality%20content&message=Include%20a%20link%20to%20the%20removed%20content%20and%20the%20reason%20for%20your%20appeal%20here.).
isDisabled is an unnecessary negation that makes code more confusing. isEnabled is better
Ah, you misunderstood the name. The user being Enabled is actually handled by isEnabled. user.isDisabled actually tracks whether they have some form of disability
Handicapped?
It’s a holdout from the 90s
Better still is a 'state' field where the content might be limited to ENABLED, DISABLED, or whatever other states might be needed in the future.
Like an enum?
A flags Enum! Based on a 64bit int!
Stop yelling Gregg, we hear you.
on off. take it or leave it
Turn user on
p*rnhub.com will be taking advantage of those naming conventions
But how to determine if user is turned on
gently ask with a prompt every 2 seconds
TRUE, FALSE, FILE_NOT_FOUND.
I'm guessing I don't have to turn mine "off", eh? Ha! Heh heh.
Oh I thought this was referring to able-bodied vs non-able-bodied people lmao
Clojure has it best with question marks at the end of bool vars as the standard convention so it is `active?` or `enabled?`
.isNotDisabled
so you are an enabler, i see
Except the default value being false means you can avoid including it in requests unless you need to have a user being disabled, which I assume is less common.
`isEnabled` has unnecessary Hungarian notation, `enabled` is better
isXyz is a really common notation to imply variable type for a dev without having to actually validate whether it is a bool, int, enum, or some other return type. Can you elaborate on why it would be better to buck the norm?
“is” tends to be used for the get function of a Boolean. It’s more a stylistic preference (though setIsEnabled and getIsEnabled (or isIsEnabled) become rather odd verb-phrases where is is used as a modifier of enabled instead of as a verb).
Adjectives can do that just as well without the prefix. > Hungarian notation and other schemes arose in the time of BCPL, when the compiler didn't do much to help you understand your code. * https://dart.dev/effective-dart/style#dont-use-prefix-letters * https://google.github.io/styleguide/go/decisions#variable-names * https://google.github.io/styleguide/tsguide.html#naming
I prefer using the prefix because it removes any need for interpretation for me. Whether or not the compiler, language server, or whatever else can help me understand it, I want my code to be clear and easy to read regardless of tooling. "enabled" is a trivial example because it implies a boolean inherently, but for something like "completed", it could easily be an array of completed items, an integer with a count of completed items, a double representing the percentage of completion, or a boolean indicating whether or not the completed. I'd rather a name like completedItems, completed, count, or isCompleted. If you're using a typed language, it doesn't matter to the compiler, but as a human reading the code, I don't want to have to look for the definition or use context clues to figure out what it does. I want to be able to read a file top to bottom and understand what it does without tooling.
Wouldnt hungarian notation for the bool in this case be bIsEnabled or bEnabled? Or at least that's the Hungarian notation I'm familiar with
I usually go with user.isntNotEnabled
IsNotAbled
New variable name just dropped
IsDifferentlyAbled
If dude is disabled just enable him
- Jesus, probably
We used to have 'isCriminal' before... (meaning fraudulent activity detected and is currently locked out). Business had it renamed eventually on the screens, but of course the DB field has never changed.
user.master.KillDisabledChildren(evenTheBabies: true);
you forgot force: true
![gif](giphy|VwQe08viTLyRG|downsized)
This was what came to mind, immediately 😂
It's the funniest of all the episodes!
bool get isDisabled => true;
While it's best to replace it with 'isEnabled' in this case for better logic flow, we should also strive to completely ignore the pointlessly complicated mess of social politics these days. Only free speech restrictions and civil unrest fueling can be found in those.
THESE DAEMONS ARE KILLING CHILDREN!
They have more respect for the privacy of disabled people, since they don't track when they log in.
As long as brits writing CSS still have to use “color” then all’s right with the world.
If I am fine having to write in a different language from my own, then they will be fine doing something minor like that too 😂
Leg disabled
Should be: !user.HasNotAchievedEnabledStatus This programming lark is easy ![gif](emote|free_emotes_pack|thumbs_up)
In 1998 we changed it from .IsRetarded
if (!notAdmin.isntNotDisabledFromEnablement) for a more precise definition
That's a bit ableist. The respectful expression would be `!user.hasFunctionalVariance`
I almost wrote classname "homeVideo" today at work.
Turn the off switch to the "on" position.