5
I finally got called out for messy code and it actually helped
Been learning Python for about 4 months and a guy on a coding discord told me my variable names were 'garbage' after I shared a script I was proud of. He pointed out I was using stuff like 'x' and 'temp' everywhere instead of descriptive names. Anyone else get a reality check like that early on and change how you write code?
2 comments
Log in to join the discussion
Log In2 Comments
kellymurphy14d ago
70% of my early scripts were just 'data' and 'result' repeated 20 times. I used to think naming stuff was a waste of time but after someone forced me to rename everything I realized how much harder I was making debugging for myself. It's honestly one of those annoying fixes that saves you hours later.
2
barnes.jamie14d ago
Oh man, that's such a common trap. The thing is, naming things clearly doesn't just help you debug, it forces you to actually understand what you're building as you go.
5