Take the 2-minute tour ×  It seems that off-by-one errors are
one of the most (if not the most) common programming errors (see
What are common mistakes in coding?, and conventional wisdom).
What is the reason these are so common, is it something to do
with how the human brain works? What can we do to prevent
falling prey to the off by one errors?  share|improve this
question Are they common? I'm producing my fair share of bugs,
but off-by-one errors are very rarely among them. Perhaps
because I mostly use Python, i.e. use iterators instead of
juggling with indices? (And: What does that tell us? ;) ) – 
delnan Feb 2 '11 at 18:16 The less you have to think about, the
more productive you are? –  Malfist Feb 2 '11 at 18:20 @delnan:
I agree. Off-by-one errors are usually the first to be caught
when I'm coding (before I even move to an official "testing
phase"). –  FrustratedWithFormsDesigner Feb 2 '11 at 18:24 I
almost answered the previous question by mistake... –  DevSolo
Feb 2 '11 at 19:07 > What can we do to