cm0002@lemmy.world to Programmer Humor@programming.dev · 4 days agoSenior Wisdomlemmy.mlimagemessage-square64fedilinkarrow-up1792cross-posted to: [email protected]
arrow-up1792imageSenior Wisdomlemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 4 days agomessage-square64fedilinkcross-posted to: [email protected]
minus-squareZILtoid1991@lemmy.worldlinkfedilinkarrow-up15·2 days agoComment your code. Problem solved.
minus-squaresunbytes@lemmy.worldlinkfedilinkarrow-up11·2 days agoAnd decent variable names if you can, as well. No magic numbers!
minus-squareZILtoid1991@lemmy.worldlinkfedilinkarrow-up4·2 days agoWYM, I can’t just name my functions foo() and my variables single letters? /s
minus-squaresunbytes@lemmy.worldlinkfedilinkarrow-up4·2 days ago$retVal and $item are my personal favourite.
minus-squareipkpjersi@lemmy.mllinkfedilinkarrow-up6·2 days agoMake sure to remember to update your comments too, otherwise it causes even more confusion when something works differently than it says it does.
minus-squareZILtoid1991@lemmy.worldlinkfedilinkarrow-up2·2 days agoThat happened to me multiple times…
Comment your code. Problem solved.
And decent variable names if you can, as well.
No magic numbers!
WYM, I can’t just name my functions
foo()
and my variables single letters? /s$retVal
and$item
are my personal favourite.Make sure to remember to update your comments too, otherwise it causes even more confusion when something works differently than it says it does.
That happened to me multiple times…