Actually... You Didn't

by Nick Friday, July 14, 2006 9:18 AM

I review a lot of code during the day.  Some people's code I review after they check-in to source code control, while one person in particular has to show me their changes before they're even allowed to check-in.  Whenever she comes to me with her code changes, she always says "I fixed the bug"... and after looking at her code I always have to respond, "Actually, you didn't."  This is quickly followed by, "Yes I did... that thing doesn't happen any more."  And while that's always true... her solution was to simply comment out the offending code, instead of fixing the offending code, which results in a new bug to replace the one she supposedly fixed.

It's as if the function she commented out was called InsertDefectWithoutDoingAnyRealWork(), when in reality it's called DoSomethingAlmostRightThatStillHasToBeDone().  And then after I tell how her that her solution will cause functioning code to not function any more, and that she needs to go back and really fix the bug... as she leaves, she always says, "OK, but this did work."

No it didn't!  Fixing a defect by causing 5 more is not fixing a defect at all!  Fixing a defect by commenting out code is not fixing a defect!  Every line of code was written for a reason.  It may not do exactly what was intended, but there was a purpose to it's being there.  So before you simply comment something out, you need to understand that purpose in order to make sure that by the time you're done, that functionality is either deemed to truly not be needed, or has been fixed.

That is when a defect is fixed.

Comments (1) -

ns
ns
8/1/2006 4:41:39 PM #

what an idiot.
Women like her give the rest of us female coders a bad name.
I hate to say it, but almost all of the women coders I've worked with are idiots like this.

Everytime this happens to me... and then my male co-workers start treating me like an idiot... I just wanna go find women like you describe and slap them.

Comments are closed

About Me

Nick Schweitzer Nick Schweitzer
Wauwatosa, WI

Contact Me
I'm a Software Consultant in the Milwaukee area. Among various geeky pursuits, I'm also an amateur triathlete, and enjoy rock climbing. I also like to think I'm a political pundit. ... Full Bio

Community Involvement

Twitter

Archives

Flickr Photos

www.flickr.com
This is a Flickr badge showing public photos and videos from Nick_Schweitzer. Make your own badge here.

Standard Disclaimers

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2012 Nick Schweitzer