@[email protected] to Programmer [email protected] • 1 month agoSenior Wisdomlemmy.mlimagemessage-square64fedilinkarrow-up1811arrow-down19cross-posted to: [email protected]
arrow-up1802arrow-down1imageSenior Wisdomlemmy.ml@[email protected] to Programmer [email protected] • 1 month agomessage-square64fedilinkcross-posted to: [email protected]
minus-square@[email protected]linkfedilink13•1 month agoAnd decent variable names if you can, as well. No magic numbers!
minus-square@[email protected]linkfedilink6•1 month agoWYM, I can’t just name my functions foo() and my variables single letters? /s
minus-square@[email protected]linkfedilink7•1 month agoMake sure to remember to update your comments too, otherwise it causes even more confusion when something works differently than it says it does.
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…