Tag Archives: Opinion

What to make of TIOBE’s PHP results

A few weeks ago Twitter was a storm of activity around the TIOBE index.  PHP had dropped two spots having been overtaken by Python and C++.  Most of the activity was not from the PHP side.

Having used the TIOBE index myself I was a little surprised to see PHP drop so suddenly.  So I decided to take a look and see what was going on behind the scenes by reading on the index definition to see if I could understand what happened.

After reading through the definition I still don’t know what happened, or even why it happened.

The TIOBE index is calculated by looking at the top 6 sites on Alexa that have a search function which says how many hits there are for the query +”<language> programming”.  So, for PHP it would be +”php programming”.  The results of the search weighted based off of the search engine and calculated as a percentage so that the total of the top 50 programming languages equals 100%.  Additionally, each query is given a confidence rating to weed out false positives via a manual process.  For example, searching for +”basic programming” could also return a result for “Improve your basic programming skills in Java”.  If 10% of the hits in the first hundred pages of the search results are determined to be false positives then the search results will be taken at 90% of their value.

So what was it that caused PHP to tank and Python and C++ to take over?  In short; I don’t know.  Also, FTR, I consider C++ in the same realm as C and so I’m not overly concerned with C++.  Many of the search results for C also have C++ in there so who knows how the confidence rating is calculated there.

The reason why I don’t know is that I did the search +”php programming” and +”python programming” on most of the search engines and I found that PHP was usually double the Python results, or more.

+"php programming"+"python programming"
Google1,480,000966,000
Yahoo133,000,00023,100,000
Blogspot12,5008060
Wikipedia215250
Youtube575697

The only places where Python took over was Wikipedia and YouTube, and not by much.

Here’s where the TIOBE index breaks down.  It claims that “The ratings are based on the number of skilled engineers world-wide, courses and third party vendors.”

No it’s not.

The only way that TIOBE is calculated is by applying a single query on a few search engines and matching it up with a manual confidence factor for the results.  That query is not sufficient in determining “popularity”.  No data is provided as to why THAT query alone is sufficient to  determine popularity.  It’s assumed.

PHP is an easy language to test the veracity of that statement because there are very few other acronyms that match up with the programming language so neatly.  Let’s compare the Youtube results of +”php programming” and “PHP”.  The TIOBE query on Youtube yielded 575 results, but simply searching for “PHP” returned 768,000 results.  On Google, the TIOBE query got 1,480,000 hits whereas the simple “PHP query yielded 14,870,000,000 results and the first few pages had only one false positive.  Here’s an interesting Google query to try; +”php programming” site:www.php.net.  It has fewer results than “python site:www.php.net”.

In other words, when checking against a query that is quite specific (not much else is called PHP) we see a very wide differentiation between the TIOBE query for PHP and a simpler query. It seems like the index is more of a data retrieval experiment than a real-world representation of actual popularity.

And I still can’t figure out why PHP dropped the way it does.  Perhaps it has a  high false positive rating.  Which, I could argue, could be more important than search results.  Why?  Because the more popular you are the more people will try to use your popularity for their own ends. So what to make of the TIOBE index’s PHP results?  I simply don’t know because the methodology seems to be pulled out of a hat.  Perhaps a percentage increase of a given language is also taken into consideration (meaning that blog posts jumping 50% in a given month would be added to the score) but I didn’t see that noted in the index definition.

But I could be wrong.  I could have completely misread the index definition and perhaps the real world popularity of Python DID jump over PHP.  I know it did for a day or two after the results came out.  But after going through the methodology and trying to match it up with what I saw in the search engines I have my doubts as to it’s accuracy.

Migrated the blog… to WordPress

to WordPress?

Yep.  I had written my blog from scratch, partially because I wanted to use it as a testing ground for various ideas and such.  However, part of the problem of maintaining your own blog software is maintaining your own blog software.  I think that I’ve pretty much milked the code for all it’s worth.  So now I’ll stop maintaining my own code and start using someone else’s.

But… WordPress?

Yep.  Let’s face it; the code base is a horrible stinking mess.  The API is not intuitive in any way, shape or form.  WordPress pretty much gets everything wrong…

