An off-by-one error (OBOE), also commonly known as an OBOB (off-by-one bug), is a logic error involving the discrete equivalent of a boundary condition. It often occurs in computer programming when an iterative loop iterates one time too many or too few. This problem could arise when a programmer makes mistakes such as using "is less than or equal to" where "is less than" should have been used in a comparison or fails to take into account that a sequence starts at zero rather than one (as with array indices in many languages). This can also occur in a mathematical context.
Consider an array of items, and items m through n (inclusive) are to be processed. How many items are there? An intuitive answer may be n − m, but that is off by one, exhibiting a fencepost error; the correct answer is n –m + 1.
For this reason, ranges in computing are often represented by half-open intervals; the range from m to n (inclusive) is represented by the range from m (inclusive) to n + 1 (exclusive) to avoid fencepost errors. For example, a loop that iterates five times (from 0 to 4 inclusive) can be written as a half-open interval from 0 to 5:
Did you hear that mikey kissed a girl
Could it be your girlfriend or some other stupid hoe
Did you hear that Timmy shaved his hair
How much do you bet Janes not wearing underwear
Her IQ is smaller that her skirt
She pretends she wants it but she is just a flirt
Joey slept with Susan and now they're going out
Get ready cause
This is high school
Passing notes about what happened Saturday night
Is it possible that there could be a fight
Meet at the oak tree approximately 3pm
I will beat your ass cause now you're in high school
Now you're in high school
Oh how we love these high school days
Don't want to leave wish we could stay
I'll really miss those cheerleaders
They are the highlight of my year
Did you hear about how Mr. Halls
Turns his back to the class so he can scratch his balls
Susans dumping joey she says he sucks in bed
But not as good as she does