260
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 14 Sep 2026
260 points (97.1% liked)
Programmer Humor
33235 readers
1057 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
- If the mod doesn't find it funny, you're banned. Ha-ha!... For real: do not use the community for "statements". There are other places for such content. Keep it chill and funny.
founded 3 years ago
MODERATORS
0 based indexing of course, so what's the joke? oh, mixing up count and max index is a hardship you get over after a couple of years, but it comes back sometimes.
it's not just zero-based indexing though. i've had situations like these a couple of times: write a
for ... ofloop to iterate through the elements of an iterable. a lot of the times, there's an unwanted first / last element in the list (that doesn't actually belong there) and i forget to remove it, then end up with garbage data in the result set.The more you move through the networking stack, the more you start seeing OB1 error potentials.
Many protocols have packet ids starting from (and wrapping back to) 1. Modbus registers start from 1, but stored in memory offset 0.
Packet lengths can either include or exclude the length itself. E.g. packet length 200 in a protocol could either mean the length is followed by 200 bytes of data; or 1 byte containing the length + 199 data; or even 4 bytes length + 196 data (off by four!)
It's a wild world out there.