9
Warning: most beginner coders overthink variables and it slows them down
I've been helping my cousin learn Python for a few weeks now and I keep seeing the same mistake. People spend 20 minutes deciding on a variable name trying to make it perfect. I told him just name it 'x' or 'temp' and move on, you can change it later. I watched a guy in a coding discord spend an hour trying to rename his variables to match a style guide before he even ran his code once. That's a huge waste when you're just learning loops and if statements. The code doesn't care what the variable is called, it just needs to work first. Get the thing running, then clean it up. Has anyone else noticed this holding people back in beginner groups?
1 comments
Log in to join the discussion
Log In1 Comment
robert2481mo ago
Kinda reminds me of how people get stuck on choosing the right color scheme for their code editor before they even write a line of code. Focusing on style over function is like worrying about the paint job on a car that hasn't had an engine put in yet. Sometimes just slapping down a dumb temporary name lets the brain actually solve the problem instead of worrying about some future perfection.
7