The Fencepost Problem

If there’s anything I’ve noticed that plagues many less-experienced programmers, it’s what I refer to as the fencepost problem (or fencepost error, if you will). The problem can be most succinctly summed up using this thought exercise: Imagine a fence that is 100 meters long. A fencepost is needed every 10 meters. How many fenceposts […]