DEV Community

Discussion on: Writing code for your future self

Collapse
 
qm3ster profile image
Mihail Malo

Variables become stale too :v
Don't tell me you have never seen something like

isValid.forEach(name(true))

They are easier to update though, since once someone finally realizes what that damn thing represents, they can apply a "rename identifier everywhere" refactoring tool.

Thread Thread
 
sunnysingh profile image
Sunny Singh

Haha, yeah good point. I agree that they are easier to update.

I like to use comments as a last resort to explain why a piece of code is written in a certain way or exists in the first place.