There is a new google toy as of today: Google Trends. So of course, I wanted to see how PHP is faring on the trendy landscape. Here is a comparison of PHP, Java, C#, and Perl:
PHP Java C# Perl
PHP seems to be holding steady, or slightly declining. But, Java is waning, as I discussed in Why isn’t PHP the natural successor to Java?. C# seems to be steady and slightly increasing, while Perl is steady and slightly decreasing. So where are those Java programmers going if not PHP? Are they going to Ruby and Ruby on Rails?
Java Ruby Ruby on Rails
It looks like Ruby and Ruby on Rails are tiny fish in Java’s pond. Perhaps those Java developers are going to C# or one of Microsoft’s unsearchable variants. It would be interesting to see the MSN search trends. However, there is one area where Ruby on Rails seems to be doing well:
Struts Ruby on Rails framework
It used to be that most of the PHP frameworks were cloning Struts. Now they clone Rails. There is an increasing interest in frameworks.
There are countries where PHP is more popular. Here is the PHP vs. Java chart for the Netherlands. Right at the end, PHP beats out Java. Search, Derick. Search.
PHP Java
One last Trend. What is trendier that Ajax these days? Certainly not JavaScript.
Javascript AJAX
Notice how Javascript searches are declining while Ajax is ascending. Strangely I would have thought that the interest in AJAX would have created an increase in Javascript searches. It doesn’t look like the total search volume of the two terms together is increasing that much. Looking at the news volume graph is striking. The AJAX press release machine is in full gear. So is AJAX the thing that everyone is talking about, but nobody is doing? Can you say Web 2.0 bubble?
Please use the AJAX enabled comment form below to tell me how wrong I am.
DISCLAIMER: These graphs and conclusions are for entertainment purposes only. Opinions expressed should not be construed as trendy advice. The particulars of any person’s concerns and circumstances should be discussed with a qualified trend spotting practitioner prior to making any decisions.
Is this really meaningful? I’m a hard-core PHP developer and I can’t remember the last time I did a search that contained “PHP”. More commonly I do searches on things like “Warning: first argument to array_splice is not an array in foo.bar.php line XXX”
And BTW who needs Ajax preview when you have Live Preview?
This is not meaningful in any way. BTW, your example query does have the word php in it.
The problem with live preview is that it doesn’t run through the WordPress filter chain, so the end result may not look exactly like the preview.
In a recent post on his bliki Martin Fowler is praising Ruby quite a lot; but I get the impression that — just like for other Java developers — he is astonished by its dynamic features and ease of development. I think that Ruby has recently got the buzz as *the* dynamic language, and the fresh converts to it are mostly former Java Web developers. Someone should really explaine those people that there are other languages — with names mostly starting in “P” — that are dynamic and object oriented.
First of all, I’m a ZCE engineer who uses PHP for 60% of the time on his day job (the other 40% of the time I’m using Java). However, in the evening I’m using Ruby for my own (startup) company.
Like you said, both PHP and Ruby are dynamic OO languages. But having experience with both languages I can say that Ruby goes much futher then PHP in these aspects (in a good way). Ruby is 100% OO, everything is an object, even numbers. For example, take the following PHP for loop:
[code]
$var = 10;
for ($i = 0; $i < $var; $i++)
{
echo "Iteration: ".($i + 1)."<br>";
}
[/code]
This loop can be translated to the following Ruby code:
[code]
var = 10
var.times do |i|
puts "Iteration: #{i + 1}<>"
end
[/code]
Or the following code (whatever you like more):
[code]
var = 10
0.upto(var) { |i| puts "Iteration: #{i + 1}<br>" }
[/code]
As you can see both times and upto are methods of the integer class. Even the puts method used to output the string is a method of an object (the default receiver in the root of your program).
So as far as OO is concerned, I think Ruby is one step further then PHP.
Talking about the dynamic aspect of both languages. In PHP we have variable variables, we can eval code in a string, PHP automatically converts strings into integers depending on the context etc.
Ruby is also dynamic, but in a different way. Like in PHP you can eval code in Ruby, however Ruby does not have variable variables and does not automatically convert strings into integers (which isn’t a bad thing if you ask me). But in Ruby you can add or replace methods in existing classes (!), evaluate expressions in different contexts (using something called the binding), pass snippets of code to methods (closures) and that’s just the tip of the iceberg.
So if former Java Web developers are fresh converts to Ruby saying they could have used PHP just as well is simply not true. It totally depends on where you want to use the language for. But in my experience when I’m programming in PHP I really would like to use some features that are only available in Ruby. When I’m programming in Ruby however, I really don’t know of any PHP-only features I’m missing.
That being said, I’m still a happy PHP programmer. It’s a nice language and it has been my favorite language for many years (Ruby being my favorite language at the moment, as you might have expected). But as long you don’t have experience with a certain language you can’t simply say “it’s nothing new” or “it has nothing to offer over language x”.
Yeah, Berislav, Martin Fowler is just a fool who heard nothing about languages starting in “P”..
Regardless of whether or not these graphs completely map to actual language usage, it is definitely interesting to see these trends. I wonder how much of programming language search traffic is from people who are evaluating technologies, rather than actually using them. For example, most of my searches for C# have been an attempt to get a feel for the open-source tools available for C#; in the end, however, I opted to build my prototype application in Java since my C# searching confirmed that there was a much richer & more familiar field of open-source tools written in Java. That’s an anecodotal example, but I think it’s true to say that keyword-measured interest may not actually reflect actual language use. I bet, for example, that far more people are searching for RoR than are actually using it. For example, I have watched the video, read articles, etc. and it has shaped my thinking about frameworks & development — but I haven’t written a line of Ruby.
And, I think Derek’s comment is very relevant too. Despite the presence of PHP in that example, I think it’s a valid point that the more you get into really using a language, the less you’ll be searching for “PHP” or “Java”. For example, most of my Java-related searches are related to specific technologies (ant, hibernate, spring, jmx, opennms, etc.). Rarely do I find myself needing to add “java” in my search strings anymore.
So perhaps these search stats disproportionately represent the casually interested and beginner developer?
[...] This post really puts things in perspective. [...]
[...] Programming Language Trends vis Some interesting trending done with the new Google Trends and simple search terms. I don’t believe this was meant to be a serious analysis but as “trendy advice”. If you have not tried Google Trends, it could be hours of fun! Thanks Shanti Technorati Tags: code google trends [...]
One could argue that the documentation for perl and php is better and doesn’t require users to stfw..
I don’t think the java programmers pick up anything after they stop using java. I think they just stop programming all together. Similar to how scientists stop inventing after they get married.
[...] Programming Language Trends via Google | Professional PHPBut in my experience when I’m programming in PHP I really would like to use some features that are only available in Ruby. When I’m programming in Ruby however, I really don’t know of any PHP-only [...]
There are three problems with this argument.
One has been nicely summarized above. Namely: a lack of searches for a language name doesn’t necessarily translate into a lack of interest in the language.
Problem number two: These are not really trend graphs as far as I can tell. They need to add a line showing a moving average — many of the graphs created are impossible to read as far as trends are concerned.
Problem number three: This is a biggie. There’s no scale on these graphs. That pretty much renders them useless.
End of story.
hi i believe the author is bias towards a particular language because i saw the trends of book sale released by orielly it showed only php and c# on growth with php 16% growth in terms of book sale and c# 2.5 rest were negative(decline) .
You shouldn’t think about who searches what because these trends can be seen everywhere else http://www.tiobe.com/tpci.htm Conclusions and trends why something is going on you can better explain by yourself but you can’t argue about statistics because it’s needless.
One good way to know if a language is popular is..
1. How much code is written in it, open source projects, online tutorials…etc
2. Who is using it, companies, company sizes…etc
3. How many job listings mention this language.
It also differs from one country to another.
$var = 10;
for ($i = 0; $i < $var; $i++) {
echo “Iteration: “.($i + 1).”<br>”;
}
This loop can be translated to the following Ruby code:
var = 10
var.times do |i|
puts “Iteration: #{i + 1}<br>”
end
How is this ruby code better ? I see a lot more abstract syntax in the ruby code than in the php code. In php, you just append the value of i+1 into the printed string. In ruby, there’s this entirely bizarre interpretive thing going on. Can your loop even do anything but increment by 1 or does that require another method to be employed? I noticed you switched to an entirely different construct in order to shorthand the code. Isn’t shorthanded code one of the main complaints leveraged against perl (lack of readability)? Funny how nobody complains about it in python or ruby these days.
Ruby zealots LOVE to tout how everything is an object in ruby and therefore ruby is the more beautiful language. I don’t measure language beauty that way at all and see no reason whatsoever why everything should be an object.
Personally, I much prefer to have a single language construct, in this case the for loop or its cousin the foreach loop, that can handle a myriad of iterative tasks rather than various iteration methods of various primitives. Which requires more rote memorization?
I have to agree with the comment above.
This code:
var = 10
var.times do |i|
puts “Iteration: #{i + 1}”
end
Looks a lot like PERL to me. (Not quite as bad, but close). Also, with the addition of the “do” and the “end” it looks similar to VB. So, PERL + VB = Ruby?
Talk about two polar opposites.
To me, Ruby code looks like chaos. Seriously. It looks similar to the trendy blogs (etc) who have decided that sentences should no longer have periods and personal names should no longer have capital letters. Garbage, the lack of meaningful punctuation in Ruby makes it HARDER to read, not easier.
I seriously think Ruby is only popular because it’s popular. It’s the “IN” thing. Lots of good developers have been duped by the hype, and it’s wasting our time. How about instead of constantly reinventing the wheel (with new languages), we improve the wheel that already works?
PHP and more specifically the Zend Framework will be pretty dominant. Ruby/Rails is the only real competition and nobody (at least me) wants to learn a very particular implementation of weird language just so they can do the same things they can do with Zend. Also, clients dont want to pay you for it and thats not going to change. Ever.
Microsoft: too shitty.
Java: too clunky.
Ruby: pain in the ass/ no advantage
Perl: get real
I really don’t know that you can rely on search volume being proportional to the usage of a language. If anything, I would say these trends corresponds to the documentation quality of a language or even foresight into how well advertised they are.
PHP for example has, in my opinion, the best documentation of any language out there — I rarely do a Google search and just use php.net’s search field. C# (which is one of my favorite languages) relies on the Microsoft MSDN library which is just plain clunky and begs for developers to turn to Google instead.
That being said, these stats are pretty much in line with what I would assume:
- Java was in it’s prime maybe 5 years ago. It is too bulky for todays’ web applications.
- C# is an awesome alternative for software developers. It has simple syntax of Java with the power of C++.
- Perl. Come on…
This is a strange post. I hardly ever search for javascript anymore since i use the prototype framework, i always go to prototypejs.org and click API’s. When i search PHP.net i go to google and type in the function name i need to lookup and because PHP is so highly ranked, the top result 99% of the time is the one i need.
So saying that Java programmers are moving to another language is wrong. Searching for “Java” would likely be people “interested” in learning what it means, what its about, etc. Which would likely be the result of all the hype of Java in the press and around the net… not Java programmers typing in “java”… Most programmers find the resources and skip google. Such as php programmers go straight to the forums they want, or the php.net site etc.
Kind regards,
Scott