Welcome to MSDN Blogs Sign in | Join | Help

Not my finest hour: Getting instructions on doing something I've already done

Last year, I sent some email to the people who run our team's check-in validation tool asking how I could add a new rule to the validation tests. One of the members wrote back, "You do it just like this guy," and sent me a reference to another check-in that added a validation rule.

That other check-in was made by me.

But wait, it gets better.

That other check-in? It added the very rule I was thinking about adding.

Published Thursday, November 27, 2008 7:00 AM by oldnewthing
Filed under:

Comments

# re: Not my finest hour: Getting instructions on doing something I've already done

Thursday, November 27, 2008 10:09 AM by SRS

What ever you do, don't lose face. Check in the duplicate code, and argue that twice the code is twice the goodness.

# re: Not my finest hour: Getting instructions on doing something I've already done

Thursday, November 27, 2008 10:53 AM by Doug

Remembering all the details about all the systems you work on is impossible.  I regularly find some module/change/whatever that I think needs doing is something I've already done...

# re: Not my finest hour: Getting instructions on doing something I've already done

Thursday, November 27, 2008 11:41 AM by Ben Hutchings

That's just a glitch in the matrix.

# re: Not my finest hour: Getting instructions on doing something I've already done

Thursday, November 27, 2008 11:47 AM by bramster

and I thought it was just me, in my dotage. . .

# re: Not my finest hour: Getting instructions on doing something I've already done

Thursday, November 27, 2008 11:49 AM by Reinhard

Wondering how you came to the conclusion that the rule was not already there...

# re: Not my finest hour: Getting instructions on doing something I've already done

Thursday, November 27, 2008 12:08 PM by Rafael Vargas

Sometimes it happens... Once I googled for a problem I had with a datagrid and I found the solution posted in my own blog.

# The Old New Thing « Said Svec

Thursday, November 27, 2008 12:35 PM by The Old New Thing « Said Svec

# re: Not my finest hour: Getting instructions on doing something I've already done

Thursday, November 27, 2008 1:53 PM by Koro

Happens to me all the time with my code.

# re: Not my finest hour: Getting instructions on doing something I've already done

Thursday, November 27, 2008 3:37 PM by Chris

Those who do not remember history are doomed to repeat it.

# re: Not my finest hour: Getting instructions on doing something I've already done

Thursday, November 27, 2008 3:50 PM by Mats G

I've gone through the halls looking for the guy responsible for maintaining some particular program, only to find people giving me that weird look and saying "aren't you the maintainer of that program?"

Happened twice.

# re: Not my finest hour: Getting instructions on doing something I've already done

Thursday, November 27, 2008 4:53 PM by Roger Hågensen

At least it's not as bad as looking through a source, that you wrote, but you don't understand what the hell you coded, or how you came up with that angle in the first place, and end up feeling like you need to rewrite it all, because you doubt your own code...

Happens to me more than I'd like to admit. *laughs*

# re: Not my finest hour: Getting instructions on doing something I've already done

Thursday, November 27, 2008 5:36 PM by Dave Oldcorn

Ah well, we all need an idiot board in the office.

My finest hour? minlog2 = (log2y < log2y) ? log2y : log2y;

# re: Not my finest hour: Getting instructions on doing something I've already done

Thursday, November 27, 2008 6:25 PM by hagenp

...but is it not woderful if you got the task to extend some module (add a function point), and then to discover a comment on how to add it.

(When checking who wrote that comment then I discovered that it was my earlier self from two years ago.)

* Some tasks are only held in a more or less big cache -- if this is flushed you have to regain context.

* Commenting code helps not only other people to maintain it, but also yourself.

# re: Not my finest hour: Getting instructions on doing something I've already done

Friday, November 28, 2008 4:05 AM by Robbie Mosaic

Ah, that's my thought about code readability: after leaving some code for a while, not able to remember every detail means that I'd like the code to be understandable, so I wish the code to have good design documentation and enough comments, though sometimes this isn't the fact :)

# re: Not my finest hour: Getting instructions on doing something I've already done

Sunday, November 30, 2008 2:13 AM by Igor Levicki

>>My finest hour? minlog2 = (log2y < log2y) ? log2y : log2y;<<

Was that a result of a copy/paste operation?

# re: Not my finest hour: Getting instructions on doing something I've already done

Sunday, November 30, 2008 2:13 AM by Igor Levicki

>>My finest hour? minlog2 = (log2y < log2y) ? log2y : log2y;<<

Was that a result of a copy/paste operation?

# re: Not my finest hour: Getting instructions on doing something I've already done

Sunday, November 30, 2008 7:16 AM by Tom

My least favorite?  Looking at code I've written years ago and wondering "was I on drugs when I wrote that?  It's an order of magnitude more complicated than it ought to be."  

Then I simplify it and... it doesn't work.

I spend hours debugging code that ought to work, damn it. After about 6 hours of tedious and ever more mind-numbing debugging, I find the problem.

It's a bloody compiler bug/library ambiguity (thank you Java)/OS bug.  Suddenly my memory clicks.  I remember being outraged that my beautiful clean code was going to require an enormously clunky work-around.

Of course, a lesson like that made me remember to do lots of "this might look stupid, but I wrote it this way because..." type comments for myself, but I'd been programming for enough years at that point that I had 4 or 5 years worth of these little gems to find over the next 20.

# links for 2008-12-01 : Bob Plankers, The Lone Sysadmin

Monday, December 01, 2008 11:01 AM by links for 2008-12-01 : Bob Plankers, The Lone Sysadmin

# re: Not my finest hour: Getting instructions on doing something I've already done

Monday, December 01, 2008 1:26 PM by mikefried

This story was great. Thanks for sharing it.

# re: Not my finest hour: Getting instructions on doing something I've already done

Monday, December 01, 2008 2:26 PM by I've done that

I know at least once i saw some code and thought, "what idiot wrote this?" Only to discover that I wrote it.

# re: Not my finest hour: Getting instructions on doing something I've already done

Monday, December 01, 2008 8:56 PM by Simon Cooke

Hehe... yeah... I've been there and done that too. Several times I've been looking for solutions to some random problem, and hey presto, there's me on a newsgroup telling someone else what the solution to that random problem is.

I figure it's a me from the future, who has finally cracked time travel, and is just screwing with me.

# re: Not my finest hour: Getting instructions on doing something I've already done

Tuesday, December 02, 2008 3:41 PM by Chris

Those who do not remember history are doomed to repeat it.

# re: Not my finest hour: Getting instructions on doing something I've already done

Tuesday, December 02, 2008 6:05 PM by Friday

Those who do not repeat are doomed to remember it. :)

# re: Not my finest hour: Getting instructions on doing something I've already done

Wednesday, December 03, 2008 7:02 PM by Dave Oldcorn

>>>My finest hour? minlog2 = (log2y < log2y) ? log2y : log2y;<<

>Was that a result of a copy/paste operation?

Afraid not, straight out of my fingers, merely with no brain involvement. While I am someone who does sometimes err on the side of copypaste when if I thought about it retyping would be quicker, that wasn't one of those times.

New Comments to this post are disabled
 
Page view tracker