… except that it gets the job done.  Way too many programmers are way too proud of their code.  Well, not really.  They’re proud of their ability and they like any opportunity to talk about how great their abilities are.  PHP was never about that (though we have our share of egotists).  PHP was about getting the job done.  Do I wish that the WordPress engine had a better architecture?   Absolutely.  Do I wish that the API was remotely intuitive?  Yep.  But the long and the short of it is that I don’t have the time to maintain the code base for a blogging application.  So I use one that already exists, has plenty of templates available (I’m the world’s second worst designer) and has a large community around it.

So, yes, WordPress.

I hate config files

I hate config files.  There, I said it.  Made a change to your configuration?  Database?  Temp location?  Gotta redeploy your application.  Even if you have an awesome deployment mechanism it just seems somehow wrong to have to redeploy your app to make a configuration change.  From a security standpoint, I don't particularly like having passwords and such being stored in a source repository.  Or making it part of your build process.  Or manually editing files in production.

I want my configuration to be discoverable.  In other words, the only part of the deployment process that has configuration information is the information needed to discover your configuration.

I'm doing some work again (finally!) on a really cool cloud example.  But one of the things I had noticed was that every time I redeployed the app I needed to script out changing some discoverable endpoints.  For example, if a queue has a load balancer in front of it, that load balancer name/IP may have changed.  Having that extra level of deployment in there really bugged me.  Some may say "with continuous deployment you don't have to worry about that!"  Oh yeah?  What are you doing making your production environment available to your testing environment?  Production settings, by definition, should not be testable in any other environment other than production and you generally shouldn't be testing in a production environment.

One of the big tenets of building a scalable application is being able to discover resources.  Who knows where information lies in a large scale system?  Now, PHP developers may say "it's never been a problem before!".  To which I would reply, "that's the only way you've ever done it."  In other words, having an easy way to manage configuration options and application resources are things that most PHP developers have not really done.  I take that back, I have seen it done, but it's done by figuring out what the local configuration file says about those app resources and configs.

That's it.  Just ranting.  Kinduv.  But seriously, I do think we need to handle configuration and resources in a better way.

Objections to dynamic typing

I am about to head out to Magento Imagine to speak on queuing and scalability.  So what is today’s blog post about?  Dynamic typing; which has absolutely nothing to do with scalability.

Every once in a while I inject my opinions into places where they are not welcome.  I have heard from people in the staticly-typed realm of how amateur dynamic typing is.  Some people are interested in understanding how to use dynamic typing, others, not so much. So what I would like to do is talk about some of the arguements made against dynamic typing.  Clearly PHP will be my reference point, but many of my points will be salient across many dynamically typed languages.

The biggest misconception about PHP is that it is a strictly dynamicly typed language.  In other words that cannot have typed variables.  Where you are using the OOP mechanisms in PHP, you have the opportunity to strictly type your variables.

1
2
3
4
5
6
7
8
9
10
11
12
class Test {}
class Test2 {}
 
class ExecuteTest {
 public function exec(Test $test)
 {
 doSomethingWithTest($test);
 }
}
 
$et = new ExecuteTest();
$et->exec(new Test2());

What happens when this code gets compiled?

Catchable fatal error: Argument 1 passed to ExecuteTest::exec() must be an instance of Test, instance of Test2 given, called in test.php on line 17 and defined in test.php on line 9

Fatal error.  This is because the type of object passed in was incorrect.  So data types do exist in PHP and many other languages.  The only downside is that you need to actually run the code on your web server or in a unit test to compile it.  Some would (and have argued extensively) that this is a significant drawback.  There’s truth to that, but on a very limited scope.  Is it a drawback?  Yes.  Is it signficant?  Not by a long shot.  Whether it’s PHP, Java, C, Perl, Ruby, VB, C#, JavaScript, etc. etc, if you deploy code that you haven’t tested then you deserve every error and every sleepless night you get.  It’s called being responsible for your code.  And don’t think that having your code pre-compiled is much better.  I have a lot of compiled applications running on my computer.  Cakewalk SONAR, Firefox, Apache, PHP (the binaries), MySQL, Tweetdeck, Java, etc., etc.  And you know what?  Shit still happens with compiled code! Sometimes even type-related errors!  Compiling your code ahead of time as you do with C, Java, and the like does not protect you from type-based errors.  Can you catch some fat-fingered errors?  Sure.  Are you safe?  No.

