Thursday, July 13, 2006

Advanced programming?

You may wonder why my blog posts are drifting towards the technical side... You see, I cannot help it! All these days, I was caught up in social and philosophical ideologies so much that I was beginning to forget my techie roots. Actually, this blog was not supposed to be a medium for my tech musings, but I do hope my "technical revival" won't hurt, at least for the moment...

Most programmers (I safely assume) start their programming course with an introduction to the C programming language. C, as a language, is short and concise, and is known for its bag-load of tips-n-tricks, quirks and pitfalls, as any programmer should tell you. In fact, many people (notably educationists) argue that a first-hand course in programming should be in a scripting language (such as Python) and not in C. However, that is another story altogether :^)

I remember back in college, for our annual technical symposium (called "Bits 'n Bytes"), we used to have a programming contest called "Confusy", which was about writing the most horribly confusing program you could... No wonder people used to prefer C!

A common misconception in my computing (a.k.a. engineering) fraternity is what people call advanced programming. Most people think that advanced programming is when you make generous use of cryptic features provided by the programming language at hand.

Programmers generally have a tendency to prove their mettle and superiority over other fellow programmers. Their philosophy is quite simple: for you to be doing advanced programming, you should make your programs intimidating, overly confusing and incomprehensible to everyone else. If people cannot understand your programs, they think of you as a programming guru.

Actually, I don't think so...

To me, advanced programming is a different thing altogether. In fact, advanced programming is more about programming design than programming implementation. It is about expressing your ideas and abstractions in the most clear and concise manner; it is about clean design; when your design is flawless, it shows in the code...

People who are in two minds can read The Art of Unix programming by Eric Raymond for a decent explanation of how this concept cam to be one of the central themes of the Unix philosophy (see the sidebar of my blog for the link).

As Leonardo da Vinci has well said: "Simplicity is the ultimate sophistication". Advanced programming should be all about simplicity. It should strive to unravel mysteries from the code, rather than weaving mysteries into it. In fact, good programming, in many cases, decomposes complex programming constructs into a sequence of simpler constructs.

Please understand that I am not against learning the so-called "advanced" features of any language. Notions of what constitutes "advanced" features vary from person to person, and indeed, from language to language. With reference to C, it may be C's rich operator set or the low-level programming features provided by C (not to mention pointers). These are not advanced features per se; they merely provide you the flexibility to express your abstractions in a more powerful way...

1 Comments:

At 6:44 PM, Blogger Ameet Chitnis said...

I agree with you! I feel that the way a person writes a program reflects his thinking, period.

Ameet

 

Post a Comment

<< Home

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 2.5 License.