6 ms·
I really could not justify not doing web stuff in PHP anymore. PHP is THE web language. No, Ruby is not going to take over, and no, python is not going to take
by maxklein 17y ago
I really could not justify not doing web stuff in PHP anymore. PHP is THE web language. No, Ruby is not going to take over, and no, python is not going to take over.
Those two would have been the main contenders for the space, but they both had their shot and their 15 minutes of fame, and rather than rapidly growing to dominate web development, they nichified.
PHP however is being improved, being cleaned up, and most importantly, being speed optimised.
PHP is what you can trivially easily outsource - try to do that with python or ruby.
This right here is basically the move that is going to cement PHP as the web language. The largest sites are using PHP and are going to stay with PHP. Nothing will take over from PHP. The battle is over.
- Zak 17y agoPHP is what you can trivially easily outsource Yes, you can... but be careful - you might end up with this: http://paste.lisp.org/display/76132 http://paste.lisp.org/display/76132 That's real production code I removed from an application I was hired to extend and debug. Eventually, I convinced the client to scrap it and let me write a replacement with Rails.
- ams6110 17y agoSadly that resembles most of the ASP/PHP code I've ever worked with. The very low barriers to entry of PHP and ASP means you have (had) a lot of very inexperienced folks writing code. That said, I agree with the original point that PHP can be very productive. No compiles, no builds... just edit code/refresh browser to immediately see the effect of a change. That's nice if you have the discipline to not do stuff like the linked example.
- Zak 17y agoIt's important to note that the above-linked code could be written in any language that has printf or something like it. That includes Lisp, Python and Haskell. Of course, people who know those languages don't write things like that. I think it's due to pg's "Python Paradox"; I'm inclined to think outsourcing is actually easier with "smart" languages because the percentage of bad providers will be very low.
- deleted 17y ago[deleted]
- robryan 17y agoI think for people looking for outsourcing to it probably comes down to price, on average it's going to be cheaper to get get some php that works that get some python that works. Just look at rentacoder and the like, most of those people don't care how it's written or think about how much trouble the code base could give them in the future as long as it get's done and works.
- Jach 17y agoI think one of the problems comes from trying to use PHP too heavily as a template language, and then people try and do the shortest thing possible even if their source looks horrible. (I know I've done some icky things in the past to make the HTML look nice at the expense of the PHP file looking worse, or vice versa.) It's very easy to fail in separating code and visible content in PHP, which is great for some cases but bad for others.
- Zak 17y agoWhat I initially wrote to replace The Printf wasn't exactly pretty; it was a PHP function containing mostly HTML, with a few snippets of PHP interspersed. I consider that sort of thing excusable, especially if there's external time pressure. There's not much of an excuse for using an impenetrable 22-arg printf call to generate a table row though.
- sailormoon 17y agoNice troll, but there are a ton of websites being developed in Ruby/Rails these days. I don't think it's nichified at all, and the number of job ads is going up, not down. Ruby is being improved and sped up too, in case you hadn't noticed. As always, use the best tool for the job. For an awful lot of small business sites - where PHP got its start - that is now Rails, and it's slowly emerging in larger projects too. I think Ruby will definitely give PHP a run for its money in the fullness of time.
- maxklein 17y agoThat's what you believe. I believe something different. I believe that these languages had the chance, and it didn't happen. Technology rarely gets a second chance without some type of major change.
- sailormoon 17y agoYeah, that's why I said "I think ..". Your statements were in the tone of stating facts, hence my rebuttal. Anyway, I think your dismissal of the newer languages is very premature. PHP took a long, long time to get where it is. 10 years ago you would have been saying "Perl has WON!!!"
- sanswork 17y agoYou realize Python is older than PHP and Ruby is the same age right?
- sailormoon 17y agoYeah. PHP and Ruby are contemporaries; I shouldn't have described it as "newer". But I would argue that unlike PHP, which was crude but useful right from the beginning, Ruby took a long time to gestate. It's only really in the last few years that Ruby's made the transition from enjoyable academic plaything to serious tool. And let's face it, we needed to wait that long for computers to become fast enough to run it ... ; ) But now, there's an astonishing amount of development and innovation surrounding Ruby. Look at MacRuby, for example - if that isn't a vote of confidence I don't know what is. In my opinion, the language is only just beginning to properly hit its stride. Who knows what will happen. Ruby might fail to gain critical mass, of course. But my point was that the OP's assertion that Ruby had tried and failed to make its mark is very premature. The Rails hype might have died down but from my perspective Ruby has more momentum than ever.
- grandalf 17y agoThere are a few narrow cases where I'd choose to do a project in PHP, but very few. It is possible to write nice clean code in PHP, but few apps I've ever seen do so. Most use includes like function calls all over the place, so there is no notion of what variables will be used or defined inside the included code. Ruby to some extent, and especially Python, are designed so that your code looks good and is easy to read. Admittedly some people can write highly obfuscated Ruby, but that (fortunately) went out of style a few years ago.
- maxklein 17y agoThe average programmer does not use Ruby or Python. He uses Java, PHP or C. And the programming world is dependent on the average programmer.
- seiji 17y agoI think the problem is you state your opinion as absolute fact. Your model for programming appears to be 10,000 monkeys typing away at the specifications handed down from On High. PHP does work in that scenario. It's simple. It's easy to think in because it's so simple. You can do complex things, but it'll be by gluing infinitesimally simple parts together over and over and over again. (Think of PHP programs as an essay written by a 2nd grader. Lots of simple sentences. Lots of repetition.) If all you have available is a bulk of mediocre people, then PHP is a great way of making sure they produce what you want right now. Of corse, in this process, they will remain mediocre and never become more than your "average programmer" stereotype due to being forced to only think in the absolute simplest terms.
- ryanwaggoner 17y agoI don't agree with you, but I find it sad that your comment has been voted down below 0. Is this what HN has come to? We just vote stuff we don't agree with down?
- jonursenbach 17y agoThat's the point of the karma system.
- jodrellblank 17y agoI can't tell if you're trolling, but that's not the point of the karma system; that being to vote up "good contributions" that you would like to see more of at HN and vote down "bad contributions" which you would like to see less of at HN, regardless of whether you agree with them or disagree with them.
- spudlyo 17y agoPeople might have voted the comment down because they thought it was obvious trolling. Personally I'm not interested in yet another conversation on merits of PHP vs other scripting languages.
- Kilimanjaro 17y agoThe writing is on the wall, javascript is THE web language, php will be THE legacy web language. The train is just leaving the station, be sure to get the best seats.
- maxklein 17y agoI actually agree with you. Javascript is next in line. But it's not yet its turn. It will come soon, though, but what's the point in jumping off the dock on a boat when the boat has not arrived yet?
- _pius 17y agoAre you serious? I'm not trying to be flippant, but I literally can't tell if you're joking or not.
- maxklein 17y agoYes I am serious. The most widely used and supported web language is likely to remain the dominant language on the web and will not be surpassed by tiny niche languages. That statement is one I would describe as reasonable.
- _pius 17y agoThat statement is indeed reasonable, but some of the other stuff you said wasn't. For instance, your assertion that Ruby and Python are "tiny niche languages" is false. You also used hyperbole like: "Nothing will take over from PHP. The battle is over." It seems hard to believe that this was being said with a straight face. I know how you like to jerk the Hacker News community around at times, so I thought it prudent to ask if you're being serious. :) * http://news.ycombinator.com/item?id=1038779 http://news.ycombinator.com/item?id=1038779
- maxklein 17y agoI wish I could find more of these, but ruby and python are indeed tiny compared to PHP: http://www.zacker.org/files/market_share_graph.jpg http://www.zacker.org/files/market_share_graph.jpg My judgement call is that the battle is over. I may be wrong, but I am on the right side of wrong. If I turn out to be wrong in the future, I'll look back and still think I made the right call given the data I had. It has been a while since I decided to learn python and django. At the time I thought they would take over. Well, I was wrong. They have not - PHP has continued to grow faster than they have. So this time my call is that PHP is the thing to stick to, particularly when I see moves like this one facebook has. In any case, this choice I made is the safe one. I can't lose by making this decision.
- _pius 17y ago
- henrikschroder 17y agoObligatory: http://i.imgur.com/1gF1j.jpg http://i.imgur.com/1gF1j.jpg