Code Room
Code reviewMedium
Question
Review this Go function that buckets an event into a fixed-width time bucket (e.g. for a histogram), where `ts` is a Unix timestamp that may be negative for pre-1970 backfilled events.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
func bucketStart(ts, width int64) int64 { return ts - ts%width}Run or narrate your approach, then ask the coach.