Just remembering this famous quote :
"There are only two hard things in Computer Science: cache invalidation and naming things.
-- Phil Karlton"
That, and off-by-one errors ;]