Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I find the comments Copilot proposes is better than average comment quality for the code base I routinely work on

Maybe the average is just so bad? The completions I get for comments are document what the code is doing, which is not something that I ever put into comments. It's always:

a) A highlevel (prefixed to the function/block/scope definition) list of steps, input expectations and output expectations for the forthcoming function/block/scope

Or

b) A note explaining why the code does what it does.

A comment repeating the code but in English is useless.



The best comments are the type of:

  Whatever bad thing you think of this part is probably true, but I can’t do better.
And

  Beware, weird optimization ahead.
And

  Editing this code requires arcane knowledge.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: