Looking back on code I wrote perhaps even a year ago I sometimes think: "Why the hell did I do that, that's stupid?".
I also sometimes catch unused variables and unnecessary ones that can be refactored and/or pruned. The brain has a way of blocking things out when you're working on something that looking back a year becomes obvious as your brain thinks it's fresh code.
And as you're always learning, perhaps there was a function in an API you wasn't aware of so you wrote it or sculpted a workaround for it using other functions.
I also find doing my own code reviews useful.
Looking back on code I wrote perhaps even a year ago I sometimes think: "Why the hell did I do that, that's stupid?".
I also sometimes catch unused variables and unnecessary ones that can be refactored and/or pruned. The brain has a way of blocking things out when you're working on something that looking back a year becomes obvious as your brain thinks it's fresh code.
And as you're always learning, perhaps there was a function in an API you wasn't aware of so you wrote it or sculpted a workaround for it using other functions.
Haha, I look back on code I wrote last week and think it's stupid. :P
"When I wrote this, only God and I knew what I was thinking. Now only God knows."