Tales from a Developer

The last two days I was working on a bug again. After countless hours of debugging and digging through code, I finally found the problematic place today.

I think the large the impact of the problem is, the smaller is the underlying problem itself. At least this applies to the last few bugs I’ve encountered.

Recently I have written about the simple difference of = and +=, today’s bug was almost similar.

Instead of doing something at the main API connection, something was done at another one. Obviously the wrong one.

The thing is, with all the load balancing going on, the problem wasn’t easily reproducible. Under special circumstances, the client was switched over to another API which lead to the problem.

Since we have a connection to both APIs, it was a pain to debug. Why? Well, both APIs use the same base class and every time I was evaluating an expression, I had to watch out at what API connection I was looking.

The problem that it wasn’t always reproducible made it even worse. After a few minutes of debugging you find out that it won’t fail this time, so it all started from the beginning again.

Finally, I found it and that is the only important part. :)