I review a lot of code during the week... it's one of the more interesting parts of my job. It's amazing how certain patterns just sink into you brain after you review enough code. Recently a coworker was in my cube asking about what a particular section of code was supposed to do. We were looking at my monitor when the following conversation took place:
Coworker: What does this do?
Me: Well you wrote it, why don't you tell me.
Coworker: I didn't write that code.
Me: Yeah, you did.
Coworker: I never change anything in that project. You're the only one who works in there.
Me: Trust me. I didn't write that code. I would never write an If statement like that, and that's not how I write comments. That looks like one of your If statements to me.
Coworker: What?
Me: Here, let's take a look at the Source Safe history log.
Sure enough... after just a few minutes in Source Safe, it was revealed that he added the code in question. It's funny how easy it really is to pick out one person's code versus someone else's. I can differentiate code written by pretty much everyone on my team just by looking at a few lines. People have different commenting styles, and different spacing conventions that they like to use. People leave fingerprints in their code that they don't even realize.
So then we sat around for a few minutes and I showed him his fingerprints. I showed him how his If statements were subtly different from mine, and how he comments differently. I didn't do this to correct any flaws... because there weren't any. It was simply a matter of coding style. It is important to at least be able to recognize your own code though.