Author Topic: Why is C so popular?  (Read 211 times)

I D Shukhov

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 3362
    • View Profile
Why is C so popular?
« on: October 21, 2011, 07:38:56 am »
According to TIOBE Programming Community Index for October 2011:   "Java lost almost 1% of its popularity in September. If this trend continues, C will be number one again next month"

Further, they say: 

Quote
The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. The popular search engines Google, Bing, Yahoo!, Wikipedia, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

I could see how C would have the most lines of code written, but that is not how it is rated, it's supposed to be the most popular.

Is it being used for new development anywhere, or is it strictly for for maintenance?  It's hard for me to believe that there are so many embedded  projects that C would rise to #1 in the index.  There's a lot of legacy C code written for defense and aerospace C3 work, but C is never used for new work -- at least not where I've worked for the past 16 years.   


Edit:  Reading the TIOBE paragraph again, I see:   The ratings are based on the number of skilled engineers world-wide.  Maybe everyone is putting C on their resumes.   


Anything that won't sell, I don't want to invent.  Its sale is proof of utility, and utility is success. – Edison

PhilFromNY

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 752
    • View Profile
Re: Why is C so popular?
« Reply #1 on: October 21, 2011, 11:20:30 am »
The Linux kernel is written in C as are many Python extensions and quite a few web servers. At Sourceforge (is it still relevant?) there are roughly 1,400 C projects as compared to 2200 in Java and 1700 in C++.

http://sourceforge.net/search/?q=language&fq%5B%5D=trove%3A164

I wonder if the increased popularity of C is a reaction to the increasing complexity of C++?

The Gorn

  • Your agonizer, please. And be sure to keep the batteries charged!
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 14182
  • Gornix user
    • View Profile
Re: Why is C so popular?
« Reply #2 on: October 22, 2011, 02:52:53 pm »
I believe it's out there. And many applications have a core of C legacy code that is surrounded by C++, Dot Net, and other languages (even Java, Python and other web dev languages.)

For a long period of time through the entire 1980s and into the early 90s, C was a light, efficient, simple solution for application development that many companies embraced.

Developers can be incredibly highly specialized and developer A can be effectively oblivious about what developer B does for a living. So what is described as "popular" can be surprising to some.

IE, the main frame application developer who is profoundly clueless about Windows. The Windows person who doesn't comprehend batch. We're each in our little hyper specialized silo.

A few years ago I belonged to Jerry Weinberg's SHAPE forum and I once described to the group in a thread what I did for a living - Windows application development. Most of those people had absolutely no idea that anyone actually developed software applications. I suppose to them someone who wrote applications should be out of sight in India. It was a heavily meta group of consultants whose members were almost completely disconnected from the reality on the ground of real software development in a commercial setting.
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.


Walter Mitty

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 1025
    • View Profile
Re: Why is C so popular?
« Reply #3 on: October 22, 2011, 03:56:24 pm »
A few years ago I belonged to Jerry Weinberg's SHAPE forum and I once described to the group in a thread what I did for a living - Windows application development. Most of those people had absolutely no idea that anyone actually developed software applications. I suppose to them someone who wrote applications should be out of sight in India. It was a heavily meta group of consultants whose members were almost completely disconnected from the reality on the ground of real software development in a commercial setting.

Pardon me for being nosy.  But what's the time frame on this?  If it's the 80s that's too soon for "India" to be relevant.  If it's the 2000s then it's definitely in the frame.  If it's the 90's it's borderline.

I must know a lot of people who don't know where applications come from.  I just never thought about it.  Maybe the guy who cuts my firewood. But consultants?  That sure sounds strange to me.

The Gorn

  • Your agonizer, please. And be sure to keep the batteries charged!
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 14182
  • Gornix user
    • View Profile
Re: Why is C so popular?
« Reply #4 on: October 22, 2011, 05:42:28 pm »
2005-2006 or so. And a group of people attached to Jerry Weinberg, the "Secrets of Consulting" guy. They were too ethereal to get real labor, I guess.

No, nothing like the guy who cuts firewood. We're talking consultants but either on SW methodologies or on human factors.

