A code review once humbled me into writing comments first
I used to just write code and then try to explain it later. Last March, a guy on a Discord group told me my function names were fine but my logic was a maze, and he couldn't follow it without comments. Now I sketch the steps in plain English before I type a single line, and it's cut my debugging time in half. Anyone else found that writing comments first makes the actual coding easier?
The "logic was a maze" part really hit home for me, because that's exactly what my old code looked like too. I started doing the same thing after a coworker got frustrated trying to debug my messy loops during a pairing session. Honestly, writing plain English steps first feels like I'm making a grocery list before I go to the store, and I always forget something if I skip the list. Now I catch bad ideas way earlier, like before I've committed an hour to a broken approach. Plus, when I do get stuck later, my own comments remind me what I was actually trying to do, which beats staring at blank lines. It's wild how a simple habit change can save so much headache, right?