From the post: > build compelling alternatives and make sure these alternatives are equally pervasive, as easy to set up and use as possible. A bite later: > We've got a long way to go. [...] The best way to fix the PHP problem at this point is to make the alternatives so outstanding that the choice of the better hammer becomes obvious. Basically, Jeff just agreed that PHP is simply better than the rest. The problem…
Coding Horror: The PHP Singularity
41–50 of 341 posts
Re: Coding Horror: The PHP Singularity
#42I've been coding for nearly 30 years and have seen this rant for every major language I've coded in. The reality is there is no perfect tool even in construction as Jeff tries to draw parallels to you will find that many different tools are required for many different situations. Often a hammer can be used to make a hole in a wall and other times you use a saw to cut a nail head off and just pound it into the wall be…
I just don't see how PHP is more approachable, especially compared to the supposed ease of ruby on rails.
Re: Coding Horror: The PHP Singularity
#43Cue legions of PHP drones blubbing about how it does the job just fine, it's available everywhere and how it's used by Facebook and half the internet. We get it. We used to be PHP developers too. We took the time to learn other languages and now work with them. We enjoy our jobs significantly more than we used to. You might too.
And it's not that I haven't spent the time learning other languages and working with them. I did a degree in Computer Science and have worked for 12 years in the industry, over which time I have learned and worked with Pascal, C++, Ruby, Lisp, Javascript and dealt with a number of other languages. I discovered PHP early on, but only relatively recently have I really taken a shine to it, particularly with the releases over the past few years, and now I won't work with anything else.
I enjoy my job significantly more than I used to because of PHP.
In the main I don't find it a horrible language, I'm aware of its weaknesses and its "problems" (usually not problems per-se, but things it does differently from other comparable languages). But in the main it fits the way I think and work, and I'm incredibly productive (and I like to think that I don't write code that's too shabby either!).
Re: Coding Horror: The PHP Singularity
#44I agree that it's rather surprising that in this day and age, nothing comes close to the out-of-the-box ease and performance that PHP gives for web development. Install a couple of packages, and BANG, you're up and running. It's been a year since I've taken a look at the rest of the webdev landscape, but it seems that you either lose out to an overly-complex setup (by comparison), or suffer with a memory hog that mak…
Re: Coding Horror: The PHP Singularity
#45Ex-PHP developers that bash PHP are like the poor kids that win the lottery and then start bashing poor people publicly. Sad and kinda small of them. I'm willing to win the lottery, mind you, but I'd never waste my time or lower myself down to bashing poor kids.
"Ex-PHP developers that bash PHP programmers are like the poor kids that win the lottery and then start bashing poor people publicly."
or
"Ex-PHP developers that bash PHP are like the poor kids that win the lottery and then start bashing being poor publicly."
? Very different, IMO.
Re: Coding Horror: The PHP Singularity
#46http://xkcd.com/927/ s/standards/web app platforms/
Every time anyone suggests improving anything, or make another product in a crowded space, this comic is posted. The author of this article doesn't even suggest a new platform - he suggests improving a platform that exists to enable easier deployment. It was posted yesterday for Chocolat... do we really have to stop making editors?
In a site targetted to hackers and startups it is disturbing that people are so unwilling to learn something new, support a new product, improve the world, do anything new. Yes, redundant standards suck sometimes, but it's not always the case.
I wish that the comic author would consider deleting this from the server, or maybe pg could ban it.
Re: Coding Horror: The PHP Singularity
#47Oh great. Another PHP article, where we get to watch all of the defenders of Rasmussen's misbegotten spawn come out from under their rocks... "PHP works great for me! It runs tons of websites! I don't know what you're complaining about..." To address the article's point somewhat - there are already easy to deploy frameworks and languages for the web, and everybody who cares about development is already using them.
Re: Coding Horror: The PHP Singularity
#48I was expecting an elitist diatribe about PHP (because this is perennially popular amongst particular programmers) but that's not what this post is intended to be.
Interestingly Jeff does take the usual potshots at PHP almost like he thinks he'll lose street cred if he doesn't but the basic message I agree with: if you want someone to stop doing something you consider undesirable give them better alternatives.
That being said, I simply disagree with the premise. PHP has a lot going for it:
1. The CGI type model of creating everything, servicing an HTTP request and tearing everything down is a powerful one (and used in Python, Ruby and elsewhere). Once you go stateful (eg Java servlets) you have to worry about resource leakage;
2. PHP has a stateless core of API functions. IMHO this is basically ideal for Web programming given (1). It makes startup/teardown cheap and reduces resource usage (making it cheaper to provide for hosting);
3. Imperative programming is IMHO a natural fit for Web programming. One thing that's wrong with PHP is all the bloated OO mega-frameworks people create on top of it to try and make it Java, Rails, whatever; and
4. Inline code in HTML is a powerful technique. The learning curve for PHP is quite gentle.
So if you want to make a better PHP (something I'd encourage anyone to do rather than simply jumping on the PHP hating bandwagon) you should tick all the above boxes. Of course if you do this, you will probably want to fix some of the following:
- argument order consistency
- API function naming consistency
- default to HTML escaping on output
- effectively default to SQL parameter binding
- no register globals
- and so on
Side note: all of the above is well known. Pointing it out in yet another PHP hating blog post is both pointless and boring.
Jeff also asserts that PHP's popularity is sheep mentality. What nonsense. (1)-(4) above explain it far more than that, particularly the cheap hosting and inline coding.
I like to point out that 4 of the top 20 sites are built using PHP (Facebook, Yahoo, Flickr, Wikipedia) so--like it or not--it must be doing something right.
Homer (Simpson) once said "sometimes the only way you can feel good about yourself is by making other people look bad and I'm sick of making people feel good about themselves". I see a lot of that with (us) geeks but it's just so unproductive and pointless. You don't need to hate on "not X" to justify your choice of "X" (X = Python, Ruby, Lisp, Clojure, Scala, GPU type, phone type, tablet type, camera type, you get the idea).
EDIT: as far as Facebook goes, they didn't "give up" and use HipHop, they decided to have their cake and eat it too. They get the productivity benefits of programming Web pages in a "fit for purpose" language while getting most of the performance benefits of native code and they only had to give up some small subset of PHP to do it.
If you argue the subset thing is a problem try working in any C++ shop where using only a small subset of the language is de rigeur.
Re: Coding Horror: The PHP Singularity
#49Hey Jeff, let's throw down the gauntlet. You're obviously an experienced developer. I've been in the game for over 11years so should have enough experience to tackle you on this bigoted rant. You choose a problem that you think PHP can't solve[well]. You solve it using your high level language of choice and I'll solve it using PHP. Let's compare the outcome on reliability, ease of re-factoring, speed, whatever .. the…
I love that sort of phrase, I really do. It's so ... lacking in self-awareness. Really tells you a lot about the attitude of whoever utters it.
Re: Coding Horror: The PHP Singularity
#50Earlier quoted context omitted.
So, the problem with PHP is that it is popular? I guess it was the same crime that Java committed 10 years ago. And C++ before that. Makes sense - There's definitely a pattern of bashing the popular languages.
The problem isn't that it's popular - television programs about Bigfoot are popular, too. The problem is that PHP is extremely useful and easy to use in addition to being widely used. Reading the article, I was struck by its similarity in structure and language to classic Windows bashing rants of the past two decades - i.e. "the problem with PHP is that it has no taste." In fairness, the call to action is radically d…
Actually, I think it is exactly because it's popular. All languages have odd ends, but you rarely hear people rant over Pythons lack of lambdas and weird explicit "self" parameter or Ruby's incomprehensible scoping rules. I'm betting that once they fall out of fashion, we will.
And no, I disagree. The main sentiment of the article is negative. It's a call to figure out how to dethrone PHP, but without telling us why this would be such an important goal.