top | item 43168113

(no title)

slotrans | 1 year ago

> I will completely forget why I wrote it that way.

This is the main reason for comments. The code can never tell you "why".

Code is inherently about "what" and "how". The "why" must be expressed in prose.

discuss

order

Cthulhu_|1 year ago

And the described use case - USB stuff with very specific exception - makes a strong case for literate programming, that is, more prose than code.

lompad|1 year ago

Does everything have to be pushed into a structure-prescribing set of rules?

Can't we just say "comments are useful here" without trying to make it into a case for $methodology?

ninetyninenine|1 year ago

Why not put the prose in the name of the function?

SAI_Peregrinus|1 year ago

Function names are limited. E.g. can't provide a circuit diagram of what you're controlling in a function name. But you can do that in a comment (either with ASCII art or an image link).