Remix.run Logo
Pxtl 7 hours ago

> the code should explain itself.

This is a good goal. You should strive to make the code explain itself. To write code that does not need comments.

You will fail to reach that goal most of the time.

And when you fail to reach that goal, write the dang comments explaining why the code is the way that it is.

bandrami 4 hours ago | parent [-]

But you will also fail to keep the comments and code synchronized, and the comment will at some point no longer describe why the code is doing whatever it does

jaxn 3 hours ago | parent [-]

But copilot code review agent is pretty good at catching when code and comments diverge (even in unrelated documentation files).