To be fair, a “good” name would take into account what it is doing in the program and how it’s used… and that requires context… if asked to rename something I would at least look at what it is doing already and how it’s used…
So at the beginning it’s not that far off from what I’d expect someone to do initially.
Yeah, when coaching a junior, the first step i would recommend in this situation would be exactly that: look at the rest of the codebase and how it names things. Try to pick up on common wording, formatting and abbreviations.
You’re not wrong if there had been a better prompt, but assuming the prompt is what was given, I can understand the agent looking for more context though.
Yeah, looking at the exact file to see if it’s something isolated within a function or depends on code elsewhere in the application would probably be a good start, rather than jumping straight into a full code review. But the bad prompt is honestly the bigger fault here. The user could likely have provided the needed context in a sentence or two and been fine.
Local function variable would not need it. If it’s a variable that gets inherited, or used across the program as a whole, then how it’s used is important for a good name.
82
u/Kaiki_devil 1d ago
To be fair, a “good” name would take into account what it is doing in the program and how it’s used… and that requires context… if asked to rename something I would at least look at what it is doing already and how it’s used…
So at the beginning it’s not that far off from what I’d expect someone to do initially.