Cows Look Like Maps@sh.itjust.works to Programmer Humor@programming.dev · 1 year agoBill is a pro grammersh.itjust.worksimagemessage-square112fedilinkarrow-up1751arrow-down193
arrow-up1658arrow-down1imageBill is a pro grammersh.itjust.worksCows Look Like Maps@sh.itjust.works to Programmer Humor@programming.dev · 1 year agomessage-square112fedilink
minus-squarewit@lemmy.worldlinkfedilinkEnglisharrow-up11arrow-down2·1 year agoCode should be self documenting.
minus-squareJohnDClay@sh.itjust.workslinkfedilinkarrow-up18arrow-down1·1 year agoBut you should also comment it, things obvious to you aren’t obvious to even future you.
minus-squaregornius@lemmy.worldlinkfedilinkarrow-up8arrow-down1·1 year agoGeneral rule of thumb: Comments say why is it here, not what it does. Code itself should describe what it does.
minus-squareSylvartas@lemmy.worldlinkfedilinkarrow-up1·edit-21 year agoIn a vacuum, sure. On a real project of substantial size with more than one programmer, I’m afraid it quickly becomes a “cannot”
Code should be self documenting.
But you should also comment it, things obvious to you aren’t obvious to even future you.
General rule of thumb: Comments say why is it here, not what it does. Code itself should describe what it does.
In a vacuum, sure. On a real project of substantial size with more than one programmer, I’m afraid it quickly becomes a “cannot”