Newbie developers have a lot of cringeworthy moments, in the process or transitioning into tech we've all said or done things that still make us cringe when we remember it. One of such moments for me relates to commenting on code. Developers attach c...

Markdown supported · ⌘↵ to post
Ben Hammond
I’m going to push back on the “code should explain itself” concept for newbies; there is ZERO harm in literally commenting every single line of code, and I’d actually encourage it as a way of truly learning... if that code is something you’ve copy pasted or done as part of a tutorial’s starting code.
Comments can always be easily deleted later; trying to figure out a complex bit of uncommented code takes much more time.
So yes, best practices dictate only commenting where needed. But as beginners the comments WILL be needed much more frequently than they will be for a senior dev, and that is all good!
// embrace the comments!