Live data from Hacker News

Go with PHP

gowithphp.com

361–370 of 532 posts

Re: Go with PHP

#361
post #303
post #292

Earlier quoted context omitted.

> magic framework stuff that Laravel/Symphony provide The magic in these frameworks is evil, and likely a big part in ruining PHP's reputation. Laravel in particular hides way too much stuff behind magic, and when it goes wrong you find yourself sifting through OOP-obfuscated layers of framework and libraries just to find out how exactly your controller is called.

I agree with you. But, and this is a big but, it's a tradeoff. You also get benefits. This is why I said "buy-in". If you are comfortable with doing things in their way, you get a ton of leverage: easily consistent code, a fast and productive "get off the ground" experience. The downside is what you described. Personally I'm just not a fan anymore of these things. You quickly produce code that _looks_ clean and consi…

It's like that with every framework: Laravel, Rails, Django, you name it.

If you build a class of thing which the framework creators had in mind, and do not have a need to deviate from the prescribed ways, it's a force multiplier.

Once you try to build something that does not fit the confines of the framework, it's of course possible, but the framework stops helping you, and after some time becomes more of an impediment instead.

Re: Go with PHP

#362
post #171
post #122

Earlier quoted context omitted.

> The documentation reads like a tutorial, which is fine the first time you read it, and really annoying the next 99 times when you're just trying to find something. Ah yes, the Ansible approach. I've used it for a decade, and I routinely get lost in its utterly terrible by-example documentation. They are the golden standard on how not to write documentation. God, I hate the Ansible docs so much, they are the reason…

I think more documentation teams need to know of the concept of Diataxis [1] so they can invest in the 4 different kinds of documentation developers turn to for help when picking up a new technology: - tutorials; - how-to guides; - technical reference and; - explanation. 1: https://diataxis.fr

This looks very nice and is something I have been searching for but didn't know existed. Thank you!

Re: Go with PHP

#363
post #141
post #24

I'm in the group described halfway down: was on the Internet during PHP 5, lost interest in it, and moved on [to Go]. I haven't written anything in PHP newer than version 5. Even transitioning from 4 to 5 was quite a big deal, I definitely noticed improvements. But it wasn't enough. I couldn't fit the data set in memory with PHP. But I could do it with Go. I couldn't do parallel computations in PHP in order to respon…

[flagged]

Your response here feels unkind and combative

Re: Go with PHP

#364
Developer advocacy is such a weird thing, do it right and people will line up for you to mentor them and pay you for it, do it wrong and you will people scratching their heads asking "so you can do with this thing what you could do with Perl + CGI 15-20 years ago and still not get more performance out of it?".

Sadly this article is the latter.

I'm working on both sides of the fence -- dynamic strongly typed language (Elixir) and static strongly typed languages (Golang, Rust) -- so I am already sold on the advantages of dynamic languages. That page is doing a poor job selling PHP to me though, f.ex. it's not clear when you do `$request->user->orders`, does that automatically go to the DB? Does it first fetch the user and then all their orders, or does it do it in one go? Is the whole thing prone to N+1 queries like Rails is (was? no clue about it nowadays)?

Posting cute little coding snippets is skipping 99% of the story. The code must remain small and simple and understandable and easy to dissect / troubleshoot, long-term, and allow for adding metrics / telemetry, analytics and such.

So OK, we get it, you're so hyped about PHP that you made a website about it. Alright. Now do a cookbook. Next show us a 5-year old project and tell us how long does it take to add a feature or fix a bug exactly. Tell us of the issue that took you the longest to troubleshoot -- and why did it take so long.

Before that this is basically a surface-level marketing page that says almost nothing and is not even accentuating the strong sides of your loved technology because what I am seeing here I can clearly remember 5 other languages I've done it successfully with: JS, Golang, Elixir, Rust and Ruby.

Re: Go with PHP

#365

Earlier quoted context omitted.

This 100%. It's actually a bit of a red flag to me these days if a developer turns up their nose at PHP. The language has matured a lot and building stuff with it is simple, cheap, straightforward and fast. If someone's still hating on PHP in 2023 it makes me wonder if they've been focused on more exotic technology because they were looking to pad their resume with more expensive skills, build science projects for th…

I love PHP, but a red flag?! If they’re busy in the Ruby/Java/C#/Go worlds (all get-it-done environments) then I’d just assume they don’t read many Hacker News praises for PHP. It’s easy to have not encountered it since the bad old days unless you work on a team that uses Laravel for some things. I do understand hiring someone who has that tradesman programming ethic and is comfortable with Linux, but that’s more req…

Yeah, that's fair. Now that you mention it, 90% of these guys where I get that red flag instinct I described are Javascript devs or wannabe Javascript devs. It's as if the JS ecosystem has driven an entire generation of developers insane

Re: Go with PHP

#366
post #338

Earlier quoted context omitted.

I mean no disrespect, but imo you need to get a modern UX designer involved in rethinking and redesigning your site. Message-wise, your site has too many angles, sells too many use cases, and has too many general marketing statements and not enough concrete examples. This only confuses readers. In terms of design, the site design (1) doesn't promote a linear flow of reading, (2) doesn't space out information with eno…

Please see the sister comment. If this is what “modern design” looks like — no wonder things are so bad. Instead of clear text sizes and simple messaging like in https://qbix.com/communities , there are texts of at least 5 different sizes jumbled in. Instead of contrast so you can read text — there is white text on black over white text on black. There is also text that is gray and low contrast until you scroll it in…

Hi, I made the Payload site

Apparently it triggers you. I don't claim that it's perfect by any means (actually I think some of what you're saying is right).

Re: Go with PHP

#367
post #57
post #24

I'm in the group described halfway down: was on the Internet during PHP 5, lost interest in it, and moved on [to Go]. I haven't written anything in PHP newer than version 5. Even transitioning from 4 to 5 was quite a big deal, I definitely noticed improvements. But it wasn't enough. I couldn't fit the data set in memory with PHP. But I could do it with Go. I couldn't do parallel computations in PHP in order to respon…

I agree, the main problem with PHP in my experience so far has been that it's very memory-hungry and slow (even PHP7/8), especially when coupled with frameworks/ORM magic. I remember after spending some time with Go, I got used to being able to process tens of thousands objects in memory in milliseconds. When I proposed to do the same in PHP, during architecture review, PHP devs thought I'm out of my mind because tha…

We do a lot of work with large datasets. PHP 7&8 are so much better than 5 in terms of memory usage for large datasets.

Its not magic though, and I'm not surprised a compiled executable is many times faster, especially for math heavy stuff. Slow is often "good enough" though and deploying is quite straight forward.

Re: Go with PHP

#368
post #292
post #253

Earlier quoted context omitted.

> If someone's still hating on PHP in 2023 it makes me wonder if they've been focused on more exotic technology because they were looking to pad their resume with more expensive skills, build science projects for their own amusement vs. what the business needed, etc. etc. Red flag. I get that you are arguing from personal experiences, people you met and worked with. But this statement lacks context and nuance. There…

> magic framework stuff that Laravel/Symphony provide The magic in these frameworks is evil, and likely a big part in ruining PHP's reputation. Laravel in particular hides way too much stuff behind magic, and when it goes wrong you find yourself sifting through OOP-obfuscated layers of framework and libraries just to find out how exactly your controller is called.

What ruined PHP's reputation is people believing the language itself was a sufficient framework and unsafe SQL and escaping practices being the norm, due to naive developers (which PHP has plenty of) thinking the simplest solution (eg concatenating strings and variables into SQL queries vs prepared statements) is always the most correct.

I mean, with PHP you either use a framework or you necessarily end up writing your own ad-hoc, informally specified, bug ridden implementation of one. At least frameworks like Laravel are battle-tested and should at minimum cover the most obvious issues.

Re: Go with PHP

#369
post #35

Earlier quoted context omitted.

Thus is why I wish titles quoted names, at least where is there is any possibility of confusion

Not sure how quotes would help? If referring to the go programming language, the title should say "golang with PHP" There is no other way to disambiguate one of the most commonly used English verb from the obscure (in relative terms) programming language.

Those of us who program in Go are always looking at the word “go” in that lens. Our mistake.

Re: Go with PHP

#370

Earlier quoted context omitted.

The days of WordPress being used for only blogging are long gone. I have many, many multimillion dollar clients using it as the hub for their whole company (none of which have blogs). It's crazy how it just...works. A little PHP-FPM tweaks here, a couple NGINX tweaks there, and you're off to the races. Very little maintenance, almost no downtime ever.

You are probably the cleanest WP + PHP developer in history, who contrary to the messed up ecosystem of WP plugins has clean coding style that puts everyone else in the WP ecosystem to shame then, or those multimillion dollar companies don't actually need that much functionality on their sites. Even the data structures in a default WP setup, making everything as post types is silly for anything not a blog and I would…

> You are probably the cleanest WP + PHP developer in history, who contrary to the messed up ecosystem of WP plugins has clean coding style that puts everyone else in the WP ecosystem to shame then

When you give people the power to do anything and dozens, or even hundreds of millions of people start doing anything and everything they can think of, many will create major messes. That happens with anything that becomes extremely widely used.

> or those multimillion dollar companies don't actually need that much functionality on their sites.

The WP world is so big that it has its own specializations and their subspecializations. You cant imagine what kind of complexity is involved in such systems and the variety of the problems that are being solved.

What WP does is to solve the problem of launching, running and maintaining A LOT of things right out of the bat, allowing you to build even more complex things. There are widely used plugins for many things ranging from using replicated databases to launching full fledged software/app store websites. The enterprise WP world builds on it instead of rejecting what others already built and are maintaining.

WP runs 50% of all the websites at the moment. 30% of all ecommerce websites. And 'website' means anything ranging from the sites of CNN, Reuters to the $5 florist shop site a flower shop owner in Oregon just launched without knowing anything about programming...

It works. That's whats important.

Post reply on HN