"I was coming from PHP. PHP was shit then and is still shit now."
I find it embarrassing that the community would vote up a story with comments like this. There is simply no need for it, and it shows nothing but a lack of articulation and outright immaturity.
If you don't like PHP, fine, but slamming it with one word insults does nothing but insult the tens of thousands of developers out there that use PHP to solve real world problems for a living.
Firstly, every time I see it getting slammed its nearly ALWAYS PHP in comparison to a framework whether it's rails, django, web2py or whatever. As soon as I see this I can't help but feel the author is just jumping on the "PHP isn't cool bandwagon". PHP isn't a framework, so don't compare it to other frameworks.
Secondly, it is possible to write good code using PHP - and many people do. It powers some of the largest sites in the world and there are more PHP web devs out there than any other working on millions of PHP sites. There are also some excellent frameworks for PHP that are quick to learn, fast and powerful. Codegintier, Yii or Symphony(2) all spring to mind.
Finally, for most web developers who actually need to earn a living writing code to solve problems, PHP is still the most popular choice for good reason. It's easy to earn, easy to deploy, cheap to host and widely used. There are also more PHP jobs (especially in the U.K.) than any other and it isn't changing anytime soon. For the busy developer trying to make a living these type of posts aren't really helpful at best and at worst quite insulting.
I'm not sure you should put "write good code using PHP" in the same paragraph with "some of the largest site in the world". Because they're the exact opposite.
Facebook, Wikipedia, Wordpress, all of them don't have a good PHP codebase. In fact, people despise them.
PS: for the downvoters, why the hate? it's the fact though. I'm not saying you cannot write good code in PHP. What I'm trying to say is that "big sites out there" are not a good example of "writing good PHP code".
"""Facebook, Wikipedia, Wordpress, all of them don't have a good PHP codebase. In fact, people despise them."""
You've seen Facebook's codebase? I doubt it.
And when you show me a blogging platform more successful than Wordpress, then we will talk.
Who exactly despises FB, Wikipedia or Wordpress? Not the users.
And while I can't talk about Wikipedia and FB (haven't seen the source), neither do Wordpress developers (including the tens of thousands of plugin authors) despise Wordpress's codebase.
Also, it's not about how well you like it, it's about what you can do with it, and especially what you users can do with it.
Yeah, Wordpress could have been written in, say, elegant Haskell. And then it would have gotten nowhere, because very few people could have got it working on their webserver or on a shared server platform. And it would have lacked tons of extensions that PHP gives it, from Imagemagick to LDAP to DB2 client libraries --or it would have to use some less battle tested, less popular and less mature Haskell equivalents.
Judge for yourself (you probably have to interpret what he said there since obviously he doesn't say up-front "it sucks" but the words he chose describe the situation).
Maybe despise is a strong word.
But what's your point? successful project so they must have good codebase or something?
My original post was that "those projects don't necessarily have a good code base" (thus you may want to choose other examples to show a better written PHP code base).
"""But what's your point? successful project so they must have good codebase or something?"""
I never implied that "because they are successful, they must have a good codebase". I actually made a different point, essentially asking in return:
What's a "good code base"?
Wordpress's, for example, is good at what it does, not in some idealistic theoretical way. Not only it resulted in a successful product (actually two: wordpress + wordpress.com), but it also has been proven stable (heard often of WP crashing mysteriously for any other reason that too much load and no caching which is totally reasonable?) and flexible to build upon (wordpress constantly adds features to its core and tons of developers add third-party add-ons).
I'd argue that "good" code base = flexible, extensible, successful, liked by IT'S developers. WP has had all of those. So, for THEIR PURPOSES and to THEIR DEVS, it is a good codebase.
On the other hand you implied that FB, WP, Wiki's code is bad. I tried to show that WP's at least is far from bad by MANY metrics. What are your metrics? Besides, say, proof by rigorous handwaving?
As for the FB presentation, he never says despise or sucks, as you mention. It's a classic presentation of some trade-offs. You'd have a selection of those even if you coded in Haskell or whatever.
Also, "Bezos pulled a Hitler". I'm all for writing that, say, politicians who you don't happen to like are just like the Nazis, but this is taking trivializing of that regime just a bit too far.
This happens as time passes and events slip in societies memories. There are increasingly fewer and fewer people who were around to witness the atrocities of the Nazi rule, and even the people who knew of it second-hand are slowly disappearing. There's two groups of people who use the word Nazi and Hitler to insult someone; the first group is full of idiots who should know better and the second group is full of people who were completely unaffected by the history in any way, meaningful or not.
People compare societies to Rome all the time, saying America or the western world is akin to the downfall of Rome, seemingly oblivious to the atrocities committed by various tribes ransacking the Empire. Not that I agree with comparisons to Hitler or Nazis, I think they're arguments of a weak mind, but history was a long time ago.
The worst language I've ever written commercial web sites in is called OOiS-Script. You can't release memory, there is no such thing as an array, functions doesn't exist, there is no scope, when you handle XML you have to strip all namespaces because it uses ':' as the indicator for trasversal, there is no XPath so you have to loop through the levels and with a mere 3000 files processed one after another you can run out of memory on a machine with 4 gig of ram because the memory is not released until the request is done, etc.
I've done some really nice stuff with this language. But it's still utter shit in so many ways it's painful. PHP is in many ways a lot better, but has some pretty fundamental flaws that still marks it as really bad. He did however, not say one thing about the developers that use PHP, so why would you slam him for that?
"but has some pretty fundamental flaws that still marks it as really bad."
What flaws are these?
"He did however, not say one thing about the developers that use PHP, so why would you slam him for that?"
I've spent well over a decade of my life developing solutions for real world problems with this "shit" language. I founded a business on this "shit" language 4 years ago and we are going from strength to strength. So yeah, I think I have every right to slam him for insulting me.
Some of the issues mentioned have been dealt with in PHP5 but a lot of the problems will probably be there permanently, such as inconsistent function names, arguments and return values mentioned at the top of the piece.
That isn't an insult to people using PHP. Much like I sometimes say that soda sucks without implying that soda drinkers suck, he's saying that PHP sucks without implying that PHP users suck.
When you insult something that is part of ones persona, you are insulting that person. Soda is an awful thing to compare to something that someone has spent a decade of their life expressing themselves with.
If all of what you've written is in earnest, then you've just insulted many soda lovers.
That said, the solution isn't to walk on eggshells around every topic that anyone could possibly have identified with. The solution is to be very, very cautious about making anything so much a part of one's persona that a stranger's critique of that thing feels personal.
Integers becoming 32-bit or 64-bit depending on CPU architecture, bad character-set support, comparison and identity is wacky. If anything of that has changed since last time I looked, all the better :).
He didn't insult you or slam you. He was talking about the language. You can make really neat things with a language that's really bad. Just don't take it personally.
Comments
"I was coming from PHP. PHP was shit then and is still shit now."
I find it embarrassing that the community would vote up a story with comments like this. There is simply no need for it, and it shows nothing but a lack of articulation and outright immaturity.
If you don't like PHP, fine, but slamming it with one word insults does nothing but insult the tens of thousands of developers out there that use PHP to solve real world problems for a living.
In defence of PHP:
Firstly, every time I see it getting slammed its nearly ALWAYS PHP in comparison to a framework whether it's rails, django, web2py or whatever. As soon as I see this I can't help but feel the author is just jumping on the "PHP isn't cool bandwagon". PHP isn't a framework, so don't compare it to other frameworks.
Secondly, it is possible to write good code using PHP - and many people do. It powers some of the largest sites in the world and there are more PHP web devs out there than any other working on millions of PHP sites. There are also some excellent frameworks for PHP that are quick to learn, fast and powerful. Codegintier, Yii or Symphony(2) all spring to mind.
Finally, for most web developers who actually need to earn a living writing code to solve problems, PHP is still the most popular choice for good reason. It's easy to earn, easy to deploy, cheap to host and widely used. There are also more PHP jobs (especially in the U.K.) than any other and it isn't changing anytime soon. For the busy developer trying to make a living these type of posts aren't really helpful at best and at worst quite insulting.
I'm not sure you should put "write good code using PHP" in the same paragraph with "some of the largest site in the world". Because they're the exact opposite.
Facebook, Wikipedia, Wordpress, all of them don't have a good PHP codebase. In fact, people despise them.
PS: for the downvoters, why the hate? it's the fact though. I'm not saying you cannot write good code in PHP. What I'm trying to say is that "big sites out there" are not a good example of "writing good PHP code".
A friend of mine recently left Yahoo in no small part because he hated working on their PHP codebase.
I don't know about the other sites you name, but if you had mentioned Yahoo you would definitely have had a point.
"""Facebook, Wikipedia, Wordpress, all of them don't have a good PHP codebase. In fact, people despise them."""
You've seen Facebook's codebase? I doubt it.
And when you show me a blogging platform more successful than Wordpress, then we will talk.
Who exactly despises FB, Wikipedia or Wordpress? Not the users.
And while I can't talk about Wikipedia and FB (haven't seen the source), neither do Wordpress developers (including the tens of thousands of plugin authors) despise Wordpress's codebase.
Also, it's not about how well you like it, it's about what you can do with it, and especially what you users can do with it.
Yeah, Wordpress could have been written in, say, elegant Haskell. And then it would have gotten nowhere, because very few people could have got it working on their webserver or on a shared server platform. And it would have lacked tons of extensions that PHP gives it, from Imagemagick to LDAP to DB2 client libraries --or it would have to use some less battle tested, less popular and less mature Haskell equivalents.
Facebook, Aditya Agarwal, presentation: http://www.infoq.com/presentations/Facebook-Software-Stack
Judge for yourself (you probably have to interpret what he said there since obviously he doesn't say up-front "it sucks" but the words he chose describe the situation).
Maybe despise is a strong word.
But what's your point? successful project so they must have good codebase or something?
My original post was that "those projects don't necessarily have a good code base" (thus you may want to choose other examples to show a better written PHP code base).
You're off by miles.
"""But what's your point? successful project so they must have good codebase or something?"""
I never implied that "because they are successful, they must have a good codebase". I actually made a different point, essentially asking in return:
What's a "good code base"?
Wordpress's, for example, is good at what it does, not in some idealistic theoretical way. Not only it resulted in a successful product (actually two: wordpress + wordpress.com), but it also has been proven stable (heard often of WP crashing mysteriously for any other reason that too much load and no caching which is totally reasonable?) and flexible to build upon (wordpress constantly adds features to its core and tons of developers add third-party add-ons).
I'd argue that "good" code base = flexible, extensible, successful, liked by IT'S developers. WP has had all of those. So, for THEIR PURPOSES and to THEIR DEVS, it is a good codebase.
On the other hand you implied that FB, WP, Wiki's code is bad. I tried to show that WP's at least is far from bad by MANY metrics. What are your metrics? Besides, say, proof by rigorous handwaving?
As for the FB presentation, he never says despise or sucks, as you mention. It's a classic presentation of some trade-offs. You'd have a selection of those even if you coded in Haskell or whatever.
Also, "Bezos pulled a Hitler". I'm all for writing that, say, politicians who you don't happen to like are just like the Nazis, but this is taking trivializing of that regime just a bit too far.
This happens as time passes and events slip in societies memories. There are increasingly fewer and fewer people who were around to witness the atrocities of the Nazi rule, and even the people who knew of it second-hand are slowly disappearing. There's two groups of people who use the word Nazi and Hitler to insult someone; the first group is full of idiots who should know better and the second group is full of people who were completely unaffected by the history in any way, meaningful or not.
People compare societies to Rome all the time, saying America or the western world is akin to the downfall of Rome, seemingly oblivious to the atrocities committed by various tribes ransacking the Empire. Not that I agree with comparisons to Hitler or Nazis, I think they're arguments of a weak mind, but history was a long time ago.
The worst language I've ever written commercial web sites in is called OOiS-Script. You can't release memory, there is no such thing as an array, functions doesn't exist, there is no scope, when you handle XML you have to strip all namespaces because it uses ':' as the indicator for trasversal, there is no XPath so you have to loop through the levels and with a mere 3000 files processed one after another you can run out of memory on a machine with 4 gig of ram because the memory is not released until the request is done, etc.
I've done some really nice stuff with this language. But it's still utter shit in so many ways it's painful. PHP is in many ways a lot better, but has some pretty fundamental flaws that still marks it as really bad. He did however, not say one thing about the developers that use PHP, so why would you slam him for that?
"but has some pretty fundamental flaws that still marks it as really bad."
What flaws are these?
"He did however, not say one thing about the developers that use PHP, so why would you slam him for that?"
I've spent well over a decade of my life developing solutions for real world problems with this "shit" language. I founded a business on this "shit" language 4 years ago and we are going from strength to strength. So yeah, I think I have every right to slam him for insulting me.
>What flaws are these?
Have you ever seen this piece? http://tnx.nl/php.html
Some of the issues mentioned have been dealt with in PHP5 but a lot of the problems will probably be there permanently, such as inconsistent function names, arguments and return values mentioned at the top of the piece.
That isn't an insult to people using PHP. Much like I sometimes say that soda sucks without implying that soda drinkers suck, he's saying that PHP sucks without implying that PHP users suck.
When you insult something that is part of ones persona, you are insulting that person. Soda is an awful thing to compare to something that someone has spent a decade of their life expressing themselves with.
If all of what you've written is in earnest, then you've just insulted many soda lovers.
That said, the solution isn't to walk on eggshells around every topic that anyone could possibly have identified with. The solution is to be very, very cautious about making anything so much a part of one's persona that a stranger's critique of that thing feels personal.
Integers becoming 32-bit or 64-bit depending on CPU architecture, bad character-set support, comparison and identity is wacky. If anything of that has changed since last time I looked, all the better :).
He didn't insult you or slam you. He was talking about the language. You can make really neat things with a language that's really bad. Just don't take it personally.