Exponential Backoff Explained with Working Code