Crap, It Succeeded …

So, at work I am quite busily working on a feature where, essentially, what I’m trying to do is take an operation that used to be one-step and introduce a step into it where you can do that first step — which is most of the work a user might want to do — and then finish it later. This means that there are two major parts to the feature. The first is to do the first step so that everything is stored and there when we want to finish it off. The second is the operation to complete the original one-step operation in precisely the same way as the one-step operation did it. Thus, a lot of testing has to be done to ensure that the end result of my two-step operation is exactly the same as the end result of the one-step operation. Since there are a ton of different combinations, this is something that I need a lot of help from QA to do.

It also means that I can get into an interesting situation, which happened over the weekend. One specific scenario was failing, so I was working through the code and fixing up all the places where that failed. After I did that, it completely succeeded! But, I had to check to see that it did all the same things as the one-step operation, and things were looking a little funny, so I tried to create it using the one-step process … and it failed. After making sure that what I was doing wasn’t screwing something up, I then spent the next day trying to figure out where my code was going wrong and succeeding when it should have failed. I finally managed to successfully get it to fail and thus knew that my code was closer, at least, to being correct.

This is the second time on this feature where I had something succeeding when it should have failed, and so was incorrect. The other time, it seemed to work — meaning fail or succeed appropriately — for the QA people, so I ignored it as being something odd with my set-up. But it’s one of those odd cases where succeeding is really a failure and a failure would really be a success.

Of course, all error cases are like that. But this wasn’t supposed to be an error case. It just happened to be a failure case due to misconfiguration. And that always leads to that odd feeling of “Damn, it worked, so I did something wrong!”

One Response to “Crap, It Succeeded …”

  1. natewinchester Says:

    On computer programmers ever have to say, “Oh it worked – dammit.”

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s

%d bloggers like this: