I didn’t sit down this morning planning to write a grouchy blog post about Hugo. When I first used Hugo I loved it. It was fast. It was simple. It just worked, as much as any software does, and it solved a real problem. It was done. But people kept working on it. I’m sure that it has been improved in countless ways. But along the way it has gotten bigger and more complicated, and has broken backwards compatibility repeatedly.| commaok.xyz
Exponential backoff with jitter is de rigeur for making service calls. This code, or something like it, probably looks really familiar: func do(ctx context.Context) error { const ( maxAttempts = 10 baseDelay = 1 * time.Second maxDelay = 60 * time.Second ) delay := baseDelay for attempt := range maxAttempts { err := request(ctx) if err == nil { return nil } delay *= 2 delay = min(delay, maxDelay) jitter := multiplyDuration(delay, rand.| commaok.xyz