Do you ever get that "what the hell was I thinking" feeling?

You write some code, a year goes by, you look back at that code, and think: 

“What the $#@@#% was I thinking when I did that?!”

Right? Huh, you don’t? What the heck is wrong with you??huh

The way I see it, if I look at some code I wrote a year ago and do NOT get the “what the hell was I think?” feeling, that means I haven’t either learned or improved a damn thing in that time period. Seriously, if I can’t think of a better way of writing some code after a year, it really means I didn’t learn a new trick in the programming language, a new pattern, a new nothing. That means I’ve been settled in my own ways, I haven’t read somebody else’s code, I haven’t paired with anybody else…

Now, I know there’s people who wouldn’t care, but something like that bothers me. One of the things I always emphasize in my presentation on productivity is this: I’d like to always be a little better than I was the day before. If I learn a new word in English or Spanish, a new command in C# or Ruby, a new shortcut… whatever small that thing is, it already makes me better than the day before. As I’ve mentioned the other day, I’ve been also striving to do at least one thing different every week, as a way to keep pushing myself into, hopefully, making either my life or somebody else’s a little better.

And you know what’s really great? You go out there, talk to other people about this type of thing, and see that opinion being echoed by others.

So, again, if you look at code, or anything else for that matter, that you’ve worked on sometime ago, and you don’t feel like it could be improved in any way, think again; that could mean stagnation! I don’t know about you, but that freaks me out.

It has happened to me a couple of times (and I guess maybe to you, too) when after working a day or two on something, some type of hardware or software malfunction has caused me to lose my work and I had to redo it. Once the work is redone, I realize it is somewhat better than the original one. That’s that: I’ve done it once, hopefully learned something in the process, acquired some experience, and then the second time around it should come out easier/better.

Ok, enough random thoughts for the day…  🙂

Advertisements
  1. #1 by Mark Wilkinson on April 7, 2011 - 10:16 am

    Yes, I’ve re-written a few projects from scratch more than once because after going through the original, refactoring out to say new design patterns, or interface-based design (when none of those were used before) takes longer and was more frustrating than just starting again with better ideas and tools. That’s of course if you have the luxury of time to do such a thing instead of working with your legacy code as best you can.

  2. #2 by JF on April 7, 2011 - 8:27 pm

    That’s been one of my arguments *against* too much focus on code re-usability for a long time now … there’s way too much code out there that shouldn’t be re-used, it should be re-written

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: