Today all of a sudden, I became reminiscent about my first day at work (Real work – 19-10-2006). I joined my company MindTree Ltd as a fresher from College. After a month- and half training we were allocated to projects, and then after the initial introductory session to the team and project, they told me to look into certain stuff for familiarity. My machine was set up with the development environment, required software and other things. They informed me that I will be work for a couple of months in this module and then we will move me into another module. I realized only at a later point that each module was a project by itself. It was a database module where we had to create reports and stored procedures for generating those reports.
So, now I have to start my work on SQL server management studio, and I had hardly used the tool. My mentor Namrata showed me through the database for an hour or so and then told me to explore. There was one CalculationStoredProcedure and some values were calculated wrongly, so my first work was to find out what was wrong in the logic of that stored procedure. Have I worked with SQL server before? NO, we were trained on Oracle database for one training session for a day and during College. All we learnt was Database normalization techniques, ACID properties and worked a few simple queries in MYSQL classes. Wonderful na... and now you have a tool which you have not worked with at all and also something called as a stored procedure for which I need to know “ How to debug”… God level this was for me.
But you see, as a fresher you are full of zest for the work that comes your way and you are always in this raring to go mode. My mentor had neatly set some shortcut keys in the Management studio and told me about them. But I was little over confident about the whole thing called “My memory” and hence did not make any note of the keys and for what they were used. So now, they tell me to see a stored procedure and figure out with Test data what was going wrong with Calculation. Since it was time for lunch, she closes the Management studio, we go for lunch.
Lunch as a fresher in corporate world is completely a different experience. It’s like you are the nursery kid amidst the whole grown up crowd around you and invariably lunch will last for an hour or so and with all the fun of teasing your friends and sometimes getting teased yourself.
Now, after an eventful and fun filled lunch I am back to work at my desk, I open Management studio (SQL Server 2000) and ready to start my work. Ok now I am completely blank as I thought I would remember the shortcut keys and their use. I don’t remember any. Then I remembered that she had pressed F5 to do something after typing the stored procedure name. With that limited knowledge and to see that my mentor is busy, I plan to test the trick on my own. Hence I type the stored procedure name and press the F5 key. But wait, what the hell happened. 46000 odd rows updated. :( :(. I then realize that F5 was to execute and the whole thing EXECUTED WITHOUT MY INTENTION FOR IT. I panic and then run to my mentor to inform her about the tragic incident. To my bad luck she informs that I was not connected to Development database but to Test database which customer used to validate request. :( :( :(. Now, I panic even more, and thousands of thoughts spin in my mind. First of all I am irked at myself for being overconfident about the whole thing. I curse that to my bad luck the database had to be the test database, and I am totally dismayed by the fact that my first day of real work turned out to such a horror for me. Since I am flabbergasted, my mentor after pondering for sometime, tells me the statement which brings some life back to me – “Lets go to your machine and see what really happened”. I explain her all my stupid actions and then she shows me how to see the stored procedure using commands and without using any short cut keys and tool specific features.
Sp_helptext stored procedure name had to be my life saver, which somehow I did not know and did not care to make a note of it when my mentor taught me. But then she goes into the stored procedure and finds that it is a parameterized stored procedure, and wonders how it managed to run only to discover later that there was default parameters defined. Ok, so now what happened, she opens the default parameter table and finds that it was a multiplier of 1 defined in it for that default parameter and hence all the rows previously present got multiplied by a factor of 1 and effectively remained the same. As soon as she told that to me, I sprang to my feet and started thanking her so much to have said what she just now said. Imagine that time I did not have the clue that Test database could be just backed up using production dump in the worst scenario.
I have moved on from that day to what I am today, I can say that there have many such incidents where I have learnt how to do things “on the job” and it has been a pleasure to work with people who have shared the enthusiasm of learning and BTW, I did become an living encyclopedia during my days in the project regarding the stored procedures and calculations done on them. :) But I learnt a valuable lesson that day, I got into a mess because of my over excitement and it is very easy to get carried away when you are in a new phase in life, but we should always keep ourselves grounded. We always have something to learn and sometimes overconfidence can ruin the future for us. So, next time you embark on something new, just take it as another normal day and you will feel that every other day there is some learning for us, there are some newer challenges to be faced. And then your life will be a collection of such stories where you achieved something, learnt something, messed up something, rejoiced something. Take life one day at a time and enjoy in its serenity.