Forgot your password?
typodupeerror
Java Programming

C Programming Language Back At Number 1 535

Posted by kdawson
from the doin'-what-we-always-did dept.
derrida writes "After more than 4 years C is back at position number 1 in the TIOBE index. The scores for C have been pretty constant through the years, varying between the 15% and 20% market share for almost 10 years. So the main reason for C's number 1 position is not C's uprise, but the decline of its competitor Java. Java has a long-term downward trend. It is losing ground to other languages running on the JVM. An example of such a language is JavaFX, which is now approaching the top 20."
This discussion has been archived. No new comments can be posted.

C Programming Language Back At Number 1

Comments Filter:
  • by Thorrablot (590170) on Tuesday April 06, 2010 @10:20PM (#31757430)
    but shouldn't it really be at number 0?
  • by shutdown -p now (807394) on Tuesday April 06, 2010 @10:23PM (#31757448) Journal

    Go ahead, read it for yourself [tiobe.com], and tell me how this is supposed to give any meaningful results. They aggregate together things of all kind, to the point where an aggregate doesn't make any sense at all (I mean, hits such as "programming in PHP sucks" or "you must be an idiot to write production code in VB" would count as +1 for PHP and VB, correspondingly!). You can have one language having many job postings, another having many books, and yet another having many basic "how to?" questions and dumbed-down tutorials, and they'd all get the same rating.

    In any case, most certainly, at these numbers (Java 18.051%, C 18.058%), speaking of one overtaking another is completely pointless, given the margin of error.

    Anyway, if you want to know how popular a particular language/technology is, the simplest - and much more accurate! - way of doing so is to check any popular job search web site. Just keep in mind that preferences vary in different regions, so if you are making career choices, stick to local/national postings, and if you want to see an overall worldwide trend, you have to aggregate data from enough sources.

  • by gzipped_tar (1151931) on Tuesday April 06, 2010 @10:27PM (#31757468) Journal

    > I mean, hits such as "programming in PHP sucks" or
    > "you must be an idiot to write production code in VB"
    > would count as +1 for PHP and VB, correspondingly!

    This is the true spirit of our times. Any publicity is good publicity.

  • by Anonymous Coward on Tuesday April 06, 2010 @10:27PM (#31757472)

    There is no way these numbers are anywhere near an approximation of reality.

    How many people have real jobs where they get paid to program in Go full-time? Ten guys in the whole world maybe? But it's ranked 15. But when you look at Groovy (the JVM dynamic language) it's ranked at #44, and I personally know at least 20 developers who've used it at a variety of companies (and get paid to do so).

    I don't trust these stats at all.

  • 0.007% (Score:5, Insightful)

    by westlake (615356) on Tuesday April 06, 2010 @10:34PM (#31757532)

    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, MSN, Yahoo!, Wikipedia and YouTube are used to calculate the ratings

    I feel so much confidence in these numbers.
     

  • by wandazulu (265281) on Tuesday April 06, 2010 @10:36PM (#31757558)

    Seems about as relevant as ranking programming languages to their popularity. Does the fact that C is #1 mean I should start writing my websites with it (I've done it, actually...and it was extremely fast and extremely painful)?

    I don't see how this metric has any use at all, especially given their criteria for determining popularity.

  • by tomhudson (43916) <barbara.hudson@b ... h u d s o n .com> on Tuesday April 06, 2010 @10:46PM (#31757612) Journal
    So code it in c and then have someone else port it to java if you need a portable version ... problem (kind of) solved ...

    FTFA:

    Finally, we have also excluded assembly languages, although Turing complete, because they have a very different nature.

    Philistines! Heathens! There is nothing more beautiful than a good piece of assembly code.

  • Re:Why C? (Score:4, Insightful)

    by X0563511 (793323) on Tuesday April 06, 2010 @10:52PM (#31757644) Homepage Journal

    Haha, you're young (and a douchebag).

    Yes, I will take the karma for that.

  • by Vellmont (569020) on Tuesday April 06, 2010 @10:52PM (#31757648) Homepage

    What, you don't think Google Go, a language even Google doesn't use in production is just a hair less popular than PL/SQL, the programming language used in an Oracle DB for the last 18 years?

    Shocking!

  • No... (Score:3, Insightful)

    by Killer Eye (3711) on Tuesday April 06, 2010 @11:06PM (#31757726)

    Job listings don't mean very much.

    Employees that are very happy with a language, and productive in it, might keep their jobs for years; you may never even know that their companies were using that language. One productive employee might do the job of 10 people in some other language, and maybe that's why they aren't hiring.

    Some job postings only made me cringe when I saw them, and many make me think to myself: "all-Microsoft shop, never heard of what X, Y or Z can do". Just because there's a job available, doesn't mean the language is popular; it might even mean the opposite, i.e. all the sane people jumped ship months ago, instead of trying to maintain a steaming pile of code, that a company is now desperately trying to hire people to support.

    Don't ever learn one of the stupid programming languages just to get a job. Do something you enjoy...make money without programming if you have to, for awhile, until you find a job that requires languages and platforms that you actually like and can be productive in. Nothing else is worthwhile.

  • Re:X is the new Y (Score:2, Insightful)

    by mirix (1649853) on Tuesday April 06, 2010 @11:08PM (#31757736)

    Nah, nothing can touch C for use on bare metal, and drivers and other lowish level stuff... especially embedded systems.

  • by Anonymous Coward on Tuesday April 06, 2010 @11:26PM (#31757872)
    Aye. I wish more technical books drew inspiration from The C Programming Language.
  • Re:Why C? (Score:4, Insightful)

    by binarylarry (1338699) on Tuesday April 06, 2010 @11:32PM (#31757896)

    Yep, as I pointed out, it's an application language not a systems language.

    reading comprehension++

  • by pushing-robot (1037830) on Tuesday April 06, 2010 @11:35PM (#31757914)

    Then again, the first link on the Google search results takes you to Yahoo! Finance. Apparently the bean counters are both evil and anarchists.

  • Re:Why C? (Score:5, Insightful)

    by slimjim8094 (941042) <slashdot3NO@SPAMjustconnected.net> on Tuesday April 06, 2010 @11:35PM (#31757916)

    Your point is?

    What I think you're being snide about (how Java still depends on C) is misguided. That's the point - nobody's saying your system programming languages are dead. At the end of the day, something needs to be a straight sequence of 0s and 1s that the processor can just run, and that's where C dominates. There's a lot of things (like scheduling algorithms) that really can't be written in a higher level language, either.

    But at this point, the only reasons you'd need to use C would be for low-level systems programming, as a base for another language (interpreter/JIT VM), or anywhere where you *really* need to manage your own memory or get close-to-assembly performance. (not) Coincidentally, this covers just about everything C is used for nowadays. Many small utilities are now written in Python, particularly small accessory GUI programs on Linux.

    Fact is, a higher level language like Java is just faster to program in, and for a basic application it's more than fast enough. But we'll never lose C, at least because all these higher-level fancy applications need to run on something, and nobody wants to write that "something" in straight assembly.

  • Re:C-whatever (Score:4, Insightful)

    by FlyingGuy (989135) <<moc.liamg> <ta> <yuggniylf>> on Wednesday April 07, 2010 @01:03AM (#31758290)

    It's because programmers love their dangerous and primitive dinosaur language (least common denominator). As a consequence, we still have to deal with buffer overflows and other stupid problems that should have been fixed decades ago.

    You could not be more wrong on both counts. As to the rest of your post, there is nothing elegant about Java and Python is just a bit of stupidity that someone wrote and passed it off as a scripting language.

    No Programmers love the simple elegance of C. C is a masterwork, it is subtle, it is sublime.

    Buffer overflows are caused by lazy and stupid programmers abusing a simple an elegant language that has all the power you need to prevent buffer overflows by simply taking the small step to bounds check your buffer as you proceed to willy-nilly stuff data into it.

    Java is a crutch for those that cannot find the time to write something correctly. There are major works written in C that will compile on ANY platform with a C compiler and the standard libraries. If you write your code to the ansi C standard it will compile anywhere. That is the design of a portable language and you end up will small, efficient and fast executables.

  • Re:C-whatever (Score:5, Insightful)

    by Lunix Nutcase (1092239) on Wednesday April 07, 2010 @01:32AM (#31758424)

    If you use Python, Java or whatever you are too far away from the metal to do the interesting stuff.

    That's because they are specifically designed to abstract away the computer hardware.

  • by khoonirobo (1316521) on Wednesday April 07, 2010 @01:56AM (#31758514)
    If shortness of documentation was the sole metric for language popularity, shouldn't we all be programming in Brainfuck - http://www.muppetlabs.com/~breadbox/bf/ [muppetlabs.com]
  • by Xest (935314) on Wednesday April 07, 2010 @02:12AM (#31758576)

    Yep, just did my daily job check, there's still around 20 new Java, 35 new .NET jobs and no C jobs whatsoever, it looks like C hasn't in fact made a massive leap overnight since I checked yesterday, and TIOBE is in fact still completely useless as you say.

  • by martin-boundary (547041) on Wednesday April 07, 2010 @03:28AM (#31758832)
    Real programmers use ed(1). Every line counts (or is counted) in ed(1).
  • Re:Why C? (Score:4, Insightful)

    by Xest (935314) on Wednesday April 07, 2010 @03:34AM (#31758844)

    "I get the point, but a lot of people get the idea to use Java if you want your apps to run anywhere, which is just idiotic, if you want it run really almost anywhere and are ready to make an extra effort, C is a far better choice than Java."

    No, it's really not. Java apps are portable because they're write once, run anywhere there's a JVM. C apps are only portable if you write for every single different platform providing a suitable C compiler exists for each of those platforms.

    The issue is that you're confusing a portable application, with an application that can be ported, and having to specifically port for each platform is expensive as it requires much more development time, and it creates more headaches in terms of debugging etc. as you face platform specific issues more often.

    The extra effort to go cross platform on C isn't trivial, if you've got to write an IO, networking, graphics, threading abstraction layer and so forth, as well as multiple implementations of for those abstractions layers to get your app to run on multiple platforms then it's likely going to be equivalent to re-writing your entire app a few times over. What's worse is you do not get the inherent security benefits of a language like Java either, meaning the end result is a lot more work, much harder debugging of platform specific issues, much higher chance of security flaws and for what? certainly no worthwhile performance gain.

    This is why C is best kept as a systems language- creating things like JVMs, drivers, kernels and so forth it's just fine for. But replacing Java for cross platform application development if Java is an option? that's insane.

    Part of being a good developer is using the right tool for the job, anyone recommending C when Java is an option for cross platform development cannot possibly be classed as a good developer, advocating C over Java where Java is an option is simply the sign of a developer who is not capable of picking the right tool for the job.

    I'm not even advocating Java as the be all and end all of languages, I don't use it at work, I use C# and .NET because we're a Microsoft based company and C# and .NET simply offer much better development tools, albeit at the expense of portability. It really is about using the right tool for the job to get the best balance of cost, features, and quality possible, and languages like Java have simply matured to offer a far superior solution to many of the more classic languages like C and C++, even if those languages do deserve a special place in our hearts in terms of the behemoths they once were- the languages which you could pretty much just do everything in.

    Of course, it's not a new situation either, assembly programmers said about C, what C programmers say about Java. Unfortunately, those who say these are those unable to keep up with the times rather than recognise and sensibly weigh up the benefits and disadvantages of each option.

  • by Anonymous Coward on Wednesday April 07, 2010 @05:02AM (#31759146)

    Don't feed the trolls.

  • Re:Go is number 15 (Score:3, Insightful)

    by K. S. Kyosuke (729550) on Wednesday April 07, 2010 @05:20AM (#31759216)
    When Java was two years old, it was utterly unusable and yet overhyped beyond reason, although it brought *nothing new at all*, even inside Sun Microsystems - it was basically a step back from Self-93. (Or rather a whole mile back?) Go actually bears the promise of bringing a "highly concurrent C-level language" into mainstream, at that's something that, unlike Java, makes sense to me. So, OK, it's probably overhyped, but much less than Java was when it was as "old" as Go is today.
  • Re:Why C? (Score:4, Insightful)

    by Viol8 (599362) on Wednesday April 07, 2010 @06:26AM (#31759476)

    "anyone recommending C when Java is an option for cross platform development cannot possibly be classed as a good developer,"

    Very few systems (especially in house ones) require true cross platform development so that's generally irrelevant anyway.

    "advocating C over Java where Java is an option is simply the sign of a developer who is not capable of picking the right tool for the job."

    Or maybe its a developer who doesn't have a knee jerk reaction that the tool that leads to the quickest prototype is the best. I've developed back-end trading apps in the past that required the fastest possible throughput of data (we're talking down to milliseconds being shaved off here) to beat the competition and for that Java simply was not an option. We went for a mixture of C and C++ using the standard sockets API and the system was blazingly fast.

    Not every "app" is some floppy piece of GUI code that sits there doing bugger all 99% of its life - some apps are back end systems that are maxed out all the working day and for that you can't beat C and C++.

     

  • by Jurily (900488) <jurily@@@gmail...com> on Wednesday April 07, 2010 @06:27AM (#31759482)

    Python has strings. Java has strings. C# has strings.

    C has functions that take a pointer and run until they find a \0.

  • Re:Why C? (Score:4, Insightful)

    by Xest (935314) on Wednesday April 07, 2010 @07:25AM (#31759782)

    "Very few systems (especially in house ones) require true cross platform development so that's generally irrelevant anyway."

    That's too blanket a statement to be valid in the general case, it's certainly true for some companies. As I stated however, our company is Microsoft based, however even here we want to expand some of our apps onto mobile devices and we have a combination of them such that Java is the only real sensible option. Of all the companies I've worked in I've yet to work in one that only ever has a single platform throughout the entire company, they've all had the odd Linux server between their Microsoft servers, a combination of mobile devices and so forth. It's certainly not an uncommon situation to want apps to be portable. There's also the issues of larger companies which have different operating subsidiaries who have to share some apps and data, but who also are given autonomy on IT decisions from subsidiary to subsidiary- Java absolutely excels here, it acts as a common language that just works between subsidiaries pretty much whatever their platform choices.

    If you're not developing in house applications and are developing to sell Java makes sense too, because there's no point writing say, a piece of helpdesk software in C# .NET, or C/C++ with multiple binaries to sell when you can just write once with Java and inherently have a product that works across Windows, Linux and Mac OS X greatly expanding your potential clientbase.

    "Or maybe its a developer who doesn't have a knee jerk reaction that the tool that leads to the quickest prototype is the best."

    Whose talking about prototypes? I'm referring to real working apps.

    "I've developed back-end trading apps in the past that required the fastest possible throughput of data (we're talking down to milliseconds being shaved off here) to beat the competition and for that Java simply was not an option."

    Really? Apparentlyy the NYSE doesn't agree with you:

    http://www.nyse.com/tradingsolutions/transacttools/1204674243385.html [nyse.com]

    "Not every "app" is some floppy piece of GUI code that sits there doing bugger all 99% of its life - some apps are back end systems that are maxed out all the working day and for that you can't beat C and C++."

    Simply put, you're wrong. Java performs just as well as C/C++ in many cases, better in some, slightly worse than others. This is largely because the JIT compiler is better suited to optimising per platform, rather than per architecture like classic compilers. Plenty of case studies here for Java use in HPC for example:

    http://www.sun.com/customers/index.xml?soln=31a8487e-0f60-11da-99bc-080020a9ed93&page=1&sort=date&asc=false [sun.com]

    The fact that you talk about Java being faster simply for prototyping, the fact you are not aware of the fact that Java performs just as well in many cases as C/C++, and the fact that you do not think Java is used for high load back end processing demonstrates one thing- you do not know enough about Java to be able to correctly evaluate whether it is the right tool for the job or not in the face of C/C++ and are a good example of the type of developer I was referring to as not being a great developer for this reason. It may well be that C/C++ was in fact the right tool for your particular solution after all (i.e. if you had some custom hardware to take advantage of), but as you clearly don't know much about Java, you cannot possibly say for sure whether that was the case or not, despite the fact you are attempting assert otherwise.

    The likes of eBay runs on Java and much of Google's back end work is done with Java also. There's a good reason it's the most prominent language in business still today and has been for a while. It's because it does offer advantages, it is versatile, and yes, it ca

  • Re:Why C? (Score:2, Insightful)

    by ThePhilips (752041) on Wednesday April 07, 2010 @07:33AM (#31759832) Homepage Journal

    That was partially my point. Java's security track record for applications is amazing.

    Because for every dozen C/C++ applications there are about 1 Java application out there. And since Java runs mostly somewhere in corporate data center, it also has much less exposure to all the security risks.

    On the security topic, I have recently seen an example where Java service was easily tricked into dropping whole DB. Java might have removed problems with strings handling, but is still vulnerable to plain logical errors.

    Another good example of "poor" Java security was when folks accidentally managed to "crash" a service: instead of doing anything useful it was in endless loop printing NullPointerException on a console.

    In the end, it all depends on a developer. "Secure" language is a myth. Developers simply do different mistakes in Java.

  • Re:Why C? (Score:3, Insightful)

    by Xest (935314) on Wednesday April 07, 2010 @08:08AM (#31760084)

    "Because for every dozen C/C++ applications there are about 1 Java application out there. And since Java runs mostly somewhere in corporate data center, it also has much less exposure to all the security risks."

    No, because Java offers inherent protection against buffer overflows, which have been the bane of C/C++ security for, well, forever.

    "On the security topic, I have recently seen an example where Java service was easily tricked into dropping whole DB. Java might have removed problems with strings handling, but is still vulnerable to plain logical errors."

    Yes, it's called an SQL injection attack. It's a problem that is fairly easy to solve, but most database frameworks don't solve by default. It's not a Java problem though, it's a problem that affects the wider software development industry, I don't think really any major database framework for any platform or any language does a good job of database security right now unfortunately.

    "Another good example of "poor" Java security was when folks accidentally managed to "crash" a service: instead of doing anything useful it was in endless loop printing NullPointerException on a console."

    That's called having crap developers, it's also a problem that effects any language, and you'd struggle to write a language that can't be broken by people who are incompetent.

    "In the end, it all depends on a developer. "Secure" language is a myth. Developers simply do different mistakes in Java."

    This is where I disagree, it doesn't all depend on the developer. Java and .NET aren't secure, you're right about that, but they're more secure, and there is less that the developer has to actively do to make sure their applications are secure because again, they don't need to worry about things like buffer overflows. You also have things like assembly security, and so forth too, so that even if an assembly does have a bug in it, the JVM can keep check on what it can actually do if it is compromised. The likes of C/C++ don't have these benefits, you have to manually make sure every single section of code is secure in ways that you simply do not need to in managed languages like Java and C#.

    Like you say, that doesn't mean that bad developers can't still write bad software in these languages just as they can in any language, but the fundamental difference is this- in languages like C/C++ it's far too easy for even the most competent developers to miss a security vulnerability, whilst in languages like Java/C++ the window in which developers can accidently create security vulnerabilities is much smaller. So certainly Java and C# apps wont always be absolutely secure, but in general they'll be more secure than C/C++ apps and importantly, they can be developed much more quickly too.

  • by Tablizer (95088) on Wednesday April 07, 2010 @10:29AM (#31761878) Journal

    It sounds like you are the robot :-)

  • by shutdown -p now (807394) on Wednesday April 07, 2010 @12:08PM (#31763446) Journal

    K&R's book on C is wordy. The true classic is the Revised Report on the Algorithmic Language ALGOL-60. In its original typeset form, it is 19 pages.

    It's strictly a language spec, though, not a book explaining "why" as well as "what".

    By modern standards, it's still somewhat underspecified. Especially in parts such as computed gotos, but there were a few other bits as well - which is why they needed Modified Report on the Algorithmic Language Algol 60 [masswerk.at], the rationale for which is:

    Meanwhile, various defects have been noted in the language definition which have unnecessarily hindered the use of ALGOL. Although the existence of subsets has given some assistance to the compiler-writer and user of the language, numerous problems exist, some of which were noted in the Revised Report.

    Hence the need for a detailed commentary and standard interpretation has become apparent. Such a commentary is now available, defining the modifications necessary to produce this Report from the Revised Report.

    Finally, it describes a language which didn't have an extensible type system, didn't have pointers, had only 4 basic types (integer, real, Boolean, label) and arrays and procedures thereof, and didn't even have strings as first-class values (yeah, you had "text" type, but you could only produce values of it from string literals and pass it around - no operations on strings at all; you can't even read a string from standard input!).

  • Re:Java (Score:3, Insightful)

    by mini me (132455) on Friday April 09, 2010 @11:44AM (#31791102)

    iPhone apps run on the iPhone, the iPod touch, and now the iPad. Commercially, Android, so far, only runs on cell phones. So even if Android does surpass the iPhone, you are only accounting for a percentage of the devices Apple sells in the same marketplace.

You don't have to know how the computer works, just how to work the computer.

Working...