this post was submitted on 14 Aug 2025
268 points (96.5% liked)
Programmer Humor
25705 readers
1328 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Admin false LoggedIn false doesn't feel illegal to me, more redundant if anything
I was thinking of the three legal states as:
null
or{isAdmin: false, isLoggedIn: false}
)false
or{isAdmin: false, isLoggedIn: true}
)true
or{isAdmin: true, isLoggedIn: true}
)which leaves
{isAdmin: true, isLoggedIn: false}
as an invalid, nonsensical state. (How would you know the user's an admin if they're not logged in?) Of course, in a different context, all four states could potentially be distinctly meaningful.Honestly logged in is state and shouldn't be on the user object.
ah you are right! i am so dumb.