BASIC
I fell in love with computers at first sight! The first programming language I learnt was BASIC, and even today I strongly feel that BASIC is the right choice for the first programming language to be learnt by novice programmers. Unfortunately, C has become the first programming language that people learn. The reasons why I call this unfortunate is because firstly C is definitely not a language for beginners and secondly I believe C is a “strange” language and have always demonstrated that to my students whenever I taught C. It’s only when you already know BASIC or Pascal before learning C that you realise that C is “different”. If C is the first language learnt, you tend to assume that all programming languages are “supposed” to be like this and don’t tend to see anything strange in the language. Unfortunately, many of the other popular programming languages build on C. But then, luckily, they are not as strange as C itself! It is even more unfortunate that many start learning programming today using languages like Java! I don’t understand what understanding of OOP and structured programming concepts would they have!
BASIC to C
I had a very good relationship with BASIC. I also understood her limitations well and used to resort to assembly whenever BASIC could not help! I very reluctantly switched from BASIC to C, having also seen FORTRAN, COBOL and Pascal before jumping to C. There were reasons why I was reluctant. I was already a champ at BASIC and C was new waters for me. C did not even have the “common sense” to understand that uppercase A and lowercase A are both A, which BASIC had no trouble in understanding. Having been used to writing programs in capitals (even if you typed in lowercase, GWBASIC would convert it to uppercase), I found that C programs looked very different. Printing simple things like integers and strings required considerably more effort than in BASIC.
On the other hand, I did find that C functions were highly reusable – even across modules. I found that C was very powerful and almost nothing was impossible. I would not have to resort to assembly like the way I had to in BASIC. And assembly, when used, would integrate really well with C (in BASIC it was just loading binary instructions to memory and passing control and nothing more).
So I ditched BASIC! Hello, C!
C to C++
Having found C better than BASIC, I was curious to find out what C++ was all about. Whenever I came across someone who claimed to have learned C++, I would ask how that language is different from C, and did not get any satisfactory reason to learn C++ (as their understanding of the language was poor, as I now retrospect). But when I was taught C++ in college, I could see how OOP is a far superior model. I became a fan of OOP and thereafter would hesitate to work on anything that was not object-oriented!
But switching from C to C++ also had a different impact on how I’d program – I was gradually shifting away from the craze of optimizing code and concentrating more on abstraction and hiding implementation details. The next decade or so saw me developing lots of APIs and libraries that concentrated on these. I started preferring maintainability (readability, testability, compartmentalization, reusability, extensibility, portability) over efficiency. But the efficiency bug was not dead yet – I still had it in the back of my mind that there were unecessary overheads.
C++ to Java
I had a look at Java shortly after learning C++ and dismissed it because it took away all freedom from the developer. C++ would give me ample freedom to choose and decide what I wanted – static memory or dynamic, early binding or late, simple inheritance, multiple inheritance or no inheritance, pass by value or pass by reference, deal with pointers or references. Java took away all these freedom and even the freedom to name my files and directories the way I wanted! The fact that Java was interpreted only made it worse for me – I liked the fact that C++ was fast despite being object oriented.
With time I started realizing that it is far more difficult to go wrong when you code in Java. I was blessed with the ability of finding out problems in C++ code that led the program to crash, but many of my fellow programmers weren’t. When we would collaborate, I found that a language like Java would allow them to express their logic better while safeguarding against a lot of logical issues in the code. That made me switch to Java.
Dos to Linux
I was an expert in DOS – I knew how the OS worked inside. I had tinkered with various aspects of it and even modified it to suit my requirement. I resisted all urges to program in Windows. While I used to play and explore in Windows, I used to program only for DOS, even using DOS extenders (some of which I wrote on my own) to outdo the limits and grant me access to expanded and extended memory!
I had to switch to Linux when I started my company due to licensing issues. A good decision, looking back! DOS is dead; long live Linux!
Perl to PHP
I was fascinated by what I could do with Perl – quickly type some magic and get jobs done in record time while the rest of the world spends their lifetime in trying to understand what I just did! In fact, Perl was my first CGI scripting language. But when I saw PHP’s offerings – object oriented programming support built into the language, code inline in HTML, etc., PHP became the standard choice of CGI scripting for me. The fact that the syntax of PHP was pretty similar to Perl made the transition smooth and swift!
Perl5 introduced OOP support in the language. While I admire how they were able to add OOP to a language that was not born with it, without disturbing much of the language, I still am not happy with the fact that the support is artificial. Perl was simply not born that way and it’s too late to change!
Perl to Python
While I swtiched from Perl to PHP for web development, I switched from Perl to Python for mundane short pieces of code to get things done quickly or glue different pieces together. What I liked about Python is that it was born object oriented (unlike Perl), everything you deal with are objects, syntax was highly readable (very unlike Perl), support for data structures and functions was awesome (far better than in Perl) and code would definitely be more maintainable than in Perl. There was no reason to continue sticking to Perl – no, not even CPAN’s thousands of libraries as various libraries were emerging in Python!
The only thing I absolutely loathed in Python was the indentation syntax – absolutely foolish and stupid! I know many would disagree here, and don’t get me wrong: as a trainer I insist that my students indent their code properly. In fact, I’ve flatly refused to inspect code that was not well formatted because I considered that an important aspect of programming my students should implement. But forcing these on programmers this way by Python was something undigestable for me. On top of that I’ve heard and read people suggesting using 4 spaces instead of tab for indenting – I feel like suggesting all these “professionals” to stop coding and start data entry instead!
Python to Julia
You could say I was just waiting for a language that is similar to Python but much better in syntax. Julia came to the rescue! A far better, compact syntax that has no ugly indentation rules like in Python. Directly compatible with C, and even compatible with Python. Is this the language I was waiting for? I’m not sure as I’m still tinkering with things in Julia and getting under the hood. Fingers crossed!
Looking back, my journey of over 25 years from BASIC to Julia has witnessed quite a lot of breakups. I have switched more than a dozen languages in this period. Am I happily settled with any one single language now? Far from it! Got to see whether my crush on Julia will convert into a relationship or not! And even if it does, how long will it last!
Philisophically speaking, it was good that these breakups took place and I switched to a different language each time. Looking back, all the switches have been beneficial for me and have helped me reach higher levels. Most of the switching was done reluctantly, but turned out fruitful nevertheless. Had I stuck to BASIC and DOS, I would be nowhere today!
To sum it up, I think no one can do better than Dr. Spencer Johnson did in his book “Who Moved My Cheese”:
Get Ready For The Cheese to Move
Smell The Cheese Often So You Know When It Is Getting Old
The Quicker You Let Go Of Old Cheese, The Sooner You Can Enjoy New Cheese
Move With The Cheese
Savor The Adventure And Enjoy The Taste Of New Cheese!
They Keep Moving The Cheese.
Or in simple English:
Respond to change
Be ready to change again
Or for my fellow programmers, I think this is the best way of communicating the message:
if (changeDetected() || changeAnticipated())
respond();
}
Related Articles
No user responded in this post