Andromxda 🇺🇦🇵🇸🇹🇼@lemmy.dbzer0.com to Programmer Humor@programming.devEnglish · 1 year agoHow programmers comment their codelemmy.dbzer0.comexternal-linkmessage-square37fedilinkarrow-up155arrow-down10file-text
arrow-up155arrow-down1external-linkHow programmers comment their codelemmy.dbzer0.comAndromxda 🇺🇦🇵🇸🇹🇼@lemmy.dbzer0.com to Programmer Humor@programming.devEnglish · 1 year agomessage-square37fedilinkfile-text
minus-squareMartin@feddit.nulinkfedilinkarrow-up4·1 year agoComments should explain “why”, the code already explains “what”.
minus-squaresmeg@feddit.uklinkfedilinkEnglisharrow-up3·edit-21 year agoThe allowable exception is when the what is a what the fuck, as in you had to use a hack so horrible that it requires an apology comment
minus-squarecalcopiritus@lemmy.worldlinkfedilinkarrow-up1·1 year agoInline comments yes. Function/Class/Module doc comments should absolutely explain “what”.
Comments should explain “why”, the code already explains “what”.
The allowable exception is when the what is a what the fuck, as in you had to use a hack so horrible that it requires an apology comment
Inline comments yes.
Function/Class/Module doc comments should absolutely explain “what”.