A code reviewer told me my variable names were trash, and now I spend 10 extra minutes on every file
I was working on a simple to-do list app in Python about 3 months ago and my variable names were stuff like 'x', 'temp', and 'data1'. A friend who does code reviews for a living looked at my project and flat out told me 'I have no clue what half this code does and I wrote a similar app last year.' That stung but he was right. So now I take 10 minutes at the start of every new file and just write out real names like 'completed_tasks' or 'user_input' before I even type the logic. My code is longer and I type way more, but when I came back to it 2 weeks later I understood everything instantly. Has anyone else had a moment where feedback made you slow down on purpose?
Huh, ten minutes every single file seems like a lot off the top. Not saying good names are a waste, they are not, but the way you describe it sounds like you write names for stuff that does not exist yet, then bend the logic to fit them. That part can burn you. I went through the same thing, names like tmp and d1 everywhere, and what fixed it for me was renaming as I went, not before I started. When I stopped to plan every name up front, half of them ended up wrong once I saw how the data actually moved around, and then I had to rename twice. So the slow down is real and it helps, but the slow down works better after you know what the thing does. Ten minutes before any code at all is mostly guessing.