cm0002@lemmy.world to Programmer Humor@programming.dev · 2 months agoSenior Wisdomexternal-linkmessage-square64fedilinkarrow-up1811cross-posted to: [email protected]
arrow-up1811external-linkSenior Wisdomcm0002@lemmy.world to Programmer Humor@programming.dev · 2 months agomessage-square64fedilinkcross-posted to: [email protected]
minus-squareZILtoid1991@lemmy.worldlinkfedilinkarrow-up17·2 months agoComment your code. Problem solved.
minus-squaresunbytes@lemmy.worldlinkfedilinkarrow-up13·2 months agoAnd decent variable names if you can, as well. No magic numbers!
minus-squareZILtoid1991@lemmy.worldlinkfedilinkarrow-up6·2 months agoWYM, I can’t just name my functions foo() and my variables single letters? /s
minus-squaresunbytes@lemmy.worldlinkfedilinkarrow-up6·2 months ago$retVal and $item are my personal favourite.
minus-squareipkpjersi@lemmy.mllinkfedilinkarrow-up7·2 months 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-up3·2 months 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…