Bugged by a fix!!!!

Here i digress from my usual blogs on nonsensical issues, a slightly technical blog on how a particular bug in my project screwed my happiness for the past 3 weeks!!!

About a month back I moved to this maintenance project . This project was supposed to different from the others, I supposed it would be a chilled life with just a couple of bugs to be squashed in each release. Was it my pure ineptitude or just my rotten luck that even in a project as cool as this I managed to appear like a fool. Not that looking like a fool is new to me, but with this bug I just raised my own bar of foolishness[:)].

"I am more comfortable with web applications", I proclaimed. So i had set my expectations as an ASP.NET expert and my lead duly served me with a bug on the web, a performance issue. I had never seen a performance bug in my 2 years of development, not by the virtue of my code because there was no perf test done my code ever. My analysis on the bug was right, identified the root cause of the perf issue and lead seemed quite happy with the approach taken. This just bolstered my confidence and fixing the issue was a breeze. The fix was released and there were no further issues.

Week 1 - Ignorance is bliss
Not even in my wildest dreams, specially when I was riding high on my new-found confidence, could I have imagined that the very next bug would create so much mayhem in my life. The second bug was yet another performance bug. However the only issue was that it was on a client-server setup and the self-proclaimed ASP.NET expert that I was I didn't even know architecture in a C-S setup. This was a bug that I should have seen and analyzed through a microscope, instead I just plunged eagerly at it without planning or forethought. Did not know that in a C-S setup the code is separated into client code and server code. My lead suggested an approach and I blindly started coding and my tested it on my machine. I just could not see any perf issue at all and I thought I had struck gold again and I duly reported that the bug was fixed. Little did I know that this bug was to be tested on a distributed setup (just shows my understanding of the bug). So my lead pointed out that I was doing it all wrong and so I tested it on a distributed setup. The results were disastrous, the application spit an exception at me. I was humbled. I was advised to read up on the C-S architecture and how to code in it and admonished at my understanding on the bug. So with a little (actually minimal) understanding on the architecture I set about to rectify the issue.The first bad week in the project ended.

Week 2 - Consult your elders
Came Monday and I was in office by 8. Looked into the issue, it and tested it the right way and the performance had indeed improved (surprise surprise)!!! Regained a little bit of my confidence until my lead reviewed my query and decided that the perf could still be improved by coming up with a better approach, he went to the extent of suggesting one.Tried it, tested it and noticed some issue in the approach, so I chucked the approach and began a quest for better approach. Here I committed my second mistake. Like the Zen master says and like all good Indian children are expected to do "Consult your elders"[:)]. Found out a solution which was extremely optimal and I analyzed and realized that there could be no better approach. The bug fix was over I thought and had a relaxed weekend.

Week 3 - Lady luck is still not by my side
So turns out that the most optimal query would not work on SQL server 2000. All the functions I used were SQL 2005 specific. And all our clients had SQL 2000. So my lead me as to why I did not use the approach suggested by him. I felt like a convict being questioned in a court-room, and rightly felt that for I had indeed committed a crime of not consulting before chucking out the approach suggested by him. By now my lead had seen enough and wanted a complete report on how I went about handling the case, what were the potential loopholes and what could be improved. Taking into consideration all suggestions given by him I compiled a report (in the literary world this act would amount to plagiarism[:)]). Having gotten his approval I set about with the final and certified approach. From this point onwards I blame my luck, the fix was checked in and it was tested. There was P1-S1 issue introduced because of my fix. With the release date just round the corner, there were panic calls from the lead, the manager and the test team. So I came back to office at 10 in the night, worked till 2:30, and fixed the issue. This time I was super confident(and tired) that there would be no more issues. And luckily for me there were no more issues. Up until today.

Today
Bad luck just had to catch up. My first fix, which made me feel so good, was tested again and a huge bug was unearthed. So at this moment I am awaiting confirmation from the manager on whether I have to fix this new found issue or do we live with it.

All those friends of mine who told me life in a maintenance project would be super cool ought to be beaten up for setting the wrong expectation. All I need now is to get drunk and forget these past 3 weeks..... Whoever said that Zindagi rocks........................