Wednesday, April 25, 2007

The hassles of software programming.....

Perhaps you wont get any idea about what this blog is about from the heading (I suggest u read the blog :D)....
Well this blog is about the troubles i took for a programming project in my final year of engineering....

When i got my final yr project in Siemens (thanks to a very very very close reference) , i was elated. I thought this year would be a nice one..... But later i came to know that what seemed to be a nice and easy project could be so tough at the end ......

My project - Designing and implementation of communication system in power system automation..... Phew!!!! Seems like a flashy project isnt it (Trust me guys names can be deceiving :D).......
Well lemme tell you there isnt anything flashy about it.... Many people had so much cooler project than i had , that i was kinda getting jealous of them, well this feelin had vanished at the end (ull find out why , just keep reading :D)..... With 3 of my other batch mates i started the project....

Our job - To find out as much information about communication systems as possible...... Little bit of copy - paste here and there, plus adding little information that siemens gave us and voila....... our first project report was ready for 7th semester........ Not to mention we had to go to Siemens every friday for a 1 hr study session.......

Now the real story begins............. In the 8th semester......
I always thought our project was done in the 7th semester itself..... Well i was in for a real treat (n little bit of trouble too)..... Siemens decided that they would give us a program to write, which was basically a simulation of an alarm system that would send SMSes ........

Our problem - No one knew anything about programming ....... I just knew little bit of Visual Basic (VB)...... I accepted it nonetheless.
So with whatever knowledge i had about VB i started the project...... I had created the basic outline for my project just by linking it to some databases (which was easy)..... But the question was how to send SMSes......
Well that was solved too....... Thanks too my bro i did get a sample code..... And began studying it..... But we were lacking on resources..... WE NEEDED A GOD DAMN MOBILE PHONE OR A GSM MODEM FOR OUR PROGRAM TO WORK!!!!!!!

Well what do you know that was the time i bought a new mobile phone for me (Nokia 6300) yayyyy.......... A vital utility for my project too.... I began sending SMSes through hyper terminal
Well it worked...... I began modifying the code as per my requirements..... I tested it ..... AND IT DIDNT WORK...... WAAAAHHHH...............

Well i got into action...... After endless searches and countless posts in many forums..... I still was at ground zero....... Why !!!!! I cursed , why the hell is it happening(only to me!!)...... I thought our program was over ...... What would Siemens think, if i came empty handed to them........

I tried and tried and tried many times .... still no result..... Will someone tell me how the hell should i send SMS...........
And ya did i mention i was using a USB port for my program........

After countless searches and posts in forums and endless arguments with myself...... I came to one conclusion its impossible to send the SMS with my program..........
But according to me there is nothing impossible in the programming world.......... With this thought i tried it for one more time..... Maybe it'll work............ I searched again... courtesy Google (again). Well this time in some corner of the internet, there was an article from my old friend Microsoft :D........
The problem with my program was i was using MSCOMM control to communicate with the com port and then the devices connected to it......... Well what do u know MSCOMM does not support USB , only serial port.....

After that the hunt began for a cable conversion from usb to serial ....... after many trips to lamington road i felt that this cable was not yet invented (hmmm I wonder whyyyy!!!!)....... Huh guess this isnt new thing any more...... Back to ground zero again..........

Now comes for a little emptying of pockets........ The last option for us was to get a GSM modem which has a serial interface...... And we got it..... (The company sponsored us for that.... God bless those people) ............ Now the final task was to modify the code...... I did that ... BEEP!!! error in phone ..... again ..... BEEP!!!! No answer from phone..... again ....again.... again..... (isnt it getting tiring now, arrggghh!!!)..... one last time again ..... beep beep ( message tone of my phone )..... Waaaahoooooo It is working.......

Finally after many hassles (approximately 4-5 weeks of continuous programming, searching and posting) my program worked...... It worked like a charm....... THANK YOU GOD!!! I gave presentation to top bosses in Siemens about my program..... They were happy, I was happy and we all were happy....... hehe......

Hmmm ....This is what i concluded from my experience...... there are three types of programs:
  • One that works with 100% success
  • One that never works with 100% failure
  • And one that works at one time and fails during the other. I would give it a 50-50 chance.
I am happy now, that i converted my program form 100% failure to a 50-50 chance to a 100% success ..

This is a tip to all you programmers out there.... "Code karte jaaoo bug ki chinta mat karo" - meaning do your programming , dont worry about the bug......

Now my final presentation is left .... Told ya before, the report was a piece of cake.... All i am worried about is how my program will be perceived by the teachers in my college.... I hope they like it......


PHEW!!!!! END OF THE STORY.......... :D

1 People's opinion :

K said...

nice description...