Live data from Hacker News

PHP Sucks

evertpot.com

41–50 of 297 posts

Re: PHP Sucks

#41
post #20

Every programming language sucks when you're bad at using it. This is the only and universal truth. Same for JS.

That's a pretty useless truth, who doesn't know that? Many languages (like Go or Clojure) require you to learn quite a few concepts and exercise your mind in general. This automatically filters out incompetent programmers, and puts the rest in the right mindset.

I don't really agree on Go, however it is true that some programming languages scare away beginners.

I wouldn't say that it filters out incompetence completely though. I remember when I was writing Prolog for a school project and wasn't familiar with any of its concepts. I ended up writing terrible Prolog that looked a whole lot like the imperative stuff I was used to (wait, comma doesn't mean next instruction?!).

Re: PHP Sucks

#42
post #12
post #6

Earlier quoted context omitted.

Facebook wouldn't use it if Facebook started two or three years after it did.

That's right they'd probably be struggling to scale Ruby on Rails like Twitter who started 2 years after facebook.

To be fair, FB struggled to scale with PHP, although it certainly fares better out of the box (even then). A lot of their work has gone into making PHP more performant and better by way of Hack.

PHP7 took a lot of great ideas from Hack but is still saddled with its legacy.

Re: PHP Sucks

#43
post #18
post #10

"The 2016 StackOverflow Survey puts PHP developers as the least paid" - which is very unfair. I think PHP developers should actually get paid more as compensation for having to put up with PHP on a day-to-day basis, but that's just me unfortunately...

I've been doing primary PHP for almost ten years and people honestly just throw money at me to solve their problems. I really don't know how I make as much as I do; I hit the point where I made more than my parents combined a few years back and that made for a strange reflection point in my life. Basically for all the decent PHP developers I've known in my life money has never been an issue.

Not being a developer, but having had lot's of great moments with them, I can say, that in my tangenital environment there are lots and lots of school taught mediocre to bad PHP devs, that always find jobs, but on a very low pay grade (and rightly so).

So maybe there are lots of mediocre php devs pulling the average down?

Re: PHP Sucks

#44
This is one of my fears, as I work primarily modernizing PHP applications.

I think it's possible my salary has hit a plateau. Most SMBs do a false equivalence between PHP developers and junior developers. One place I worked at the owner used to brag about hiring people starting out for $12/hr.

The thing is, with my experience in PHP it's easier for me to write secure code in PHP than anything else at this point. I can do it really fast, too. I've internalized a lot of micro-optimizations in PHP. Project scaffolding on a greenfield project ends up looking a LOT like Express if you use the Slim framework. And I stay away from PHP if I need concurrency (and so far, per business requirements, I haven't). I can scale it really well, and I rarely have to worry about memory limits like you do with the JVM.

I'm hoping for a breath of fresh air with PHP7, because I'm not entirely sold on the current runtime alternatives - JavaScript, Python or Ruby. I've been trying Scala and I write less code than Java, but definitely more than PHP. It's also hard to jump into the Play framework if you don't grok the 'weird' operators. I also find that it's easier to hang yourself with incompatible components/libraries. So far it's fun to write though, but I don't think I've seen anyone hiring for Scala in my town.

Re: PHP Sucks

#45
What Evert is referring to (the "reputation" of PHP and people's reactions) is even worse in infosec. I very frequently get accused of being a charlatan simply because I write PHP.

Some people openly question if a PHP developer who understands security exists at all: https://twitter.com/MalwareJake/status/506488937096183808

This is silly when you think about it. If so many systems run PHP, wouldn't you want your infosec people to know PHP and work with it more often? Why are we, culturally, encouraging such a blind spot by ostracizing folks who know it well? That part never made sense to me.

This conversation plays out more frequently than I like:

  Rando: Hahaha PHP security is an oxymoron.
  Me: Okay, then hack paragonie.com. It runs PHP. Logically, you should
      be able to hack it _just for running PHP_ if PHP is so insecure.
  Rando: But that website's mostly static content!
  Me: Yes, but it runs PHP. So it must be insecure, right?!
So far, despite giving people permission so the prospect of CFAA convictions don't discourage them, none of these "PHP is inherently insecure" folks have succeeded. I wonder why. :)

TL;DR - A lot of the hate against PHP is founded on ignorance and peer pressure. Be open to constructive criticism, of course, but a lot of the hate you'll hear is bullshit.

Re: PHP Sucks

#46

The thing that hurts PHP the most is lack of structure and patterns used in the most popular projects. These popular projects are usually where the bulk of work lies, where developers point to when they're considering PHP. When juniors start they're typically working on WordPress or Drupal. The problem is that WordPress and Drupal are terrible guides of how to write a web app and that knowledge is completely useless…

I used to like Laravel, but lately it feels so enterprisy. There is a lot of boilerplate in Laravel today and it was changing too fast for me to keep up with it.

Honest question, didn't they switch to focus on enterprise and slower release schedule? Wouldn't that be easier to keep up with?

Re: PHP Sucks

#47

The thing that hurts PHP the most is lack of structure and patterns used in the most popular projects. These popular projects are usually where the bulk of work lies, where developers point to when they're considering PHP. When juniors start they're typically working on WordPress or Drupal. The problem is that WordPress and Drupal are terrible guides of how to write a web app and that knowledge is completely useless…

I used to like Laravel, but lately it feels so enterprisy. There is a lot of boilerplate in Laravel today and it was changing too fast for me to keep up with it.

The more I used Laravel the less I liked it.

I like Laravel Elixir (the npm package) and Eloquent (the ORM). Laravel itself is overly complex and the learning curve keeps getting higher. I'm much happier with Slim 3

Re: PHP Sucks

#48

Every programming language sucks when you're bad at using it. This is the only and universal truth. Same for JS.

Was it Stroustrup who said there are two kinds of languages, those everyone complains about, and those no one uses?

Re: PHP Sucks

#49
post #24

PHP is a toy language that's now being used in some reasonably grownup ways. I've built a static analysis tool for it, and it sort of feels like writing a CAD tool for lego bricks.

Maybe PhP is to hard for you?

The point isn't that it's easy or hard. It doesn't require the user to understand things like scope or the rudiments of typing to get started, which means it's insanely permissive.

Re: PHP Sucks

#50
Awkward auto-inserted blog ad after that post...

> ... And to anyone considering programming as a career, or trying to get into it… stay away from PHP. There’s lots of fun, interesting languages out there that also get the job done quick, but with a better reputation and this will have an actual effect on your future career options.

> Looking for a PHP developer for your next project? I'm looking for work! Check out my resume or drop me a line!

Post reply on HN