Thursday, 11 September 2008

Fourteen years with the computer ...

For no good reason today I realized that it has been 14 years since I had my first encounter with a computer. At the first meeting, I was nervous and my computer stubborn. It was a 386 based PC with a 4MB extended RAM to run Windows 3.1 and had 170MB hard disk drive. My dad had installed Windows and wanted to show me few games. Unfortunately the mouse was not working and the "oh-so-obvious-these-days" shortcut of "Alt+F" was not known to me and my dad was still learning the ropes of Windows.
 
Well I did improve from that point. I had the privilage of booting all the 8 PC's in my school lab using the boot disk. That was because my lab incharge saw that I was both interested and comfortable. I used to do BASIC at school and once in a week or when my dad was free I got a chance to run a few commands on the PC at home. There was no Google to get code samples, and the GWBASIC reference we got with DOS was the only way to go. I still remember on the first day with GWBASIC, I wrote a program , saved it as something.BAS and executed it, and then tried to type a second program in the same file under the first program. My reasoning - why waste a file! My cousin who was teaching me was grinning and he thought I needed a lesson.
 
Slowly over the next two years he taught me C and basics of how the file system works, Viruses and anti viruses, how to care for a floppy and how to write a small game. Back then I had no access to anything other than the books in my hand and a pen and paper because most of the time my dad used the PC and I was not supposed to do anything stupid on the PC. I wrote lines and lines of code on paper and ran it in my head. C was tough to run in your head, but I did. Initailly I got everything backwards, but then once I got the hang of it it was cakewalk. By the time I was out of high school and laid my hands on a proper Windows 95 PC, I could get my program right the first time.This was 1998. C was good! but pointers had me for the next 3 years. Meanwhile I got a taste of Visual basic - back in its version 4.5 days and I was amazed by how much I could do easily. Although now after years of Java I dont think I will go to Visual Basic again.
 
Then I was away from computers for two years. In my first year of engineering, we had a C and data structures lab where I cracked pointers. Eureka! and I was the saviour of many souls who had to complete their lab work. I tried C and VB for two years. Then I did 8051 microcontroller programming for a semester on a small custom computer in the lab. That was fun! I wrote so much stuff that I could write machine code and finished my final lab exam in 30 mins flat out! Although this sounds good, it did not get ame any brownie points in my class - I was the geek who spoke an alien tongue. By the time I got to Java in final year, I was having fun. In out last semester we did a project where we coded a microprocessor in C and built a front end in VB.
 
Then came the Job, again I was the geek who spoke an alien tongue - C, Java and programming fundamentals were cakewalk. When they taught me Oracle , i just applied what I already knew about programs to SQL - its just a set of instructions, assignments, branchs and loops. Just dont get in a tangle.
 
I dont know if it is arrogance or ego or whatever, but I am never scared of a programming job adn always take it as something trivial. My first two projects in VB and Java, I did just that - took it as a simple job and did it well. I had the chance to try JUnit, Log4J and Python etc but never found a proper application for them in my projects. Then for two years I did projects that used packaged tools. These projects taught me a lot of other things about the job. So late last year when I got another Java project I was ready to go. Day 1 i realized that I am supposed to work with guys who have 20 yrs average experience in programming. It did hit me hard. I had to make effort to be recognized, I had to write good code and fast and in proper standards compliant manner to get then to even look at it. And each time I had just one shot - just like a sniper who can take just one shot at his kill.I have sobered down and mellowed in the last 10 months, but I have gained scars that will stay with me forever and guide me.
 
I grew up learning C and Java from playing around, not by Google. Today I do search for code on Google and other places, but still I do it my way. I wrote a small console for Jython few months back (http://console4jython.sourceforge.net), I wrote this in one night in a single class. Then I spent another 4 hours breaking it into more structured parts. I was happy, and I searched for any similar project on Google. I did find a few, and I felt I reinvented the wheel, but I was happy. Because I had a wheel that I liked. Maybe a few others will like this wheel, so I put it up on the net for people to use. The key here is the joy of creation. I felt the kind of thrill I felt when I wrote my first program. I also realized something. I was trying to learn Python for a while. I knew what and how to code, but was not getting that comfort feeling. I realized it was because I was not doing anything with my knowledge. I was not trying things. So I wrote a script to generate some XML we needed. I wrote something, cleaned it to standards, wrote some more and cleaned some more. In the end , I had something useful to be proud of.
 
What have I learnt in 14 years? Not much in the first 10 except how to get something right without Google to help you, but in the last four years on the job, yes a lot
  • Write some code - if you have an idea code it and see of it works or blows up. Doesnt matter fo you fry your PC, try first
  • Do this trying thing again and again even if you fail
  • Dont be afraid of code, It cannot come and bite you
  • Think, analyse and work out all possible scenarios
  • Dont believe in reuse - be prepared to rewrite stuff to suit your needs
  • Test
  • Test enough
  • Follow design patterns - dont follow sample code, follow the philosophy of the pattern or approach
  • Try new things
  • Try innovative approaches
  • Error handling
  • Failure and recovery mechanism
  • Performance, scalability, memory etc

Apart from this, it is just a few assignments, instructions, branches and loops.

 

So do I want to spend more time working with the computer?Yes, I dont see anysigns of me giving up as yet. The fun has just begun.

 

0 comments: