B
12

The code reviewer who told me to stop commenting everything was right

I used to write a comment above every single line of my JavaScript, thinking it showed I understood the logic. Last month a senior dev at my office in Austin pulled me aside and said, 'If the code needs that many comments, the code is bad.' He made me rewrite a 200-line function with proper variable names and only two comments. It took me about 5 tries to get comfortable, but now I read code much faster and my pull requests actually get approved. Has anyone else had to unlearn a habit that felt safe but was actually holding them back?
1 comments

Log in to join the discussion

Log In
1 Comment
kaih36
kaih3629d ago
Whoa, did rewriting it that way actually change how you spot bad code in other people’s stuff now, or is it still a struggle?
4