Transparency_Gets_You_Shot

Quick Profile

Alex Ooi Profile Picture
Hometown: Melbourne, Australia
Specializations: Java, Ruby on Rails
University: Software Engineering & Economics, Melbourne University
High School: VCE, Melbourne High School
Links:
 

Popular Articles

Tuesday, June 01, 2010

Recently we uncovered a bug in an application that went to production. I wasn't working on that project anymore, however i took time out of my current project to investigate the cause of the bug. Turned out that the bug was a mistake that was quite easy to make. Instead of doing an 'ilike' on a database search, the code was actually doing an 'eq'. That one method was the difference between a case-insensitive search and an exact match. Easy enough mistake to make, given that most searches on a database are exact matches!! (think booleans, dates, enums, numbers, etc).

Anyway, taking the approach of transparency, i fully explained to my clients the cause of the bug and the fix required. 

What happened next?

What happened next? ... I got shot! Worse still, it was over email and CC'd to a number of people.

Instead of taking this information and using it constructively, the client decided to use it against me specifically and shoot me down. Seems that in their eyes the bug should never have happened because case insensitive matches are standard! This apparantly ignores searches over different types of fields, such as booleans and enums and numbers, all of which generally use exact matches and more importantly use the same code function as string searches.

Here is exactly what I mean ... See how easy it is to accidently use the 'eq' instead of 'ilike' when doing a search by the name? Especially when you are applying other fields to a criteria, all of which use 'eq' perfectly legitimately...

...
session.createCriteria(Person.class)
     .add(eq("type", data.getType())) // this is ok
     .add(eq("phoneNumber", data.getPhoneNumber())) // this is ok
     .add(eq("name", data.getName())) // should be 'ilike', not 'eq'
     .add(eq("dateOfBirth", data.getDateOfBirth())) // this is probably ok
     .list();
...

Also, it seems that in their eyes I was the only one responsible for delivering this functionality. The reality is that there were 5 people involved in testing this thing, all the way from the developer to the system testers to the people involved in UAT. Nobody picked up the bug. Its amazing how obvious everything is in retrospect, isn't it?!

I was absolutely livid ...

Yes... yes i was ...

Anyway, perhaps it is just the culture at this this particular clients workplace. I certainly haven't been shot at any other client site i've been at...

The Punchline

The moral of this story? Transparency gets you shot. Now i understand why ppl who work in corporate cultures create a curtain of smoke and mirrors around their work ...

Comments ...

Sounds to me like a programmer not accepting responsibility for their code...
Posted by Ultimate Bat Pig on Tuesday, June 01, 2010 at 01:05 PM
Useless testers. Should put in more bugs next time to make them earn their pay!
Posted by tester on Tuesday, June 01, 2010 at 01:09 PM
The best way to not get blamed is not to do any work at all. Attending alot of
meetings, then complaining that there are too many meetings, are a good way of
making it SEEM like you're doing work when in fact you're not doing anything at
all, thus removing yourself from any blame for anything that goes wrong >_< ......
just like the best way to not break the build is to not check any code in
Posted by Alex Ooi on Tuesday, June 01, 2010 at 01:34 PM
Hmmm..... that's a very cynical view.

"Try not to become a man of success but a man of value. Albert
Einstein."
Posted by Ultimate Bat Pig on Tuesday, June 01, 2010 at 01:51 PM
There's always both sides to any argument, just try not to take it personally.
You got the job done in the end, so well done. Hope there's a test case built
around that now ;-)

brighten up your day with some more Ze Frank and Arjie Barjie.

Btw I love pork rolls.
Posted by Alex Wang on Tuesday, June 01, 2010 at 02:07 PM
shit happens. I know you feel vindictive about it but it's over, deal with it
an move on.
Next time just have a code review.
Posted by tester@test.com on Tuesday, June 01, 2010 at 02:47 PM
I love pork rolls too ... *sigh*
Posted by Alex Ooi on Tuesday, June 01, 2010 at 05:28 PM

Add a Comment

*
*
You must answer the following simple maths question before your comment will be accepted.
*