G
11

A senior dev told me my variable names were 'too poetic' and it stung at first

I was naming things like "theWanderingCustomer" and "shadowCart" in my first big Python project. He pulled me aside and said call it "activeUser" and "abandonedCart" so anyone can read it without a decoder ring. I changed all my names to be super boring and descriptive, and now I waste way less time guessing what past me was thinking. Has anyone else gotten feedback that completely flipped how you write code?
2 comments

Log in to join the discussion

Log In
2 Comments
anna_carter53
Oh I totally feel that "decoder ring" comment haha. Reminds me of when I was building a little weather app and named my main loop "theGreatTempest" because I thought it sounded dramatic. My friend looked at it and was like "is this a weather app or a fantasy novel?" Now I just use "mainLoop" or "weatherUpdate" and it's so much easier to debug at 2am when something breaks.
6
kaib18
kaib1825d ago
Double down on that boring-is-better lesson and start naming your functions with verbs too. It feels silly at first but "getWeatherData" is a lifesaver compared to "retrieveTheConditions" when you're hunting bugs at 3am.
5