Friday, January 28, 2005

My humble beginnings as a programmer

I am a programmer at heart. Been doing it for 21 years now. Programming has really become exciting with the emergence of object oriented languages such as C++, C# and Java.

Let me try and remember the encounters I had with computers and programming languages... A long time ago in a galaxy not far away, a small boy of about 8 years or so got introduced to gaming consoles such as the ATARI with its ping pong paddles. There was also a PHILLIPS console on which we played things such as breakout. You connected it to the TV to the irritation of everyone else in the house.
It was also about the same time when I had the first glimpse of the APPLE II computer. I remember how I liked the way it had a built in screen. Any cursor movement on those ancient CRT screens caused a trail where the characters used to be a few seconds before. It was on the APPLE II where I played my very first game of space invaders. We did not own a computer then, but it was at a family friend's house where I got the opportunity to venture into this strange unknown world of computers. I was intrigued by the possibility of being able to tell a machine (in its own language) what I wanted it to do for me. As a captain would order his subjects to turn the sails on a vast ocean of possibilities...
A little bit later my cousin got a Commodore VIC20. You could at that stage slot in different game cartridges at the back and I remember we played a cat and mouse game for hours, enchanted by the ability to control something in another world. A little bit later, when I was in 5th grade my father bought me a Commodore C64, which probably changed my life and altered the course of my life forever. I studied its handbook intently and started to write my first computer programs. I remember coming home from school and wondering how I could write a program to do stuff for me. Programming ont the Commodore 64 was done in BASIC and any program had to be less than about 48 or 40 kilobytes in size (can't remember). Back then I used the GOTO statement a lot and any program I wrote quickly became spagetty code when it passed a certain line number limit. I remember my very first program: it asked you a number of questions concerning some animal or insect and then tried to classify it according to the answers given...does the animal have an endoskeleton or exoskeleton? How many legs does it have? Does it have wings? And eventually it would classify the animal as Crustacea/Mammal/Arachnida etc. That was my first program in 5'th grade...a feat I no doubt know would be easy for any 2'nd grader now a days.

The notion that I could teach a computer to think for me, facinated me. I learned about sprites (movable 4 colour GIFs) which I entered as bytes from sheets and sheets of paper where I plotted the bits/pixels on. Later when I figured out how to used speech synthesis, I wrote a program I called COMPUBANK, to which I could give any one of hundreds (and later thousands) of text phrases or commands and the computer would give me a verbal answer....my first attempt at artificial intelligence. I had a school friend which shared my interest and together we ventured into the area of ASSEMBLY LANGUAGE programming. We learned about INTERRUPTS and wrote ourselves assembly language routines to to smooth scrolling by shifting one of 2 screens down 7 pixels by POKING values into a certain memory location. The data on the second screen would then be copied a full line (consisting of 8 pixels high characters) and we would obtain smooth scrolling by quickly swapping the 2 screens. In so doing we could get smooth downward scrolling using this screen buffering technique. I wrote some games for the fun and challenge of it all...Text Adventure games,Poleconomy, Battle Tanks, my own space invaders. We explored the SID (Sound Interface Device) chip on the C64, we also programmed in Simon's Basic, which was mapped into the address space of the computer by inserting a cartridge at the back. I remember learning about graphics from "Computer Graphics on the C64" and drew spirals on the screen which took an entire night to complete.

As time went on, my Commodore 64 gave up the smoke (ghost) and my father bought us an IBM Compatible XT computer on which we installed MS DOS. It had a 20 Meg hard disk and a 360 K floppy disk and it could only display 4 colours (cyan,magenta, black and white) in 320 x 200 resolution and 2 colours in "high resolution" (640x400). To me it was slower than my Commodore 64, and I missed it a bit. But, I got used to working on this new machine and eventually programmed in GWBASIC. I wrote a PC version of Poleconomy. You only had 640K RAM to play with even though your computer had 4096K RAM on it, a limitation forced on it by DOS. Later when I got Windows 3.1, the computer got even slower!! But at least I could access more that 640K of RAM using Win32S. I started learning Borland Turbo Pascal in 9'th grade and was venturing into the area of object oriented programming.

I suppose you could classify my as a NERD back then, but it did not really bother me. I got something I was really good at and it gave me a deep sense of accomplishment...I became to believe that nothing is impossible...I believed I could write a program to do anything for me. It gave me courage. I have always LOVED mathematics, a novel solution looked beautiful to me. I think ALGEBRA in particular is the language of computers. And that it probably why I loved programming so much.

After school I studied electronic engineering, since it provided me with the best opportunity to satisfy my curiosity into new things. I started to learn the C programming language. The syntax was a bit cryptic at first, but after a while it became second nature. We used Borland Turbo C. We had to write programs for Physics, Dynamics, Electromagnetism, Digital Signal processing, Mobile communication, Telecommunications, you name it. I also used Watcom C++ and Borland Turbo C++. I still enjoyed programming.

After my studies I started on Windows 95 and NT 4. We programmed in Visual Basic 5 then 6. Later also Visual C++. One day I decided it was time for a challenge and taught myself Java. I love the language....it has the syntax of C++, but were much more logical, much easier to work with....and then came C#. What a nice language. As in Java it had a lot of pre-written Collection classes such as Arrays, Hashtables, Lists (not that C++ did not have, but the standard template library does not have the same ease of use as Java and C#). Well that's where I am today....an avid .Net Programmer.

No comments: