Live data from Hacker News

These are things in PHP which make me sad

phpsadness.com

61–70 of 217 posts

Re: These are things in PHP which make me sad

#61
post #3

PHP's single greatest advantage is ubiquity - would love to see a CoffeeScript compiler for PHP that smooths out these issues.

you could say that all other web platforms are blub because they don't see the value that PHP brings to the table. a total idiot can install PHP and get a system that will meet the performance and reliability needs of 99.5 of web sites out there. tomcat, mod_perl, the ten different ways people host Ruby sites and all that make a lot more trouble for you. I've run PHP-based web servers for hundreds of sites that have…

"you could say that all other web platforms are blub because they don't see the value that PHP brings to the table."

I do not recall at any point in Beating the Averages [1] in which pg used "ease of installation" as part of the definition of a blub language.

Blub has a specific meaning. It's not a synonym for "bad".

There are plenty of other technologies that are as reliable as PHP. Ruby was not really one of them. Ruby went through a bad hype cycle a couple of years ago and was never quite as good as it was sold to be, especially on the reliability front. It's a great anecdote but a bad argument.

[1]: http://www.paulgraham.com/avg.html

Re: These are things in PHP which make me sad

#62
post #10

Earlier quoted context omitted.

> making the switch in if() be a boolean only What exactly is the alternative? If there's any problem here it's automatic coercion.

in statically typed languages like Java, C#, Scala and C++ people are always screwing this up most languages have some screwed-uppedness about collections, both intrinsic to the language and that gets introduced by people who make APIs that aren't well designed. for instance, arrays and Lists are often not quite perfectly uniform (and it's often a thoughtless arbitrary choice if people decide to return you one or the…

I am glad that this sort of error is much harder to make in statically typed languages like Haskell.

Re: These are things in PHP which make me sad

#63
post #61

Earlier quoted context omitted.

you could say that all other web platforms are blub because they don't see the value that PHP brings to the table. a total idiot can install PHP and get a system that will meet the performance and reliability needs of 99.5 of web sites out there. tomcat, mod_perl, the ten different ways people host Ruby sites and all that make a lot more trouble for you. I've run PHP-based web servers for hundreds of sites that have…

"you could say that all other web platforms are blub because they don't see the value that PHP brings to the table." I do not recall at any point in Beating the Averages [1] in which pg used "ease of installation" as part of the definition of a blub language. Blub has a specific meaning. It's not a synonym for "bad". There are plenty of other technologies that are as reliable as PHP. Ruby was not really one of them.…

You don't get it.

In my mind the important thing about "blub" is that there's a valuable feature a language has and the blubbers don't understand the valuable feature.

For instance, ALGOL-type languages use Chomsky's generative grammar to define a syntax that people find intuitive. LISP is blub because it rejects this major innovation.

Languages that are !PHP are blub because they don't recognize that "ease of installation" is a valuable feature.

Re: These are things in PHP which make me sad

#64
post #46

I've definitely run into #1 on the list. "Paamayim Nekudotayim" is a transliterated version of פעמיים נקודתיים‎, which means "double colon" in Hebrew. Zeev and Andi are Israeli, which kind of explains it, but the error message is still pretty useless.

> the error message is still pretty useless. not at all. A google search for "Paamayim Nekudotayim" gives you thousands of pages relating to exactly the error you're experiencing. It's WAY more useful than "Illegal operation" or "Syntax error".

  > It's WAY more useful than "Illegal operation" or "Syntax error".
Wut.

"Syntax error on line 14" -- Okay, time to look at line 14 for a mistyped semicolon or something. These two words Mean Something.

"Unexpected T_PAAMAYIM_NEKUDOTAYIM on line 14" -- means absolutely nothing unless you've already looked it up. It's essentially easily-googleable nonsense. It might as well say "Error 0x444F808E". You can google that, too, and it also tells you nothing useful.

Re: These are things in PHP which make me sad

#65
post #46

I've definitely run into #1 on the list. "Paamayim Nekudotayim" is a transliterated version of פעמיים נקודתיים‎, which means "double colon" in Hebrew. Zeev and Andi are Israeli, which kind of explains it, but the error message is still pretty useless.

> the error message is still pretty useless. not at all. A google search for "Paamayim Nekudotayim" gives you thousands of pages relating to exactly the error you're experiencing. It's WAY more useful than "Illegal operation" or "Syntax error".

I still prefer something like "illegal scope operator"

Re: These are things in PHP which make me sad

#66
Programming languages are tools. Some tools are better than others, some are better for certain situations. For all non-contractors, no one is forcing you to write in one language over another (or stay employed at a php shop).

It seems like the only point of having threads like this is for the leet programmers to look down on php. What's the point? This isn't constructive, its condescending and back-patting.

