4 ms·
That's one of the problems with the now-famous Fractal blog, I think: It was a joy to read in the sense that being a Python programmer, it only heightened my ap
by sho_hn 14y ago
That's one of the problems with the now-famous Fractal blog, I think: It was a joy to read in the sense that being a Python programmer, it only heightened my appreciation of the achievement that languages like Python and Ruby represent. It's what conscious, determined design gets you and what mistakes they managed to avoid.
But it's preaching to the choir. If you've never seen anything other than PHP, you won't understand two thirds of the list or why they're problems. (<- Not looking down on PHP coders there, rather I'm thinking back to when I started out on PHP and am speculating on how I would have received the document.)
How do we communicate effectively what makes other languages better to someone with no reference frame other than PHP itself?
- alxp 14y agoMost PHP developers don't start their first programming project from scratch using PHP to write their first web app. It's far more common to start because you are running a blog on WordPress and you want to make some small change. Then you make another and another, then you're writing plugins and suddenly you're a programmer and PHP is your language. So to encourage developers to start with something other than PHP you'll need to lower the barrier to entry to modifying existing software, and also make something as popular and widely useful as WordPress and MediaWiki. This is going to take a while.
- sho_hn 14y agoVery true, that's how I started out as well (though neither WordPress or MediaWiki existed back then).
- AncientPC 14y agoI did a lot of PHP over the years, trying to migrate over to a Python web stack. A big hurdle is ops dev. All hosting services support PHP out of the box. Now I'm faced with the "distro choice". Which server do I use (lighthttpd / nginx / tornado)? Which framework (django / flask / web2py / cherrypy / pylons / pyramid)? Like the original author, I've had a VPS sitting unused for 2 months paralyzed by choices. I eventually decided on nginx / flask, but haven't had the time to set it up. Maybe I should have just used Heroku. shrugs
- eric_bullington 14y agoThe same choices exist for PHP, although you may not be aware of them. PHP runs on all the servers you mentioned, and there are many, many frameworks in PHP (although admittedly not quite as many as in Python). Just choose one and learn it. They're all excellent web servers. I'd recommend going with Flask or Django in the beginning, simply because they have the best documentation. web2py also has pretty good documentation. The only problem with Django and web2py is that they are monolithic. If you don't like their ORM, or templating engine, or authentication/authorization, it's generally hard or impossible to switch, and if you do switch you lose all the benefits of the integrated system. With Flask and Bottle, on the other hand, you are free to pick and choose components. I think the same modular design approach is used by Pylons and Pyramid, but I'm not sure since I've never used them. But as you learn more, there's a lot to be said for being able to switch out components of your framework, or even writing your own in a pinch.
- wvenable 14y ago> If you've never seen anything other than PHP, you won't understand two thirds of the list or why they're problems. Two thirds of that list are actually incorrect. But I programmed in Java, C++, C, VB, and so on before I started coding in PHP many years ago. So many years ago, in fact, that PHP was easily the best choice. The problem with lists like that is they obscure the truth -- and that is -- that solving a programming problem in modern PHP isn't really that different from solving it in Python and Ruby. It's just not that much of a leap.
- sho_hn 14y ago> Two thirds of that list are actually incorrect. Got a link to a good rebuttal?
- wvenable 14y agoAnthony Ferrara did a rebuttal here: http://blog.ircmaxell.com/2012/04/php-sucks-but-i-like-it.html http://blog.ircmaxell.com/2012/04/php-sucks-but-i-like-it.ht... Not a good rebuttal but I've done my own here: http://news.ycombinator.com/item?id=4177516 http://news.ycombinator.com/item?id=4177516
- dools 14y agoThat rebuttal is fantastic. I never actually got through the entire "fractal" article - having read your rebuttal just now I can say I'm glad I didn't waste my time, thanks :)
- maratd 14y ago> How do we communicate effectively what makes other languages better to someone with no reference frame other than PHP itself? You're trying to convince yourself that you made the right choice, the right investment. That's sad. Have confidence in yourself. You made the right choice for yourself and let others choose for themselves. There is no universal proper language or platform to use. PHP works and it works extremely well for many companies. Its commercial success is not debatable. Python on the other hand ... aside from Google, who's using it at a massive scale? Even Google has been shifting to Java for a long time. See how that works? Let's stick to the old parable. A proper tool for every job. If you're convinced that there is no proper application for PHP, then you're not even trying to be objective ... you're just trying to make yourself feel better about the choices you made.
- sho_hn 14y ago> You're trying to convince yourself that you made the right choice, the right investment. > That's sad. Err, huh? What's with the preachy tone and the presumptuos attitude there? No, I don't need to convince myself, nor am I looking for confirmation - I know that I'm happier coding in Python than I was coding in PHP, that I get more done in less time, that I've vastly increased the average reusability of code that I write, and that it blows up less in production. > Have confidence in yourself. You made the right choice for yourself and let others choose for themselves. That's not what this is about. It's about how I didn't make a conscious choice to use PHP back then - nor would I have if I had been in a position to make a choice. I believe the same is true for many others, so how do we get to a point where they have the facts to make a choice? > Python on the other hand ... aside from Google, who's using it at a massive scale? Even Google has been shifting to Java for a long time. Shrug. It's you who's playing up the PHP vs. Python angle here, really -- for me there's plenty of stuff out there that's better than PHP, not just Python. > If you're convinced that there is no proper application for PHP, then you're not even trying to be objective ... you're just trying to make yourself feel better about the choices you made. Actually I think there are circumstances where PHP is the right choice, though it's mostly a matter of market considerations, certainly not technical strength.
- 14y ago
- smsm42 14y agoI've programmed in C, C++, PHP, Python, Perl, Java, Javascript, Prolog and probably could program in any general purpose language out there given some training and enough motivation. I still "don't understand two thirds of the list or why they're problems". I.e. not that I can't literally understand what the complaint is about - I can't understand why it's anything special to PHP and why it's a PHP problem as opposed to agressive exaggerated "don't make me actually learn anything that contradicts my preconceived notions" stance. PHP has its own quirks, so has any other language out there. I do not see a big deal about it. The idea that disagreement is because person disagreeing is not educated enough and only if he could learn The Next Best Thing he'd immediately become a fanboy like you are - is deeply fallacious. I've seen your Next Big Thing. It's nice. So are other hundred Big Things. They are all nice, and all have its place. And no, I'm still not a fanboy, sorry. I still think Python is a nice language for its uses, and PHP is a nice language for its uses. Banality, but somehow so many people can't grasp how can it be. Please believe me, it can.