6
Warning: I spent 6 months naming variables like 'x' and 'temp2' thinking it saved time
I realized I was wrong when I came back to a project after a weekend and had no clue what any of my 50 'temp' variables actually did. Has anyone else had that moment where your own code reads like a foreign language?
2 comments
Log in to join the discussion
Log In2 Comments
mark4925d agoMost Upvoted
Wait, you had 50 temp variables? Like 50 of them? That's wild man, I thought my 12 was bad. I had a similar wake-up call when I tried to fix a bug in my "x2" variable and accidentally changed "x" instead, spent three hours untangling it. It's funny how we think we'll remember our shortcuts, but our brains just don't work that way after a few days away. I still catch myself doing it sometimes with small scripts, but I force myself to use at least a word or two now (like "userTemp" or something basic). The worst part is when you try to explain your old code to someone else and you just sound like you're making excuses for a mess.
5