Origisaurus here always extolled how brilliant the group was. I suppose I was too much of a gutter dwelling literalist morlock for them.

Anyway, this just reinforces my point that the unawareness of nominal programmer/computer worker group A of the activities in group B can be profound to the point of being in a foreign language.
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.


Walter Mitty

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 1025
    • View Profile
Re: Why is C so popular?
« Reply #5 on: October 22, 2011, 06:13:16 pm »
2005-2006 or so. And a group of people attached to Jerry Weinberg, the "Secrets of Consulting" guy.

Ahh, one of my favorite authors in this field, as you may recall.

"There's always a problem no matter what they say."

"And it's always a people problem no matter what it looks like at first."


Origisaurus

  • Wise Sage
  • Wise Sage
  • *****
  • Posts: 1678
    • View Profile
Re: Why is C so popular?
« Reply #6 on: October 23, 2011, 06:45:33 am »
2005-2006 or so. And a group of people attached to Jerry Weinberg, the "Secrets of Consulting" guy.

Ahh, one of my favorite authors in this field, as you may recall.

"There's always a problem no matter what they say."

"And it's always a people problem no matter what it looks like at first."

And, "If they don't pay you, don't solve their problem."  I take this to mean "don't deliver the solution", since we often perceive the solution during discovery, but before actually getting the gig.

Call-girl principle: Determine the nature of the services desired before setting a price.
Avatar is from the cover of the November 2007 National Geographic.  Fair use is assumed.

Walter Mitty

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 1025
    • View Profile
Re: Why is C so popular?
« Reply #7 on: October 23, 2011, 02:10:08 pm »
I still can't wrap my head around consultants who don't know where application programs come from.


The Gorn

  • Your agonizer, please. And be sure to keep the batteries charged!
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 14182
  • Gornix user
    • View Profile
Re: Why is C so popular?
« Reply #8 on: October 23, 2011, 05:01:04 pm »
I still can't wrap my head around consultants who don't know where application programs come from.

Perhaps I described my work to those group members very opaquely or exceptionally poorly. I'd like to think not.

Or perhaps they were all looking in my previous explanation for a 10+ person team with a methodology like Scrum or Agile and the idea of one contracted developer creating an application was outside their bandwidth of experience.

I remember saying in a posting, "The client gives me his business or technical needs, we negotiate a feature set, and then I design and write a Windows application. Usually using C++ plus third party libraries."

The list participant was like this was an epiphany, that nothing I had said up to that point was making any sense.

I believe that some individuals in our midst as computer people can be so "smart" and looking so much for a subtext or an overall meaning or so caught up in high level discussions that they can't exercise common sense or deal with a concrete instance or just deal with the words in front of them. It's not a very common communication problem but it happens.

It was enjoyable reading Jerry's take on what I would post - he had no apparent qualms about understanding where someone else was coming from. But, he's Jerry, he's world class, and he has few pretenses. The rest of the list seemed prideful about being self consciously smart, so discussions didn't seem to flow that well. So a lot of this was the group, I think.
« Last Edit: October 23, 2011, 05:13:05 pm by The Gorn »
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.


Walter Mitty

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 1025
    • View Profile
Re: Why is C so popular?
« Reply #9 on: October 23, 2011, 05:46:14 pm »
Yeah,  I have very little use for people who try to be smart.


Origisaurus

  • Wise Sage
  • Wise Sage
  • *****
  • Posts: 1678
    • View Profile
Re: Why is C so popular?
« Reply #10 on: October 23, 2011, 08:31:36 pm »
It was enjoyable reading Jerry's take on what I would post - he had no apparent qualms about understanding where someone else was coming from. But, he's Jerry, he's world class, and he has few pretenses. The rest of the list seemed prideful about being self consciously smart, so discussions didn't seem to flow that well. So a lot of this was the group, I think.

As you recall, Gorn, I, too, was an active participant in SHAPE.  A motley crew, none quite like either of us, or any of the others.  Mostly really smart without pretending, and a few poseurs who didn't last long when no-one made the burnt offerings.  A few naive newbies - one guy asked about key performance indicators (KPI) like they were the holy grail of software development - a bulldozer couldn't have demolished the concept more effectively than we all did, with Jerry  benignly looking on.  And he had to read every post, I know that by the way he moderated.

