There are two ways to looking at old code: "I can't believe I wrote this code" and "I can't believe I wrote this code."
I recently tabled a small module for about a month. I came back to it and had trouble remembering what I was trying to do. Why did I name my variables that way? What was the point of this function? How could this ever work? If anyone else had ever seen that code, I would have just crawled into a hole and died.
OTOH, I recently wanted to build a new UI gadget in javascript and remembered once writing something similar in VB years ago. As I went through that code, I thought, "This is really clever! Was I really that smart back then? Why haven't I written anything this cool lately? Am I losing it?" (The answer for me and everybody else is, "If you did it once, you can always do it again.)
Ok, I seriously thought I was the only one who did the second. I've looked back at some of my stuff and thought that that was when I probably peaked and none of my stuff lately is as good.
The second "I can't believe I wrote this code" (in amazement) is a red flag for me. I always like to look back at code that I wrote years ago and think "That's horrible", or "I can write a better/faster version in half the time!".
To me, it's a measuring device that tells me I have not been stagnant and that I'm improving and honing my skills. And since my code will never be perfect I should always be able to look back in disgust, otherwise, I'm not pushing myself hard enough.
There are two ways to looking at old code: "I can't believe I wrote this code" and "I can't believe I wrote this code."
I recently tabled a small module for about a month. I came back to it and had trouble remembering what I was trying to do. Why did I name my variables that way? What was the point of this function? How could this ever work? If anyone else had ever seen that code, I would have just crawled into a hole and died.
OTOH, I recently wanted to build a new UI gadget in javascript and remembered once writing something similar in VB years ago. As I went through that code, I thought, "This is really clever! Was I really that smart back then? Why haven't I written anything this cool lately? Am I losing it?" (The answer for me and everybody else is, "If you did it once, you can always do it again.)