Generated by Daily Developer Jokes, a project by Fred Adams (@xtrp on DEV)
Read about Daily Developer Jokes on this blog post, and check out the Daily Developer Jokes Website.
Today's Joke is...
Have a joke idea for a future post? Email xtrp@xtrp.io with your suggestions!
This joke comes from Dad-Jokes GitHub Repo by Wes Bos (thank you!), whose owner has given me permission to use this joke with credit.
Top comments (3)
You write that joke wrong. It's a pretty known joke and it goes like this:
Q: What are the two most difficult problems in computer science.
A: Naming things, cache invalidation, and off-by-one errors.
Off by one error is always when you got more than the limit (because of 0 indexed arrays), not less than the limit like in your example. The joke is credited to Leon Bambrick on Twitter.
There is nothing in the definition of the error that says it has to be over the limit. As long as it is off by one, above or below, then it is an OBOE.
Yes, you're right en.wikipedia.org/wiki/Off-by-one_e..., but the joke is pretty known and you get it wrong.