Gorn, if you reacted negatively to other members' posts, please remember that it was you who was reacting.

BTW, here's Jerry's website.  You can read his occasional blogs or order some of his books.  I highly recommend his sci-fi novels.
Avatar is from the cover of the November 2007 National Geographic.  Fair use is assumed.

The Gorn

  • Your agonizer, please. And be sure to keep the batteries charged!
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 14182
  • Gornix user
    • View Profile
Re: Why is C so popular?
« Reply #11 on: October 24, 2011, 12:58:58 am »
The original purpose of my referencing SHAPE was to anecdotally recount how professionals in the same industry can have absolutely no idea of how "the other half lives", which relates to a question like "why is C so popular".

My opinion, based on my experience there, is that SHAPE members overall would have no idea why C (say) was useful, vital, or necessary.

As to the thread question - hell, even I don't have a good idea why C is so popular. New code? Old code? DoD code? Embedded code? Old application code? OS or driver code?

No real idea. And I'm the most bare metal person on this board.
« Last Edit: October 24, 2011, 02:22:44 am by The Gorn »
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.


Walter Mitty

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 1025
    • View Profile
Re: Why is C so popular?
« Reply #12 on: October 24, 2011, 06:33:13 am »
I'm going to answer a different question.  What made C a good language in the 1970s?  This is a view from a distance.

Here are some features of C that made it useful:  third generation; structured; minimal; system oriented; library friendly.

Third generation seems so obvious that hardly anybody is going to notice.  After all the first major 3GL, FORTRAN, was already old when C was conceived.  But it was an important feature at the time.

Structured programming languages were beginning to replace previous languages,  Algol was almost a decade old, and programming with a bunch of GOTOs was passe.  It's easier to get the logic right in structured languages. 

Minimalism was the genius of K&R.  Minimalism in C allowed the language to be developed and maintained with less than one full time engineer.  The engineering talent was needed for unix, which also practiced minimalism.  (When minimalism is done wrong, you get dysfunction, but that's another story.)

C had to be suitable for system programming, in order to fit in with the role it was to play in unix.  It's a mystery to me why a good language for system programming turns out to be a popular language for application programming.  That might be worth further exploration.

But library friendly had to be the big feature.  Library unfriendly languages, like Algol or Pascal, just can't be extended without revising the language and the compiler.  But a language like C can be extended by just writing more function libraries.

COBOL was actually library friendly, but the COBOL culture ended up using libraries almost entirely for cataloguing data definitions.  more later.


Origisaurus

  • Wise Sage
  • Wise Sage
  • *****
  • Posts: 1678
    • View Profile
Re: Why is C so popular?
« Reply #13 on: October 24, 2011, 08:00:12 am »
My opinion, based on my experience there, is that SHAPE members overall would have no idea why C (say) was useful, vital, or necessary.

That is a correct observation.  People got into SHAPE because they were concerned about software quality, which leads to thinking about methodology which leads to thinking about management which leads to thinking about leadership, all of which fit the mostly touchy-feely Weinberg paradigm.  Not the sort of thing that codeheads find sexy.

Example: I just ran across a blog by a SHAPE alumnus, waxing ecstatic about discovering some codehead thing that you and I would think trivial, obvious and should have known from the get-go.



I think that C became popular by being early, just as FORTRAN and COBOL were.  Those three are still around because of the sunk cost in running code.

As Confederate General Jubal T. Early said, "Git thar fustest with the mostest".
Avatar is from the cover of the November 2007 National Geographic.  Fair use is assumed.

Walter Mitty

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 1025
    • View Profile
Re: Why is C so popular?
« Reply #14 on: October 24, 2011, 08:53:32 am »
I badly misworded a previous reply.

I have a lot of use for people who try to be smart.  I'm still trying to be smart myself, although I succeed less often.

I have very little use for people who try to appear to be smart, without aiming for real intelligence at all.



Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf