11
A senior dev at my last job told me to stop overthinking variable names and just use what makes sense in 5 seconds
That one piece of feedback from a 20-year veteran in Austin saved me about 2 hours per code review, but now I'm worried my naming is too lazy - anyone else get called out for using 'temp123' and just leave it? lol
3 comments
Log in to join the discussion
Log In3 Comments
lucas634d ago
Temp123 might be a bit much, but honestly a lot of that advice depends on your team. Some shops will ding you for anything that isn't perfectly descriptive, others just want it readable and not holding up the whole review.
2
patricia_rodriguez4d ago
Wait, do people actually leave temp123 in their code for real? That feels like a different level of lazy than just not overthinking names, more like not caring at all. I've had teammates who left stuff like that and it always made me wonder if they were going to clean it up later or just expected everyone to deal with it.
1
rowanjenkins4d ago
Is it really that big of a deal though? If the code works fine and nobody else is complaining, a lazy variable name usually doesn't break anything important. Sometimes it's just faster to jot down a placeholder and move on to the real problem.
1