S
5

A senior dev told me to stop writing comments in my code and explain it through better variable names instead

Took me three projects to realize he meant naming a variable 'userInput' instead of 'ui' saves everyone 20 minutes of head-scratching, so what's the one comment style you guys can't stand seeing?
3 comments

Log in to join the discussion

Log In
3 Comments
faith684
faith68411d ago
explain it through better variable names" until you get stuck debugging a regex pattern.
3
thompson.nathan
Man I spent 3 hours last week trying to figure out why my regex for phone numbers kept failing. Turned out I forgot to escape a single dot after the area code. Good variable names would have saved me nothing there, just pure pattern madness.
1
kim693
kim6939d ago
Is there anything more humbling than chasing a missing escape character for hours lol? Regex is basically medieval torture but they sell it as a feature.
1