For example, take this Java code

 

1
2
3
System.out.print(
     Integer.MAX_VALUE
);

 

Running it provides an output of

2147483647

What about this code?

 

1
2
3
System.out.print(
     Integer.MAX_VALUE + 1
);

 

The output is 2147483648, correct?  No.  It is

-2147483648

Did the compiler flag that?  No.  Is that a weakness in Java?  No.

That was a bit of a side-track, but it highlights what I think is a misconception about PHP applications and structure, usually made by those who don’t do significant work in PHP.  Do you HAVE to build a well-structured application?  No.  Should you?  Of course.  PHP does not force you to write bad code.

Often those who complain about PHP will complain not about what PHP developers DO, but about what they COULD do.

But let me address what I think is probably the biggest complaint from the static-typed crowd.  The biggest problem is not the programming language, but the user sitting at the interface.  The problem is that if you have data entered for a field called “width” and the person on the other end enters “wiener” the problem isn’t that “wiener” evaluates to zero, it’s that you didn’t validate your data.  This problem exists for C, Java, or whatever your compiled language is.  Why?  Because if you are building a web site you do not have the ability to force typed input.  Why? HTTP is ALL strings.  There are no integers, there are no floats, there are no booleans.  They are all strings, regardless of the language you are working in.  And there are plenty of validators in the core PHP language to use (ctype_*) and plenty of frameworks that offer more advanced validators.  If you aren’t validating input in ANY language you will have problems.

The next issue is with API code.  I have no problem conceding that if I am writing an extremely math based application that PHP is likely not a good choice.  So, 3d applications, music/audio applications, games, etc.  Going back to the previous paragraph, PHP was written for HTTP.  HTTP uses strings.  But if you’re building an API or structuring an application, how do you make sure that other programmers don’t provide data that royally messes up your code.  Conceptually, I will concede that this could be a problem.

But go back a few paragraphs.  I made the claim that people complain not about what PHP developers do, but what they could do.  The example I saw was

 

1
$square->setSize("hello");

 

setSize(int), in a static-typed language, will fail.  Could you put “hello” into a method call named setSize() in PHP?  Yes.  Next question; would you?  If you are worried that someone will put the word “hello” into a method called setSize() then you should be wondering about the basic cognitive abilities of the programmer, not the abilities of the language.  We’re not even talking about using something like Hungarian notation or anything like that.  We’re talking about simple logic.  Does “hello” make sense in that context?

OK, so that example was on the simplistic side.  What about when you are dealing with complex third party applications?  In all honesty, I don’t know how to quantify that.  If there’s a method called setPrice() do I put a description in there?  I suppose that if you are using a log of magic in your application that there could be a benefit, but the whole complaint is that static typing is safer than dynamic typing.  In that case

 

1
2
3
System.out.print(
    Integer.parseInt("Dubious data")
);

 

should be a nonexistant issue.  But it’s not, because invalid data was passed.  These kinds of games can go on and on but they miss the point becuase these are things that the language cannot check against.  If you intend to leave your application open with no validation either at the front of your application or in your API then you will have problems.  It doesn’t matter if it’s typed or dynamic.  What matters more than the type is the value, as we saw in the Integer.MAX_VALUE + 1 example.  So even when writing or writing to a third party API you still need to validate data.  As such, the gain of typing is not as significant as is sometimes claimed.

I’ve talked so far about objections to dynamic typing.  What about the pros?  This is a short argument because there is one big reason why dynamic typing is good, and it is quick to explain.

