7 ms·
Yeah! Haha the joke's on Facebook, Wikipedia, Flickr, Yahoo! Answers, Photobucket, Digg (RIP), etc ... Those fools have been using a joke language and didn't ev
by jtreminio 13y ago
Yeah! Haha the joke's on Facebook, Wikipedia, Flickr, Yahoo! Answers, Photobucket, Digg (RIP), etc ... Those fools have been using a joke language and didn't even know it!
Seriously, the PHP hate gets old. It started off very much as a scratch to one man's itch. That man wasn't the best programmer ever (wouldn't even say top 10%, or even close), but he had an idea and executed it to make one of the most successful free products ever that has generated billions and billions of dollars for the world economy.
Can you say the same?
- cmelbye 13y agoDoes the fact that it's used by large websites change the fact that it's a poorly designed language?
- unavoidable 13y agoDoes the fact that it's a poorly designed language change the fact that it's a useful one?
- koide 13y agoNo, but it certainly puts the importance of good language design in perspective. We tend to overvalue good design just for good design's sake.
- mikeash 13y agoIt puts the importance of good language design in perspective in two completely different ways, though! You're completely correct, but at the same time, PHP also stands as a stark warning not to throw things together with no design, lest your misshapen child end up being immortalized. PHP is simultaneously the best-case outcome and the worst-case outcome for a badly designed language.
- MichaelGG 13y agoIn what perspective? PHP doesn't have to bear the weight of many other programmers dealing with their suboptimal design decisions. A popular DB had an intentional feature that lost data on 32-bit builds. You might not get bitten until you've gotten plenty of data in it - it's still a terrible design that hurts everyone.
- Yver 13y agoYou'd have to qualify what "poorly designed" means or even what language you're talking about. In that mail, Lerdorf recounts his time writing PHP/FI nearly twenty years ago. It's like judging the current Linux kernel based on the early version Linus Torvalds was using in his lab around the same time.
- tptacek 13y agoThe filesystem layout on Linux was never pessimized in order to work around using string length (STRING LENGTH) as a hash function.
- shoyer 13y ago...except PHP still has htmlspecialchars as a core library function. If Linux ever had these some of warts, they were resolved long ago.
- ars 13y agoNo they weren't. Go look at the TTY driver if you need an example. Any place you interface with user code you are stuck.
- Iftheshoefits 13y agoArguments from popularity can be amusing when laden with sarcasm, but that doesn't make them valid arguments. I'd say PHP is and has been popular more because it's easy to hire an army of self-trained "php developers" for peanuts than because it is a "good" language.
- eksith 13y agoI'd argue that PHP has been popular because it makes hiring a developer optional for the vast majority of folks who want to put up a website. In the days before Facebook et al. Your options were Geocities and family or a cheap shared host with apache and PHP3-4. When the most sophisticated portions of a site were a gallery and contact form, the "put files here, done" methodology is pretty hard to beat. It being a "bad language" is irrelevant for someone who's end result requirement is a functional page over technological purity. Disclosure: I develop mainly in C#
- judk 13y agoFacebook itself was PHP website thrown together without design!
- Iftheshoefits 13y agoI don't think we're saying different things. :)
- knieveltech 13y agoThere was a time (and it wasn't terribly long ago) that "self trained" developers garnered additional respect in the community because they had the sand to go in and learn a system under their own power instead of having concepts spoon-fed to them in class. Academically trained developers were known first and foremost for over-engineering otherwise simple tasks and typically required two to four years in industry to break of bad habits.
- saraid216 13y ago> Arguments from popularity can be amusing when laden with sarcasm, but that doesn't make them valid arguments. Informal fallacies don't automatically invalidate the argument either. Informal fallacies are rhetorical red flags: they predict problematic logic, because they're generally used in place of actual logic: but unless you're talking about formal fallacies, the argument can still be valid. In this case, it depends entirely on whether or not you accept popularity as a valid metric for success or quality or whatnot: you're arguing whether or not the "P -> Q" premise is true or false, not whether or not the argument itself is valid. Because P is true.
- kailuowang 13y agoI don't know if you can say that "those fools have been using it and don't even know it." It's hard to tell if they had a time machine would they go change that decision (to use php). Anyway I agree that there has already been too much time spent on this language, no need to waste more beating the dead horse.
- mehwoot 13y agothat has generated billions and billions of dollars for the world economy. That's an interesting thought. Has it? I wonder what a lot of websites would have used if PHP has not been around. I wonder if, overall, PHP existing has actually generated billions and billions of dollars in value.
- eru 13y agoPerhaps not in value, but in GDP?
- protomyth 13y agoNot sure what they would have used because it seems like no other language makes it quite as easy to install and start using. I get the feeling a lot of language designers don't really get that some poor sap has to get the language installed on the web server.
- felipellrocha 13y agoAny of the myriad of good languages available out there? Php is only easy to install because it comes pre-installed in most low-end servers out there. Without that fact, php is just as cumbersome to get started as any other language.
- protomyth 13y ago"Php is only easy to install because it comes pre-installed in most low-end servers out there. Without that fact, php is just as cumbersome to get started as any other language." It comes installed because it is easy to install. Someone had to install it and PHP is sure easy for any SysAdmin to get installed. It is easy to start because the PHP folks made it easy to get started. Look at the steps to get PHP installed versus other languages. Then look at what "Hello World" and a simple form take.
- fuzzix 13y ago> "Look at the steps to get PHP installed versus other languages" Not much different to getting CGI working. If you need it working well, FastCGI is as much effort as PHP-fpm. SUexec is as much effort as SUPHP. Any language could supplant PHP in terms of ease of deployment, there's little out there that doesn't have some CGI library to handle the mucky parts. Not that I am advocating use of CGI for anything non-trivial.
- jfb 13y agoWho cares? It doesn't make the language any better.
- PavlovsCat 13y agoAnd who cares about that, in turn? It's just the glue you write your data structures, objects and functions in. You can still write shitty code in a nice language, and you can architect something well thought out in BASIC. A nice language makes for shorter, more expressive code, sure, but that's like having a fast car that handles well; it still matters more where you're driving it. If someone is making a trip with a caravan of a million rust buckets to a nice place, why would they care about some Porsche owner moaning about how that is all so very wrong? If PHP developers complained all the time about how programming sucks, then you could maybe tell them to use a better language. But the PHP devs aren't really complaining, rather people who aren't even using it. People use Wikipedia. I dare say Wikipedia improved a lot of lives a lot. Meanwhile, a gazillion static blog generators written in hip language of the day prove no real benefit over notepad, or this textarea right here. It's like making a trip with a handful of people to a place that's been explored by others decades ago, and then being bitter that nobody cares, and hating on the roaring party going on next door. If you want to make language A or B more popular and better accessible when it comes to web hosting, write the killer app in it that nobody can do without, and which can't be implemented in PHP. That should be simple, since PHP sucks so much, right? Lastly, is the HN code nice? I wouldn't even know, it's that irrelevant. The HTML it puts out sure is atrocious, but even that doesn't matter.
- mistercow 13y ago>And who cares about that, in turn? Anyone who has to maintain bad PHP code, for starters.
- PavlovsCat 13y agoIf any other programming language was as popular, there would be just as much bad code in it. Nothing about PHP forces you to write bad code, nothing about other languages forces you to write good code. Also, if PHP is really just sucky and offers no advantages, why not simply rewrite it in a better language? Surely the costs would ammortize quickly.
- eevee 13y agoConversely, I wonder how much time/money has been spent porting away from PHP, or working on stuff like hiphop? I don't have an estimate, but it's an interesting question if you're going to argue in terms of economic impact.
- mistercow 13y agoI'm not really making any strong comment about PHP's usefulness or anything. I'm just saying that many of the things that have happened in its development would sound like they came right out of the manual for INTERCAL, except that they're too over the top. As for its popularity, well, that would be the "got out of hand" part.
- MichaelGG 13y agoJoke is sort of on them. Every single article I've read with engineers at the big sites talking about PHP mainly deals how to get around PHP. All of the things PHP is lauded for making things "easy" are the exact things the big sites go out of their way to avoid. Those sites are popular in spite of PHP, not because of it. If Mark had been proficient in ASP instead of PHP, FB would probably be running .NET. It's not like anything early FB did was particularly impressive and relied on special language features. (Correct me if I'm wrong.)
- 0x0 13y agoOn the other hand, what about time-to-market and worse-is-better and good-is-the-enemy-of-perfect? Could it be other efforts in the same space failed (and you never even heard of them) because they wanted to do things "right"?
- MichaelGG 13y agoThat's more happenstance of what happened to be on-hand. It's unlikely using, say, ASP with VBScript, would have generated any sort of "better-is-worse" type scenario. A Windows 2000 server with IIS/ASP installed had the same time-to-market advantage as PHP.
- freshhawk 13y agoCrack cocaine is a very successful product that has generated billions and billions of dollars for the world economy. You have to watch out for arguments from popularity, they don't prove or even suggest anything other than popularity.