(the reason this makes me mad is that the sadness list is just a bunch of minor gripes. Every language has minor problems. PHP has fundamental flaws and that causes sadness, not this crap.)

Re: These are things in PHP which make me sad

#67
post #3

PHP's single greatest advantage is ubiquity - would love to see a CoffeeScript compiler for PHP that smooths out these issues.

you could say that all other web platforms are blub because they don't see the value that PHP brings to the table. a total idiot can install PHP and get a system that will meet the performance and reliability needs of 99.5 of web sites out there. tomcat, mod_perl, the ten different ways people host Ruby sites and all that make a lot more trouble for you. I've run PHP-based web servers for hundreds of sites that have…

a total idiot can install PHP and get a system that will meet the performance and reliability needs of 99.5 of web sites out there.

This is like living in a house where the builders were "total idiots" and hammered in all the screws with a hammer instead of screwing them in with a screwdriver. Sure, it holds together. It might not even collapse in a light breeze.

But one day, you'll want to reshingle the roof, or there will be a thunderstorm, and then your house collapses, killing your entire family. Good engineering requires good implementation. PHP makes good implementations too hard.

every other system requires that you make choices, and the truth about choices is that faced with a binary choice there are two common outcomes: (i) a person freezes up like a deer in the headlights or (ii) a person makes a random choice that they're 50% likely to get right. (i)'s probably the better option.

Theoretically, this is why you hire people with experience. They picked randomly the first time, and then gathered data. Their random choice either worked or it didn't. Repeat a few times and you have "senior system administrator" and "senior engineer" instead of "random dumbass we found on the street corner", and then this part of the equation goes away.

Now, if your goal is to produce something that sometimes works with the least amount of money possible... yes, you should outsource your development and deployment to some high school kids in India. If your goal is to produce something that works...

(Also, the days of PHP's deployment superiority are nearly over. With mongrel2, I can restart my app instances without losing a single request!)

Re: These are things in PHP which make me sad

#68

What makes me sad is that people will defend this horrible language to the death, regardless of how many problems there are with it. I don't get it; we know how bad PHP is, so why do people fight so hard? Oh, and to demonstrate: "PHP has no native Unicode type, no native Unicode handling, and cannot treat Unicode strings as strings." This true statement, composed of three observations about deficiencies in the langua…

Are you serious? You can't figure out why this is? Seems logical to me. These defenders are presumably professional PHP developers. They're presumably supporting their families by coding PHP. The more widely-spread the language is, the more it's used for new projects, the more lucrative and interesting their work will be. And here you are, making a fuss, and many of these people may know ONLY PHP. And you're trying t…

I fight against technologies I perceive as bad choices in an attempt to convince younger developers with less of an experience base that they should pick up something else that will give them the same or better capabilities for much less pain. My contribution to the community, as it were, as I have in turn benefited in my career from such signposting.

You can carve out a decent subset of PHP, but there's this painful and dangerous beginning and middle part where you're still learning this subset and in the meantime you're writing grossly insecure code. Perl has much the same problem. There are no languages I know where you are immediately writing brilliant code, but there's certainly ones you can learn faster, cut down the danger period, and also have many of the worst dangers ameliorated by much better design decisions at the API and language level. (How much of PHP and all similar languages would have been better if only the default interpolation HTML escaped everything and you had to especially ask for direct interpolation, instead of the other way around?)

Re: These are things in PHP which make me sad

#69
post #61

Earlier quoted context omitted.

"you could say that all other web platforms are blub because they don't see the value that PHP brings to the table." I do not recall at any point in Beating the Averages [1] in which pg used "ease of installation" as part of the definition of a blub language. Blub has a specific meaning. It's not a synonym for "bad". There are plenty of other technologies that are as reliable as PHP. Ruby was not really one of them.…

You don't get it. In my mind the important thing about "blub" is that there's a valuable feature a language has and the blubbers don't understand the valuable feature. For instance, ALGOL-type languages use Chomsky's generative grammar to define a syntax that people find intuitive. LISP is blub because it rejects this major innovation. Languages that are !PHP are blub because they don't recognize that "ease of instal…

Everybody understands PHP's ease of already-existing-installation is just about the only thing keeping it going. The idea that this is news is a strawman, I've seen this discussed for years and years.

The thing that makes it win though is not that PHP is intrinsically that much easier to install or run, what makes it win is that it comes pre-installed on most hosts. That's not a problem a language community can solve, that's a problem only the cheap web hosts can solve.

On one of my VPNs, I've had the experience where Django is actually easier to install, because all the mod_python and stuff was already in the distro, and it took less configuration than PHP to make it work and not be a menace to the net. PHP has a lot of really stupid things you better get right if you're trying to configure it from scratch, or you're insecure by default.

Post reply on HN