|
|
|
|
|
by TeMPOraL
1122 days ago
|
|
I used to think that too, even as recently as the last time I saw someone posting how they made GPT-3 write commit messages automatically. However There are couple reasons why I think this may be valid use case: - Code is a static serialization artifact. It's unfortunate we still work with it directly, but that's another conversation; fact is, we are working with it directly, and if there is commentary relevant to the code, it's best placed in the code, so it remains if the tools generating them dynamically (like your "on-hover" IDE plugin idea) become unavailable or stop working (or start generating different outputs after some update). - It's true that the comments should talk about "why" much more than "how", as the "why" is often not apparent in the code itself. However, "not apparent" doesn't mean "independent" - the code structures and the reasons for their existence are correlated. GPT-4 may have seen enough and be smart enough to actually spot those - as if it was a developer familiar with the problem space, going all "yeah, I've seen this type of code before - it's likely trying to ${high level goal}". Generating those comments would be valuable. Of course, generated comments should be reviewed and edited at the point of generation, to make sure they're accurate and reference actual documents/tickets/design decisions. Whether or not an average developer will do that - that's another topic. |
|
I was curious what was going on in a sine cosine lookup table and that was doing linear interpolation between the points.
Feeding it into chatgpt, added the appropriate comments for each step.
It was fairly obvious, but had taken me 10 minutes to track down and realize what was going on.