this post was submitted on 02 Oct 2024
629 points (96.2% liked)
Programmer Humor
19720 readers
67 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 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I dislike the .not() method a bit because it inverts the meaning of the previous code snippet you've read.
"Ah, so if the list is empty..."
"Goddammit"
For me, it's pretty much the opposite. With the exclamation mark, I'll see the inversion, then I'll read the actual condition and try to make sense of it, and then I'll remember that this thing was supposed to be inverted. Or I won't remember, that's unfortunately also a possibility.
Might just be what we're used to, though. I have been working in a codebase with mostly
.not()
for the past year.