Earlier quoted context omitted.
Hey, at least he's not just ranting like everyone else; he's trying to bring forward a better alternative. I'm also a PHP dev and I think Python is the safest bet, since it has good support on all platforms already (including Windows).
He started with a highly contentious premise that he declared as fact. Many, like me, disagree with that premise, and so consider that he is at best trying to fix a problem that either doesn't exist or doesn't require a drastic fix like he proposes, or at worst is very cleverly tapping into a vein of contention to hype an up-coming product. The thing is, with those who do genuinely rant against PHP, at least we can h…
Coding Horror: The PHP Singularity
131–140 of 341 posts
Re: Coding Horror: The PHP Singularity
#132"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."
That's a terrific point. Alas, it is at the bottom of what is basically another of the "PHP sucks" posts, of which he says we already have too many. And now this comment thread is hip-deep in "Shut up, PHP works fine" posts.
I'm self-taught on Python, and I love it, but as I've moved freelance I've had to learn PHP, and I . . . don't love it. It is what many of my clients use, for reasons that seem good to them, so there you go. I don' enjoy learning it and using it the way I enjoy Python, but as a professional that's Just Too Damn Bad. So I'm kind of with the people irritated by the PHP bitching.
But I wish that Python had those characteristics that make PHP ubiquitous. I'm too new to really state what these are, and I imagine there are some good design reasons for avoiding some of those patterns. But anyone preferring that something like Python or Ruby should see wider adoption has to consider the aspects of PHP that have supported its prevalence, and compete on those aspects.
I am going to guess that Jeff felt the need to critique PHP because he thought there must be some justification for duplicating those functionalities of PHP. I think the community is at a consensus that there isn't, and shouldn't / couldn't be, One True Language, and that it's okay to choose the proper tool for a particular job. And if that's the case, why would it make sense to revise Python or Ruby to duplicate stuff that's already done well by PHP? Why insist that any one language do everything? The best argument would be that PHP gets a lot right, but couples that to a lot it gets wrong. And whether or not that is so drives the question of whether some other language should trouble itself to duplicate the stuff PHP gets right.
It might be enough to say that some people / many people don't like PHP very much and wish that other tools were more prevalent. Among such people, the questions then are: 1) are we just being jerks, is there really that much to be gained by getting away from PHP? and 2) how do other languages have to change (technically, the installed base / trained developer population arguments are beyond this discussion) to compete? And I think the two questions are related. If it isn't hard to make Python as deployable as PHP, then we needn't gain much to make it worthwhile. But if those changes are hard, or they somehow introduce into Python anti-patterns of some kind, or shift the community focus in some negative way, then we would have to see much larger gains to make the shift worthwhile.
I hope Jeff reviews the reaction to this and responds with another post, one that explores why PHP is so frequently adopted. (Again, it's best to put to one side the issues of widespread developer knowledge and default configuration in support of it, if a better alternative is built those things will move.) And, what are the challenges of adapting Python / Ruby / Perl to competing on those technical aspects? And what are the technical / community risks of making those adaptations? At that point I think he's moving the discussion in a much more constructive direction.
Re: Coding Horror: The PHP Singularity
#133I agree with Jeff that the way to replace PHP is to create a better alternative. Not just for PHP itself, but more importantly to stuff like Drupal and Wordpress and Magento.
Yet this is isn't happening. Django and Rails are about 7 years old (Python and Ruby both pre-date PHP) and haven't produced any CMS or blog engine remotely comparable in popularity.
How come? Maybe because perception of PHP differs so greatly between people who code and people who write about coding.
Re: Coding Horror: The PHP Singularity
#134Ok, so here it goes. I haven't commented on this site for over a year. Full disclosure: I am an average programmer compared to many here. I come to this site to improve my self and read about what brilliant and amazing things you all do. Now you have a reference. I use PHP on a daily basis, have been for years. I am a freelance developer who has been able to carve out a living with a lot of hard work and a lot of luc…
What other languages besides PHP have you used? I think a lot of us dislike PHP because we're putting it in the context of better designed languages.
Re: Coding Horror: The PHP Singularity
#135PHP is basically the latest example of "Worse is better"( http://en.wikipedia.org/wiki/Worse_is_better ). ---- Simplicity: The design must be simple, both in implementation and interface. It is more important for the implementation to be simple than the interface. Simplicity is the most important consideration in a design. Correctness: The design must be correct in all observable aspects. It is slightly better to be…
. . .
I don't know about you, but IMHO, this is PHP in a nutshell.
If you had read some of the criticisms of PHP that had been posted to HN (like http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de..., which was even linked to in the current article), you'd realize that PHP is nowhere near consistent. I'm not sure simplicity, correctness or completeness apply either. I think the only thing PHP has going for it is momentum (in having a large userbase and being installed almost everywhere).
Re: Coding Horror: The PHP Singularity
#136Hey 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…
Congratulations! You just Blub Paradox'd yourself. At this point in your knowledge cycle, you are unable to understand something more complex than what you already know. Knowledge is power. Defending your own knowledge by refusing to expand and learn something new is cutting yourself off at the knees (or fingers, as it may be).
Re: Coding Horror: The PHP Singularity
#137Earlier quoted context omitted.
Please don't use Facebook as an example, the fact they gave in and built HipHop to get it into C++ spoils it. Are they coding in PHP? Sure! Are they actually using it like it's meant to be used? Not quite!
Hey. I work on Facebook's PHP toolchain, HipHop, which these days includes a debugger, interpreter, JIT compiler, and the ahead-of-time compiler. The fact that the AoT compiler uses C++ as a target doesn't change the input language, which really is PHP. E.g., $i = 0; $a[$i] = $i++; makes a different array than $i = 0; $a[$i + 0] = $i++;. We have to get all the nooks and crannies right because we use significant open…
Re: Coding Horror: The PHP Singularity
#138Earlier quoted context omitted.
For pretty much every language these days, there is a hosted service that will handle deployment for you, and you can just push code to them and they'll take care of the rest. Better yet, they're perfect for beginners, who usually don't know much about database tuning, firewalls, etc.
Which kind of leaves me not understanding how it's deployed, etc., which I kind of feel like I need to know. There isn't any one perfect solution, just workable ones.
Perhaps it's best if you either completely take deployment into your own hands, or you let someone else do it for you. Given all that, rolling your own could still be made simpler.
Re: Coding Horror: The PHP Singularity
#139Earlier quoted context omitted.
"Finally, let's use his tool analogy. PHP is a double-clawed hammer. What if your job was to remove nails from wood all day?" Brilliant.
Not brilliant. You can use a regular hammer just fine to pull nails out of wood all day AND to nail the occasional one in should the need arise.
Re: Coding Horror: The PHP Singularity
#140Hey 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…