Hacker News new | ask | show | jobs
by eddythompson80 22 days ago
Just last month I asked someone on the team to add some alerts. We like everything to be declaratively defined in the repo and we push metrics, and we have an alerting system. We just needed some plumbing to be able to define alerts that get created or updated on every deployment. I said to start lets add an alert for X metric, then we can take it from there.

He took the instructions, plopped them into an agent, generated ~400 lines of change that add the alert. The problem was the entire 400 lines were custom for that X metric. Meaning if we needed to add a second alert, it’s another 400 lines. The entire thing is generic plumbing and defining resources. Any reasonable engineer would make it so that the second alert to add would be 2 or 3 line change to just define the metric and its alerting threshold (and whatever other parameters for the alert) not re-do the entire setup every time for every metric. I felt stupid having to explain that to another senior engineer.

1 comments

To be fair to your colleague (and the LLM) making things generic too early is a bit of an anti-pattern as well.
But that's exactly the problem. The judgement call on what should be made generic from the get-go vs what making generic early on is too over-engineering is something that you would expect an engineer (or a sufficiently advanced AI I guess) to consider.

Something like an alert should be all the way on the "should be generic from the get-go" side of that scale. There is no scenario where we only need one alert for a single metric. Some other scenarios would be an anti-pattern as you said. The judgement call here is important.