Monday, October 17, 2005


I came across this article which says C programming is obsolete and procedural programming is dead. Since , I have been working on C after PROTEL , I vehemently disagree with most of the article.

C has to be taught at college level.Procedural line of thinking has to be taught at college level.Although pseudocode which is procedural is great from a "compile, execute & practice" procedural code point of view , C has to be taught. Because , I guess the other procedural languages are really older.

The points for NOT to learn C in college according to the author are :-

# It's not a skill you'll use in most of the software development jobs you'd want to have

The author uses SOFTWARE DEVELOPMENT JOBS in a very loose manner. C code is STILL used in many applications , although there are elaborate frameworks of C (yeah , there are C frameworks!) I think only embedded systems and software which are actually meant to be lean and fast prefer to "implement classes" rather than use the big fat C++.

Thats why you SHOULD learn C from an industry requirement pov.C is definitely applicable even in industry level. You have energymeters, mobile telephone code , elevator software , software for hitech cars written on C, the compilers (either ported on small operating systems) or just compilers spewing out bits and bytes.

# It can give you a false sense of control

There is no such thing as "Sense of Control".Any language can be misused.In Java and C++ you ALWAYS tend to convert every damn problem into an Object Oriented Problem and have actors and sequence diagrams.So in this case, more effort is SPENT on trying to imagine every godammn problem as OOP and create classes and objects which are created just to satisfy your object oriented thinking lust. C++/Java says "You follow OOP, you will be safe, you will have control". Now tell me who is controlling whom? (Especially if you cannot think a problem beyond objects and classes).Isnt Operator Overloading also miused just like C pointers? What is the big deal? Java, currently I dont see any "misuse" as such but I am sure there will be something or the other.

# It can teach you to get in the way

This is all covered in my previous argument.C is allows you to be "intrusive" if I may use that word.That was the purpose it was written! And C++ which was written on top of C, tries to close it.Weird.

The most sensible thing to do is FOLLOW CERTAIN RULES and CODING LINES in C and you wont make a mistake!

# It can make it hard for you to love famework based development

I am currently working on a framework based development.But I have to admit , it is not as elegant as an OOP framework but it is a good one! :-) and ofcourse I cant disclose it.

Any framework based development goes on like this :-

1. Look at framework API.
2. Imagine the problem in terms of the API.
3. Identify the API,
4. Grep the source code to see the usage.
5. Copy paste the source file

Step 5 may bring smiles on some faces and some people may think copy and pasting is stupid but to write maintainable , uniform code requires a coder to actually use the cut & paste options.These tools are like hammer and chisels for SEs.

# It can teach you philosophies which will prevent you from really understanding modern programming

Fuck the philosophy. Philosophy may come and philosophy may go, but a common man uses procedural line of thought to solve a problem.

# It can teach you divert your problems from the real challenges of software engineering

Most software Engineering challenges are not generic.Ofcourse some are very obscurely technical, , some are generic and some challenges are based on "what i have right now in my hands".

The bottomline is Software Engineers gain some experience. They want to share their learnings to everybody. They write articles which are right in their own way but very different if to others.
Example, people say follow code convention.

Coding convention in Linux kernel (written in lovely C) names a variable like this :-
int i_am_an_integer;

Microsoft uses the hungarian notation :-
int iCountForMaxEmployees;

Both are right in their own way!So all you C-programmers out there ( ;-( ) we are not obsolete.
Read this book and enjoy !

To summarise , choose your language based on what you are writing and LEARNING C is NOT DETRIMENTAL. Learning LISP is not detrimental. But changing the language you code is something you gotta watch out for!


Tejaswi said...

I like it when you are angry.

sudeep said...

I wasnt angry

I was just trying to justify some incorrect points..!