I think the biggest pro of working with a dynamically typed language as that you go from working with data/types to working simply with data.  In other words, do you really care about whether or not 1 is a string “1″ or an integer 1?  No.  You care that it’s a 1 up until you are doing math.  Then at that point the interpreter works on that data as if it were a number.  When you print that number in a browser do you care if it’s a numerical 1 or a string “1″.  No.  You care that the user sees the number 1 on their screen.  In that case it’s a string.  Data; that is what applications are about.  Data.  Applications are not about data types.  Data typing for scalar data can help to mitigate some issues but it is by no means fool-proof.  In fact, a lot of security issues are due to some very smart “foolish” people messing with input.  Data types do not protect you against anything.  In Java, you get bad data, in C you get a buffer overflow.

Data.  That is what we are working with.  My purpose in writing this is not to say that dynamic typing is better than static typing, or anything like that.  Types are ways of describing data, but they do not protect you against anything.  Statically typed languages will protect you in some cases, but leave you wide open in others.

So why is dynamic typing sometimes listed as an objection.  I believe that’s exactly what it is; an objection.  Objections are simply reasons that people find to not use your stuff and are usually done to put you on the defensive.  It’s standard fare for if you’re selling kitty litter or a programming language. A lot of people hate PHP, for reasons I have described before.  My interpretation is that dynamic typing is raised as an issue mostly because people see attacks on their preferred language as an attack on themselves.  Honestly, I can think of no other reason why people get so engaged in tech-wars the way they do.

How to NOT sell an upgrade, @CakewalkInc

So, I work in software and so I know that sometimes a software vendor is not able to do things in as streamlined a manner as possible.  However, Cakewalk has taken the cake (no pun intended) when it comes to doing whatever they can to piss off their customers.  I have been using (and upgrading) Cakewalk software for almost 10 years.  When their new X1 was announced I was all kinds of giddy.  When it was released I was even more so… until I tried to upgrade.

fail 1

What?  I need to get customer service to validate that I can purchase your software?  Never mind that all of my purchases can be easily seen on my existing Cakewalk.com account.

