16 ms·
I'll offer an alternate hypothesis. Some companies are succeeding in spite of php. There are many, many users of php, and we'd expect that there would be consi
by brian-armstrong 10y ago
I'll offer an alternate hypothesis.
Some companies are succeeding in spite of php. There are many, many users of php, and we'd expect that there would be considerable variance, with some users doing awful (no traction, buggy sites, etc) and some hitting home runs (facebook). Because it's such a popular language, it will have users across this entire spectrum.
It's easy to cherry-pick the winners and miss all of the tremendous losers who picked php and got nothing for it.
- wyager 10y agoPrecisely. This is classic base rate fallacy. If tons of people use PHP because PHP devs are cheap, there are bound to be a ton of successes despite the fact that it's a horrible technology in many respects.
- chris_wot 10y agoPerhaps. But that rather begs the question. PHP has horrible bits, but in fact from what I've observed in the last year or so is that whilst it has in the past been fairly horrible, much of what made it awful can be entirely avoided. If you aren't following the PHP Framework Interop Group (http://www.php-fig.org http://www.php-fig.org) then you really should. I'd hazard that most of the warts in PHP can now be avoided pretty much altogether, and those that can't quite possibly can be worked around through configuration.
- brian-armstrong 10y agoAn easier way to avoid those warts would be to pick a different language
- ux-app 10y agoand miss out on all the awesome aspects of the language/environment?
- peteretep 10y agoWhat are "all the awesome aspects"? The being embedded in the web server and the benefits that brings I understand. The rest?
- justinhj 10y agoDisclaimer I worked on a large php app server that ran on about 50 servers and I miss it. The documentation is really good. A model for programming language documentation. Process per request is really simple to understand and scale. Your servers almost never crash completely, you don't get threads silently dying or run out of memory or thrash the CPU doing garbage collection. It runs like a tank. It will, for better or worse, just keep running when more fussy languages would have seg faulted or shut down The tooling, framework and libraries are very advanced and in active development It's easy to train a programmer in php It's close to the c library The combination of a very flexible array/map and functional programming tools like map and reduce let you write pretty declarative code and development can be very fast Php storm Facebooks replacement runtime I work with Java and Scala now which I also love but development is much slower and more expensive, whilst deployment is cheaper (less hardware for same request throughout)
- premium-concern 10y agoI stopped taking this seriously after "the documentation is really good". Not sure whether this is your real opinion or you are just making fun of people who say that.
- justinhj 10y agoWe can't argue objectively about an opinion but take a look at this typical page of the php.net documentation: http://php.net/manual/en/function.usort.php http://php.net/manual/en/function.usort.php It has everything I need to know about the function clearly laid out. The behaviour of sort when elements are the same. A list at the side of related functions that I may want to look at instead. I also like documentation that includes user contributions as these often add useful caveats and usage examples that don't fit well in the general documentation.
- anexprogrammer 10y agoPHP devs aren't expensive. Even good ones. It's easier to reroll in another language and retrain or recruit? No. So you probably mean for a new project. So now you've more maintenance and learning curve unless you just happen to have enough skilled in $NEWTHING. Not really easier. PHP is an inconsistent mess, everyone knows that, but it's cheap, widely understood, and it's perfectly possible to write decent maintainable code. There's ways to mitigate the chaos.
- collyw 10y agoTrue, I have seen one startup fail early because he couldn't find any (cheap) Django devs. He might have stayed around another year with the funding he had if he had gone PHP.
- foolinaround 10y ago> PHP devs aren't expensive. Even good ones. Would'nt the good ones logically move to a different language ( JS/Ruby etc ) where they could bill more?
- sethrin 10y agoMoney past a certain point is not an incentive. Retraining takes time. It's harder to land jobs for which one does not have relevant work experience. The PHP job market is larger than most other web programming segments, so work is easier to find. But sure, if you're hiring, I'd certainly prefer working with Ruby.
- wyager 10y agoIt's not just about the obvious "warts"; it's about the fact that PHP is not a well-designed language on the first place. A wart-free pig is still a pig.
- igravious 10y agoThat's a bit harsh on pigs.
- chiefalchemist 10y agoBest comment so far.
- Aldo_MX 10y agoWhich of the top languages is actually well designed? All of them have their area of opportunity.
- wyager 10y agoRust and Haskell are both extremely well designed. Most of the "top languages" by percentage usage are 20+ years old, so I can't fault them that much for being badly designed, but we should definitely stop using them.
- codedokode 10y agoRust looks very complicated to me because there are "lifetimes" and you need to think where to put those single quotes properly. Not a language for a beginner. Haskell doesn't support OOP if I remember correctly. And it is complicated too.
- steveklabnik 10y agoDue to lifetime elision, you rarely need to explicitly write lifetimes. I participated in the last Ludum Dare game competition, my game never used an explicit lifetime. That said, it is true that Rust has tricky parts. The domain is inherently complex.
- jamroom 10y agoI've gone one step further and created a template: Some companies are succeeding in spite of [insert language]. There are many, many users of [insert language], and we'd expect that there would be considerable variance, with some users doing awful (no traction, buggy sites, etc) and some hitting home runs (facebook). Because it's such a popular language, it will have users across this entire spectrum. It's easy to cherry-pick the winners and miss all of the tremendous losers who picked [insert language] and got nothing for it.
- chc 10y agoYour template is far less interesting than the original statement. PHP spent a pretty long time as basically the lingua franca outside the enterprise world (and even some places in it), and there are still domains where it holds that title (e.g. WordPress alone outweighs many languages' ecosystems), so the phenomenon the parent was describing applies more to PHP than to some arbitrary language you could insert into this template.
- jamroom 10y agoI actually agree with the original statement. PHP, for quite a few years now certainly has NOT been the language of choice for most startups, yet we still see the majority of them fail. "and miss all of the tremendous losers who picked php and got nothing for it" certainly applies equally across all languages in my opinion.
- chc 10y agoThat's not what was being discussed, though. The grandparent of your comment suggested that, yes, these projects were lifted up by PHP's un-fancy nature giving them focus. The parent of your comment was suggesting that, basically, the companies that have succeeded using PHP aren't any more numerous than we would expect to have come out of the massive PHP userbase even if PHP doesn't offer any advantages at all. The observation that "PHP, for quite a few years now certainly has NOT been the language of choice for most startups, yet we still see the majority of them fail" seems to be responding to a nonexistent conversation in which people were positing that startups based on other languages don't fail. Nobody here is saying that other languages magically make your business succeed.
- chiefalchemist 10y agoTrue. But they might have failed with any other choice. Technology is overrated. Yeah, it matters, Yeah it helps. But the right foundation won't save a shite product.
- pavel_lishin 10y agoBut the wrong foundation can tank a good one.
- apocalyptic0n3 10y agoThat's true of all languages, though. A truly good idea will generally find a way to succeed despite the technology it is built on, though. Look at Facebook, Slack, and countless others running PHP or Minecraft running Java and its apparently horrible code base (I've never seen it, so that is secondhand)
- michaelmrose 10y agoA number of things actually follow more logically than tech doesn't matter which is counter intuitive and counter to most other endeavors in life. - We aren't very good at judging the relative virtues of tech - Most tech is good enough to express most concepts even if not equally well. If its possible to express it even if it takes 3 times as much work and is only 70% as good you wont notice from the outside how much the tech mattered. - Good ideas are worth enough money to throw enough time/money at them to be moderately successful
- increment_i 10y agoIt would be an outlier company indeed who held an 'all hands on deck' meeting and said, "We're succeeding in spite of PHP everyone!" Only engineers care about programming languages. Seriously. That's it. No one else cares about them. I work in a large public university alongside a revolving door of student interns who are always 19. In 10+ years of work, I've still yet to meet the person who talked about their favourite website or app, but lamented that it was written in Php or JavaScript or Go or Java. It's only us (the HN'ers) who fret about this. Don't believe me? Imagine the look on everyone's faces at the tech publishing houses around 2009 when books about Objective-C sold a few hundred copies a year to doing tens of thousands per month when the iPhone rocked the world. This happened without a proper language hot stove on Hacker News, no? People care about outcomes. People care about products. People care about being dazzled. People care about showing their friends this incredible thing they saw on the web/this new app.
- michaelmrose 10y agoDoesn't it stand to reason that the people that actually know how things work under the hood are the people that care about such things. You could say the same thing about cars people don't care about what sort of engine is under the hood or how it works they just want to go places! It doesn't then follow that all cars are the same and you are just as well getting any one of the millions of cars or even any one of the models out there.
- increment_i 10y agoYou have a logical point for sure. I think it might be an apples to oranges comparison in this case though. I just don't know that building cars is the same as building websites and apps. I know Php and JavaScript can respond to an HTTP request. I don't know how to optimize an internal combustion engine. There's probably parallels in terms of expertise with software developers, but I can't be sure.
- pif 10y ago> I just don't know that building cars is the same as building websites and apps. Indeed it isn't. "Maintenance" has opposite meanings in those worlds: maintaining a car means keeping its original functionalities still available; maintaining an application means letting it evolve.
- jwatte 10y agoDelivering enough value to users, faster and cheaper than the competition, wins. The language you use pay second- and third order dividends, but most battles are fought and won on first order. I'm a C++ developer, have shipped Java and C# and Haskell and Python and a bunch of other code in production. If a friend asks me to spin up a website for him/her quickly, I'd still do it in PHP. Horses for courses.
- eyelidlessness 10y agoWhat does PHP offer, now, that a static site generator doesn't? I'm going to guess Wordpress, WYSIWYG editor, simple uploads. But if that's not it, I'm genuinely curious.
- bbcbasic 10y agoDynamic content.
- vatotemking 10y agoUnderrated comment. To expand on this, static website generators are best for generating documentation and small blogs. It falls apart when you have a large often-changing content. This is where PHP is still king of the web.
- guitarbill 10y ago> large often-changing content. This is where PHP is still king of the web. PHP is still widely used, but there's a myriad of other contenders: Java, ASP.NET, Python (Django,Flask,etc), Ruby (Rails), Perl, Javascript (Node,etc) and others. I'm not sure about PHP being the "king". PHP might be the most widely deployed thanks to either FB or the huge number of legacy bulletin boards and wordpress sites, but in terms of new deployments does it still dominate? Probably not. (For novices, a static site generator is definitely the way to go, until you run into it's limitations.)
- 10y ago
- trevelyan 10y agoBrian, do you have any examples of companies that failed using PHP that you think would have succeeded with another interpreted language, and what problems did they run into that gave you this judgment? Asking as I've developed in a slew of languages and never found the PHP-bashing credible. Most of the complaints seem to come from Rails people, but there are no shortage of MVC frameworks in PHP, including at least one that is a direct clone of Rails.
- flukus 10y agoI've seen plenty of companies fail (or at least stall) because of technical debt. PHP certainly isn't to blame for that but it doesn't exactly lead by example either.
- gdudeman 10y agoI to have seen plenty of companies flail and get bogged down because of technical debt and a just get it done culture. It's really hard to begin with a "yes it's a mess, but it works" culture and transition to anything else. Plenty of A rounds have been spent trying to make a sand castle taller. This is not unique to php - I'm sure you can do it right - but it's more common to it.
- paulriddle 10y agoI think it would be hard to provide such an example. Mostly because most companies that fail don't do it because of technology but rather because of the nature of their product itself, people, or money. And language plays a part in it but not a particularly noticeable one. Another reason is that failures tend to be silent and we don't pay attention to silent things.