off-by-one
Loop iteration mistake
Off-by-one describes an error where a count or index is wrong by exactly one—typically from confusion about whether to start at zero or one, or whether a boundary is included.
The loop ran eleven times instead of ten—classic off-by-one error.
Programmers encounter these constantly when working with arrays and loops.
Sometimes shortened to OBOE.
Upright fence support
- indexAlphabetical guide to contents
- arrayOrdered collection or display
- loopCurve closing on itself
- boundaryLine marking a limit
iteration · bug · error · buffer · overflow · underflow · debugging · compiler
Published online content
- railsGuiding metal bars
- intervalsGaps between events
- countingDetermining quantity sequentially
- segmentsSeparate parts of something
endpoints · inclusive · exclusive · fence · wires · sections · span · beginning
fencepost
Upright fence support
boundary · iteration · bug · error · buffer · overflow · underflow · debugging · compiler · segfault
posts
Published online content
segments · endpoints · inclusive · exclusive · fence · wires · sections · span · beginning · ending
synchronization
Aligning timing across systems
latency · frame · tick · timestamp · millisecond · delay · scheduling · timeout · heartbeat · polling
off-by-onelogic error
Mistake in reasoning
type error · race condition · syntax error · infinite loop · memory leak