So, me being a loyal customer (did I say I've been using their stuff for almost 10 years) I contacted Cakewalk technical support… last Wednesday.

fail 2

Today is Monday the 13th and I'm still waiting for customer support to give me permission to upgrade their software.

Like I said; I'm in the software business and I know that sometimes you can't just let things go.  But seriously?  I have NEVER  seen a company force you to wait for customer service to give you the green light to PURCHASE an upgrade for a RELEASED software package.  I already have a love/hate relationship with Sonar.  Guess which way the scale is starting to tip…

Top 25 Bad Book Titles

I’m sitting here waiting for a half terabyte drive to format on Vista (apparently quick format should be “quick” format).  So I’m trying to figure out what to do.  It’s towards the end of the day and there’s not much my brain could do right now that would be worth starting.  Yesterday, there was a trend on Twitter about “boring movies”.  So, why not do something on boring/useless/pointless/wrong book titles?

  1. The Performance Guide to Ruby on Rails
  2. Threading in PHP
  3. OpenGL for MS/DOS
  4. Building open systems on Windows and the Mac
  5. One click automation on Linux
  6. Non-emasculating Vampire Stories for Teens
  7. The Pessimist’s Guide to Joel Osteen
  8. Dummies… for Dummies
  9. Cooking Light by Julie Child
  10. Life by Keith Richards (wait a sec!…)
  11. Green Living by Jeremy Clarkson
  12. Meh by Rick Warren
  13. Curious George Loses a Hand
  14. Quantum Mechanics for Dummies
  15. Humpty Dumpty – Illustrated by Frank Miller
  16. How to win friends and influence people – by Joseph Stalin
  17. Poor Dad, Poor Dad
  18. Shit my Dad Says by Franklin Graham
  19. Get Tough on Yourself by Oprah Winfrey
  20. The Modest Celebrity
  21. The Angry Birds Strategy Guide
  22. The Principles of Polymer Manufacturing by Heidi Montag
  23. Atlas Shrugged (Large Print Edition)
  24. Thank You for Smoking by Winston Churchill
  25. Humor by Kevin Schroeder

Ugh.  That’s 25 and it’s still only at 85%

How chickens and programming are kind of related

I believe that everyone should work on a working farm for at least a month.  There are a few reasons for that.  Firstly, it would probably make a bunch of people shut up about a bunch of pointless things.  I heard one person say "a chicken is a person too" once.  That person has clearly never been around chickens in their full glory.  The person who said it had about a half dozen pet chickens.  "Pet" chickens (wearing diapers, for what it's worth) are not what chickens are truly like.  Chickens are vile creatures that poke in their own fecal matter looking for a scrap of something worth eating.  They are also cannibals.  Thankfully, they are yummy too and so they do have some redeeming qualities, none of which are present in their live state.

There's another thing that I think people should do.  Well, not quite people; programmers.  Every programmer should spend a month both as a system administrator and in front line tech support.  The reason for the former is that they really need to see what hell they put the sysadmins through, especially if there is a problem.  The other reason is because as a sys admin they would see what an application behaves like in a production environment.  Not just their application, but any application.  Things that go smoothly in development may not go smoothly in production and programmers should experience this so they can learn to build better applications.  And not only that, but also learn to use the tools that admins use to diagnose problems.  Tools like vmstat, top, strace, etc.

Programmers should also spend time in front-line tech support.  But the reason here is a little different.  It's not so they can learn to empathize with the support engineers (they already did that with the sys admins), but so they can learn what it is and is not supportable.  Programmers like to solve problems.  But more than that, it seems like they like to create them.  And so learning to say "no" to people is a big deal.  Well, not really "no", but "we don't support that."

Why is that a big deal?  Because people seem to like to be creative in how they work with software.  I know I do.  But a problem arises when problems arise.  Now you need to work with a support engineer to figure out just what went wrong.  People often complain about support engineers working off of a script.  But that's EXACTLY what they should be doing.  If you don't have a predictable environment, your support costs increase significantly.  Not only do your support engineers have to spend longer diagnosing a problem, but they'll probably have to bring in one of the programmers who's familiar with the system to diagnose that someone did something outside of what is supported.  Everyone loses.  So, programmers should spend some time on front-line support so they can see what people are doing wrong and actually make their software more restrictive, in some cases.  "We don't support that" is a valid response.  It is not done because people are lazy, it's because supporting every possible option or configuration means higher costs, which means more expensive software (even the free stuff).

It also works in home life:

Wife: Babe, the toilet's leaking
Me: I'm sorry, but I don't support that

(and chair manufacturers should have to sit in squeeky chairs all day long)

But what it really comes down to is that programmers affect a LOT of people.  Good programmers are not necessarily people who come up with borderline ethereal architectures, worthy of song and praise.  Good programmers are people who take look at all the things they affect; operations, support, customers, and build a system that balances the needs of as many stakeholders as possible.  And the only way to do that is to spend some time in the trenches.  Just like looking at a picture of a groomed Bantam rooster does not give you an accurate picture of the villainous chicken, simply working with code does not give you an accurate picture of the ecosystem in which you work.

Programming skillz for life… and programming

  1. Never schedule a meeting 30-60 minutes after you've started drinking coffee.
  2. Ask for a raise based on your quality of work, not based on how much you think you deserve it.
  3. If you don't clock out at the top of the hour you are more committed than 50% of your co-workers (see point #2).
  4. If you clock out 45 minutes after the end of the day you are more committed than 90% of your co-workers (see point #2).
  5. Don't consider gaming time as part of your work day and then complain about how many hours you need to work.  Gaming at work can be good, but it should not be counted as work.
  6. If you work on Linux, learn strace.
  7. If you ever do anything over a network, learn Wireshark.
  8. If someone asks you for a feature, ask why they want it.
  9. If you are not a good designer, don't do design.  Pay someone to do it.  (I should take this advice myself).
  10. Take your own advice.
  11. Usually the best answer actually is "it depends".  As long as you can answer why. 
  12. Get a desktop background that is not a woman.  Sorry, but she's way out of your league and having her on your desktop makes you look like a loser.
  13. Take a break (I should take this advice myself).
  14. Sit under a tree without a computer.
  15. Sit under a tree while programming.  Call it Green Programming and claim discrimination if someone complains.
  16. Expect failure.  You're not as good as you think you are.
  17. If I don't click on a link in your marketing email within 3 sends, I probably don't want your email.  Unless you're selling gear.  Then it's gadget pron.
  18. Don't be an ass.  This is why I've limited my exposure to Ruby.  Seriously.  I'd like RoR more if I had met nicer developers.
  19. Download the source.
  20. Use the source.  Seriously.
  21. Don't delete your email.  It is evidence of other's wrongdoing.
  22. Managers: learn at least a few Star Wars quotes.  If you change the deliverables say "I am altering the deal.  Pray I don't alter it any further."  Star Trek quotes are OK too, but Star Trek doesn't have a lovestruck wannabe Samurai who was previously thought to be a dark lord before people knew the back-story.
  23. Google is a development tool.
  24. If you are in Netops, don't block access to Facebook or Twitter. We will not be more productive if you do that.  Anyway, it's the administrative assistants who waste time on there.  Plus we'll just find an open proxy and use it to get there.
  25. HTTP is the worst protocol for transmitting information, except for all the others that have been tried.  Paraphrasing Winston Churchill (I think).
  26. Don't expect much from the Oracle/Sun merger.  Ecclesiastes 1:9;-)
  27. When you come to an XOR in the road, AND it.

My apologies to anyone I may have inadvertently quoted.  These were all written off the top of my head but there may have been undue influences that caused the subconcious alignment of disaligned concepts.

Open Source Interdependency

Several months ago I was talking with some Java developers who were being forced to move onto PHP.  They were actually quite open to the idea but had some questions.  One of them was on how you would set up a page counter.  In the Java world what you would do is define a static property within a class, synchronize it, and increment it for each page that hit the site.  In my explanation I went through the myriad of ways that you could do that, probably confusing them even more.

I had thought about it for a while after that discussion and it hit me.  My answers were not wrong, but the way I communicated them was.  In the Java world you tend to look to language answers for problems like that.  Then for much more complex problems you tend to look for software solutions from a given vendor.  In PHP, it's done a little differently.  Rather than add a bunch more features into the language, we tend to depend very highly on third party software to handle problems that might seem more basic for more "enterprisey" languages.

For the problem of the page counter, rather than throwing it into an object, you'd throw it into the database.  Rather than using threads, you might use Gearman or something like Zend Server.  In other words, DRY (Don't Repeat Yourself) is huge in the open source world.  It's almost more DRA (Don't Repeat Anything).  If someone, somewhere in the world, has written it, you should be contributing to that project, not writing yet another library. 

If you have ever compiled software on Linux you actually have experienced what I'm talking about.  The first thing you do is type ./configure and it goes through a litany of different header and library files making sure that you have all that you need.  You see this to a lesser extent with Linux and package managers.  Yum or apt do a good job of hiding the compilation hell, but you still do see a lot of needs for dependencies.

One of the things that I really love about open source is not that you can change the code, or that you can see the code, but that you get many more details about what your application is doing.  The desktop platforms have a strength in that you install something and it just works (supposedly).  But what did they install?  What are the gotchas that their certain version has?  You really don't have nearly the same level of insight into what's going on.  Some people like that.  Some people would rather expect a vendor to provide a big ball of software that solves all their problems.

I can understand the position, but I really like knowing about a dependency.  Why?  Because if there's a bug that needs to be fixed you are only updating one piece of software.  Granted, it could also end up breaking others, but that has very seldom been my experience.

So in the end, if you are ever talking to Java developers who are being told to move to PHP and they ask how you would build a page counter, just tell them that with PHP, and most other open source programs, the goal is to re-use other people's software wherever your code does not provide the functionality needed.  So, if you need a page counter, ask yourself "who else has done this and how can I get their code".

The ElePHPant in the room

I have a thing for charts.  Charts have the ability to convey very complex scenarios in a single line, or a few lines, if there are multiple considerations to be made.  But the reason I have an interest in charts is not because of the information they convey, but the information that they don't convey.  I find that the information that is left out of a chart is often the most important piece.  This is because statistics can be made to say pretty much anything.  You've probably heard the line "Lines, Damn Lies and Statistics".  When I start hearing things like "60% of people think X" or "20% of people think Y" I tend to switch off.  Interestingly enough, I do the same thing, though.  Probably because that's the easiest way to make a point.  It sounds scientific.  It sounds like you've done your research, even if you really haven't.

Three years ago I saw this at a conference I was speaking at.  It was a conference that was supposedly about working in mixed environments where you would have .NET applications talking to C applications and Java applications talking to Ruby applications and PHP talking to, well, nobody, aparently.  During one of the keynotes the presenter had a chart of different programming languages placed based upon their feature set.  They had C, Java, Ruby, Python, etc.  But where was PHP?  PHP powers 30 million websites and is number 3 on the TIOBE index, so why was it not there?  They had the languages at position 1, 2, 4, 5, 6, 7, 8 and 11 (which the speaker clearly thought should be at number 1) but not the programming language at number 3.

After the keynote I was introduced the person who created the chart by a customer of ours.  I was introduced as "This is Kevin Schroeder, PHP Consultant for Zend Technologies." and the keynote speaker, presumably thinking he was funny, stated "Oh, I'm so sorry."

That exchange has often gone through my mind as I run into people, articles, blog postings and such that demonstrate this kind of attitude.  In fact, do an image search on Google on programming language charts and on the ones that are not scientific ("scientific" meaning that they are based on actual numbers), and you will often find that PHP is simply omitted.  It is an elephant in the room.  Given our mascot, appropriate, do you not think? 

From a programming languages perspective (not talking hardware, networking, web server or operating system) I think I can argue that PHP is responsible for the web we have today.  Is there ugly PHP code out there?  Yes.  A lot of it.  But what PHP basically did was made web programming available to the masses.

That's it!  I think I've figured it out.  Just now.  I think I now know why PHP is either scorned or completely omitted when people talk on comparative programming languages.  PHP is the programming language of the unwashed masses.  PHP is not the language of the "elite".  PHP is like spaghetti.  You throw it at the wall and it sticks.  It was not born out of a computer science department.  It was not born out of a design pattern.  It is impure.  It is unwashed.  It is unsophisticated.

This explains why many people try ignoring it.  They, having either been "properly" educated or having "seen the light", cannot force themselves to look upon what they see as the putrid stinking mass of PHP.  It is like the politician who thinks they need to tame the masses.  It is like the business leader who thinks they deserve ridiculous pay.  It is like the actor who thinks they have anything resembling a logical thought in resounding cavern they call a brain.

PHP is like the market place.  You go there and it is noisy and rambunctious.  But it is also where the people meet.  If you need something for dinner, as much as the politician would like to think they know best (like how much salt should be added to a restaurant dish), you go to the market place, not the politician.  Because they have what you need.  It might not be the highest quality.  It might not have the nicest shine.  But you know what?  It does what it is supposed to do.

To be fair; I do think that the PHP community initially missed how important developing for a framework was.  But you know what?  Microsoft missed the Internet.  And you know what?  Microsoft turned around and embraced it (for good, bad or in between, I will let you decide) virtually overnight.  PHP developers looked at some of the new technology coming out and said "you know, there are some good ideas there."  We now have half a dozen strong frameworks available for PHP each with their own strengths and weaknesses.

More could be written about the subject, and I'm sure that more will be.  But after thinking about it, Elitism is a strong candidate for the explanation the disparagement of PHP.  PHP is the language of the unwashed, uneducated masses.  And any type of Elite has difficulty comprehending how the masses survive without their help.  But yet we do.  Are things perfect?  No.  But we have no illusions of Utopia or programming Nirvana.  Appropriately, the word utopia, interpretted, means, that no place is perfect.

I think that quoting Sylvester Stallone, or rather Sylvester Stallone portraying John Spartan in Demolition man, is apt when talking about programming languages.  "You (elitists), get a little dirty.  You (PHP), a lot cleaner.  And somewhere in the middle, I don't know, you'll figure it out."  PHP has gotten cleaner.  MUCH cleaner.  Can the others stand to get a little dirty?

Post Navigation