This makes me love PHP more. If that was possible.
He just gets it. If you want to spend your days drawing UML, writing documentation and unit tests. That is dandy, but you're in PHPLand now. This is our land, and we dont care about no freakin' memory leaks.
Yet Wordpress is still the most widely used blog software ever. PHPBB and it's ilk still run the forum game. Wikipedia has yet be unseated.
If it's cost > it's profit, why is it still used so widely?
I recently replaced a C#/.NET app with a PHP version and saved a company close to a million a year in licensing, servers, staffing and development costs. Not to mention it took my team a third of the time to develop as the original application, yet performed better and had more functionality. There was a significant gap in LoC as well.
Yet Wordpress is still the most widely used blog software ever. PHPBB and it's ilk still run the forum game. Wikipedia has yet be unseated.
If it's cost > it's profit, why is it still used so widely?
Network effects, data lock-in, asynchronous information exchange in markets. Just because something is rationally better doesn't mean that the market actors are rational.
That said, companies like EA, Apple, and Amazon license Jive Forums (which is not cheap), Confluence, et al for a reason.
I recently replaced a C#/.NET app with a PHP version and saved a company close to a million a year in licensing, servers, staffing and development costs. Not to mention it took my team a third of the time to develop as the original application, yet performed better and had more functionality. There was a significant gap in LoC as well.
Your anecdote is a personal anecdote, coming from the person most likely to have a particularly jaded view of both the short and long-term costs involved.
We dropped PHPBB and moved to Jive Forums several years ago, as the costs of weekly updates and surprisingly regular break-ins easily outweighed the cost of licensing Jive's software. However, moving away from the forum required data migration, which was difficult and time consuming.
And that's not a personal anecdote? You aren't particularly jaded? I don't understand why I would have a jaded view of the short and long term costs involved. You'll have to explain. I'm not a PHP developer, btw. I consult across a wide variety of technologies and have done so for the last 15+ years. I would have certainly been better paid for that particular gig had I stuck with C#.
It would make sense that Apple and Amazon use Jive since all of their web properties are largely Java based, why step outside of a core competency?
And just to be clear, I would never recommend any PHP forum software (just ask the exasperated folks @ Massify), mostly because I think they are functionally retarded and security is a joke. But that has little to do with PHP than it does with the way they are written.
Maintaining PHP apps can be a pain and the language isn't the prettiest to work with.
However, PHP has created a world where millions of people can create basic web applications, which has led to the creation of tens of millions of new sites and applications, some of those which have changed the world.
PHP has allowed more people to code, which has allowed the world to test many more ideas, many of which have created tremendous value that I think far outweigh the costs.
- A world that has PHP and enabled web developers.
- A world without PHP in which only Java EE-enabled engineers can write webapps.
I think that's a demonstrably false assessment. A language as poorly designed and implemented as PHP isn't necessary to be accessible to "millions of people" -- in fact, does the opposite in enabling them to make serious and expensive mistakes.
Yet the fact of the matter is that's how the cards fell - we had the well-designed, well-implemented languages and frameworks that failed utterly to find any foothold with amateurs and beginners, and only found refuge with the Java EE-enabled engineers.
And then we had PHP.
I'm inclined to side with the parent poster - yes, PHP has a lot of problems when you attempt to make it overly complex, but on the other hand it has introduced many people to programming who would otherwise never have even attempted (or even be able to), and driven ubiquitous web scripting forward single-handedly. Heck, even today, think about someone trying to run a blog - anyone reasonably experienced with a computer can buy hosting and install WordPress with almost no work... try that with anything written in Python?
PHP has a very low barrier to entry, and IMHO a lot of the hate directed at it is frankly jealousy. We are jealous, as professionals, that it is deadly simple to replicate some of our hard work, and that the people doing it are amateurs. This is the same reason people heap hate on VB.
I'm inclined to compare PHP to MySpace - yes, MySpace pages aren't pretty, in fact a lot are downright atrocious. You can make some specious claims about how MySpace-inspired "web design" has made the internet a worse place, somehow, but it would be a pretty thin argument. At the end of the day, both PHP and MySpace opened up a world of possibility to a lot of users who didn't have it before; picking at it really is just being pretentious and elitist.
Yet the fact of the matter is that's how the cards fell - we had the well-designed, well-implemented languages and frameworks that failed utterly to find any foothold with amateurs and beginners, and only found refuge with the Java EE-enabled engineers.
When did we have all that? In 1995, when PHP was started, I remember having Perl, shell scripts, and C server-side CGIs.
I don't recall significantly better viable alternatives becoming available until quite some time later.
I don't think you're looking holistically at the environment of building a dynamic website with no experience at all programming, which is what I think this conversation is about.
If you can, put aside all that you know about language design, frameworks, and software engineering, and try to think from the perspective of a person just wanting to "get something up". Say you want an online store. An online store requires a shopping cart. You ask google how to do this, and google tells you: How to build a shopping cart with PHP. For whatever reason, php was chosen by the internet gods to be the beneficiary of a positive feedback loop: beginners use php, find it easy to use, write tutorials. Tutorials attract google, which means the community is likely to be less of the programmer type (programmers would already know how to do these things in python) and more of hobbyists/internet entreprenuers with little technical skill. Because this community is comprised of less technical people, they are more understanding of the shortcomings of n00bs. They turn away less "stupid" questions, write more tutorials and abstract more of the academic attributes of programming that "make it work". By virtue of attracting so many people, inevitably, there will be some truly capable practitioners that will go on to have success. Derek Sivers of CD Baby fame is one I can think of.
The point i'm really trying to drive home is that the accessibility of a language isn't just about being easy to learn, but about having a welcoming community and environment that helps new users.
Think of all the cool stuff they could have been inventing had they not needed to look up the name of strfind(?), and whether it takes the needle or the haystack first.
So what. Tell me you never use the man pages for the standard C library.
There's a whole generation of programmers out there that couldn't hack their way out of a wet paper back without the help of an IDE telling them what function parameters go where.
And in C I also still can't remember if the fwrite call takes (buffer, sizeof(element), nelements, fp) or (buffer, nelements, sizeof(element), fp).
This is all about religion, the PHP church has a large number of followers and it's 'bible' contains some arguably wrong pages, so those in other churches will go out of their way to shake their heads at all the fools in the PHP church when it's clear to everyone else that their religion is broken.
Meanwhile the PHP guys will simply get the job done and take home the loot.
I can program in lots of languages but for quick & dirty stuff (and don't tell me everything you write is of world class importance) it is very well suited, if you're disciplined you can take it to considerable heights before you run out of steam.
I have to use the man pages for most languages when I'm learning them. PHP is fairly unique among languages I've worked with (and that doesn't include C) in that I have to keep using the man pages even after I've become fairly fluent with it.
In Python, by contrast, that fwrite call is just:
fp.write(text)
In some ways, the religion metaphor is pretty apt, since the strongest critics of a religion are usually those raised in the religion who consciously reject it once they realize what else is out there. I learned web programming with PHP, and I've done several fairly large projects with it (the largest had ~100k registered users and ~250k hits/day at its peak). I ended up hating it enough that when it came time to look for full-time positions, I explicitly said "no PHP" and disqualified any jobs that used it.
(And actually...of late, everything I write is of world class importance, but that's an artifact of my current project and the fact that it's sorta taken over my life. I used to write quick & dirty stuff much more often, and I usually used Django for it.)
I'd argue that being in a market that people wanted made you money, not PHP. I dunno what the timescale of your successes was - I think PHP actually was the best option for webapps between about 1998 and 2004 - but there are better technologies available now.
Java and C++ made me money, PHP made me bupkis. Python at least is fun.
This is all about religion, the PHP church has a large number of followers and it's 'bible' contains some arguably wrong pages, so those in other churches will go out of their way to shake their heads at all the fools in the PHP church when it's clear to everyone else that their religion is broken.
This "we get it done, everyone else doesn't, ergo X is better despite its flaws" logical faux pax drives me up the bloody wall.
We all know that brand 'x' is 'the best' possible tool available.
So why doesn't everybody use brand 'x' ?
Well, because some people have gotten used to brand 'y' and it is good enough for them.
What's better doesn't enter in to it. There is a minimum level of performance required for the job and both tools meet those requirements, so both are valid tools to solve the problem with.
Which one is the 'better' one is a matter of perspective, and in that sense there are as many truths as there are observers.
He just gets it. If you want to spend your days drawing UML, writing documentation and unit tests. That is dandy, but you're in PHPLand now. This is our land, and we dont care about no freakin' memory leaks.