Live data from Hacker News

PHP Sucks

evertpot.com

131–140 of 297 posts

Re: PHP Sucks

#131
> The problem I have with PHP has nothing to do with the language, it’s its reputation. I can’t count the times I’ve started a conversation with a programmer who upon finding out I primarily do PHP got awkward with me.

I'm a developer. I use tools to get things done. PHP is one of many tools in my arsenal. For certain projects, it's awesome. For others, it's very much not awesome.

That's the beginning and the end of it. I don't get defensive. If I bring up PHP and someone says something like, "Oh, I’m sorry about that" -- that's an indication of that person's immaturity, not any weakness on my part. It's a super condescending thing to say to someone...

If I didn't just give up on them at that point, maybe I'd explain why I chose PHP. If I'm wrong and I'm actually making a bad choice of tools for the given project -- happy to have that conversation and learn a thing or two!

Re: PHP Sucks

#132
post #117

Earlier quoted context omitted.

| More often it's the programmer who sucks, not the language. Whilst it is possible to write structured, elegant php, its very hard, and thats the languages fault. The barrier to entry to write bad PHP is very low, thats what makes people think it 'sucks', because 90% of PHP codebases do. :(

I disagree. Namespaces help hugely, as do Traits, etc. It used to be difficult back in the pre 5.4 days, but we have come a long way since then. Older projects will suffer till they're brought up to spec, true.

I don't think what you say really invalidates his point though. Namespaces and traits might help a lot, but that still doesn't make them used wide spread or introduced them to the overwhelming amount of terrible legacy code bases that have no namespaces and untested functions that are hundreds of lines long. You can write bad code in any language, but PHP used to be a much worse language and many developers got socialized with that. When you are leaning PHP it's easy to pick up bad habits because the code base tut are using is likely full of them. You are likely to look at code examples using old versions of PHP that don't teach you good practices. That of course doesn't mean you can't error awesome code in PHP it just means it's easy to write bad code.

Re: PHP Sucks

#133
Is there some consultant out there who is getting paid good rates to program with Go, Rust, Elm, Erlang? I would love to hear some stories. Most people I know only get paid for php, rails or node.

Re: PHP Sucks

#134

Earlier quoted context omitted.

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

That's what I do as well. I mix and match components such as eloquent, guzzle, pux router, twig and stay away from monolithic frameworks.

I think with the composer package manager mixing and matching components fais what makes modern PHP so effective. I'm using the mini-framework Silex and a bunch of components I find useful (twig, phpexcel ).

It works pretty well.

Re: PHP Sucks

#135

Earlier quoted context omitted.

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 thing that kept me away from it for actual enterprise use was the fact the project is run by a single person. Where would it be without Taylor? Django and others have actual foundations that will keep it going for the long-term, more mindshare and more committers as part of the core project team.

> Where would it be without Taylor?

The flip side of that question, though, is "where would Laravel be if it were built by committee rather than benevolent dictator?" I'd wager Taylor's "I'm doing shit my way" has been at least part of what has made Laravel so successful.

Re: PHP Sucks

#136

Earlier quoted context omitted.

The problem is that clients really want WP a lot. Bigger and bigger companies currently and for most of their departmental sites. This is WP shoe-horned in a full site CMS function. The thing is, users seem to love it. I would wager that if you just rip out the guts of PHP and leave only the frontend (the /wp-admin part that is), but leave it 100% as it is and write a solid backend in Django/Rails, you have a winner.…

> I would wager that if you just rip out the guts of PHP and leave only the frontend (the /wp-admin part that is), but leave it 100% as it is and write a solid backend in Django/Rails, you have a winner. I would love for WP to exist as only an admin interface to a clean, backend data store. Unfortunately, the problem is the database schema that WP ships with and the way WP handles data. It's almost impossible to get…

I agree with everything you said here but I can explain this to clients usually however not always. There is, for instance, a supermarket chain running all their web through WP. They spent and spend millions on it; they cannot be convinced and although I might not choose a certain tech for my own company assets, I am not spreading religion (although as I get older I feel more and more the need to do so) and we are not in the position to just say no to large contracts.

Re: PHP Sucks

#138
PHP does suck. So much bad code written in such an awful language.

And yet this morning I'm earning yet another paycheck digging deep into PHP.

Re: PHP Sucks

#139
post #62

Earlier quoted context omitted.

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.

Have you tried Yii at all? In my most recent (side) project, I'm doing a Yii2 website and I'm feeling like it's not enterprisey enough. I have to go out of my way to figure out the best way to split things apart (which, I guess is good because it doesn't actually make that difficult for me at all - it's just something I have to choose to do)

+1 for Yii2, I've used it for many big projects, it's rock solid and faster than most libraries of a similar size.

Re: PHP Sucks

#140
post #49

Earlier quoted context omitted.

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.

Which is like saying that chainsaws suck because they don't stop you from cutting off your own leg.

Yeah, I could understand that perception if chainsaws were given away for free to everyone who owned a house in the woods, and if they were touted as an easy-to-use entry-level sawing device.
Post reply on HN