Hacker News new | ask | show | jobs
by mikedd 2984 days ago
I always made fun of php. No reason, I've never truly worked with it in depth and I'm also not the best JS dev. I never attacked a person for writing php I just mocked php itself. Even so, this made me feel bad and I'm going to change my attitude. Nobody should feel bad for doing something they enjoy. <3
3 comments

I've used PHP and I too make fun of it. It's a silly language made years ago without a lot of attention paid to normal software development practices and it shows. There is a laundry list of facepalm-worthy things the language does.

But it's just a language. Good software is made in bad languages all the time. And making fun of PHP is not the same thing as making fun of someone who is using PHP. I'm sure Rasmus Lerdorf will happily tell you PHP is full of expedient design choices that would be different in hindsight, but that doesn't make it OK to poke fun at people trying to get work done.

There is plenty of activity within frameworks and on internals from people who are absolutely concerned with good software development practices.

Obviously it does suffer from some design issues due to backwards compatibility but is moving in the right direction.

Heck I make fun of PHP as much as I've made fun of JavaScript (maybe less actually) but now I'm heavily investing my resources at becoming a fine grained JavaScript developer, and I'm looking back at PHP all these years later because if I wanna "hack up something" in PHP I don't have to think about where to host it, you are totally spoiled by the offerings. Have fun trying to say the same about any other web framework / stack.
What if they enjoy writing non tokenized SQL statements with user input and without an ORM?

Some practices are bad. PHP was my first working language and I used it for years. I’ve since used a dozen other stacks in the intervening fifteen years. PHP is objectively a poor choice, an impediment to its user.

Someone who is told this, who doubles down on ignorance of better, more efficient, more predictable, consistent, safe, and useful languages, is worthy of ridicule—not because of their ignorance, but because of their will to remain ignorant.

Sorry, but that's just silly.

I might agree that PHP is a poor choice in many ways, and that in many situations there's a much better alternative. But it's quite another thing to claim it's "objectively" a poor choice.

I have clients on small budgets who run on shared hosting, and the fact that these support PHP is enough reason to use it. I have clients whose needs are met almost perfectly by Wordpress, and using it requires using PHP. I know developers who have fairly successful small businesses on PHP and for them it would be "objectively" a bad idea to just drop all their knowledge and everything they've built so far in favor of an "objectively" better language.

Even just the fact that in some places or for some use cases it's significantly easier and cheaper to get an decent PHP developer than anything else is a reason to use PHP for some things.

"Someone who is told this ..."

By an authority such as yourself? Sure aren't we the lucky fellas to have somebody like you to tell us what's what

> What if they enjoy writing non tokenized SQL statements with user input and without an ORM?

Those functions have been deprecated in PHP for years, and they were just wrappers around existing C libraries to begin with/

And other languages have that as well. I've seen it done in C# and C++.

I wasn’t talking about SQL in PHP, I was talking about people who like pursuing sloppy and careless software engineering practices in general, like writing unsafe SQL queries using string concatenation [in any programming language].

Using PHP is the same thing.

The story about FizzBuzz is not literally asking you to implement FizzBuzz. It’s an illustration.

My comment could be rephrased: just because many people like doing things that are bad does not mean that those things aren’t bad. It just means that many people are ignorant.

Plenty of ORM choices in PHP. Also PDO if you want to write paramatised SQL queries.
>... worthy of ridicule—not because of their ignorance, but because of their will to remain ignorant.

The ironing is delicious.