Live data from Hacker News

I still love PHP and JavaScript

the.scapegoat.dev

131–140 of 402 posts

Re: I still love PHP and JavaScript

#131
post #124

Earlier quoted context omitted.

- 9 ways to do same thing in PHP api - worst way to do templating - weird mental model of putting all logic and templating in one file

Like a react component?

i dont like react but even in react there is clear distinction, I've found tons of logic within templates of php like from .. anything at anytime could cause anything. Kinda gives me global variable vibes

Re: I still love PHP and JavaScript

#132
Biggest flaw of php to me is getting paid well and the number of jobs.

From the stack overflow dev survey, php devs get paid much less than others.

Laravel and php is a beast, super easy to use. All that annoying shit is setup for you. But, how many ppl hire Laravel devs? Job boards are stacked with react, vue etc. Personal use is great though.

Re: I still love PHP and JavaScript

#133

Earlier quoted context omitted.

- 9 ways to do same thing in PHP api - worst way to do templating - weird mental model of putting all logic and templating in one file

> weird mental model of putting all logic and templating in one file That's up to you though. You're welcome to put all your logic in one file and your templating in some other file.

I guess but that brings to next point, varying approaches to this problem in the wild, and since all are valid, codebases seem to have all of them.

Re: I still love PHP and JavaScript

#134
post #122

> I love legacy codebases. > A legacy codebase means that the product is performing well. It means that I can often make immediate and impactful improvements. Wow. This person must have worked on very different legacy codebases than me. Legacy Javascript code, to me, is something that I do not want to touch with a 10 foot pole, because every little piece of it can be intertwined with and used by many other hidden pla…

>Typescript only aids this point Though, being optional, it creates its own problems that are time consuming. I have spent a fair amount of time trying to find the right versions of npm dependencies and accompanying @type/whatever packages that work together and aren't saddled with open vulnerabilities, etc.

An @type package is dev time only and contains only exploit free definition files.

Re: I still love PHP and JavaScript

#135
post #33
post #4

PHP has so many hidden benefits: - it's stateless by design (much easier to scale) - it was "serverless" before Serverless - surprisingly performant - no "unknown unknowns". it's so tried-and-true, there's no surprises - deployment is so simple, just drop a file on a web server. No middleware needed. - No long compile times because there is no compiling needed. EDIT: why the downvotes? If you don't agree, just reply…

> - no "unknown unknowns". it's so tried-and-true, there's no surprises This part is laughable. People who have been programming PHP for 20 years (several of them at my company) still routinely discover hidden bugs, quirks or general behavior that is totally unintuitive and nowhere found in the documentation.

Any examples?

Re: I still love PHP and JavaScript

#136
post #44
post #4

PHP has so many hidden benefits: - it's stateless by design (much easier to scale) - it was "serverless" before Serverless - surprisingly performant - no "unknown unknowns". it's so tried-and-true, there's no surprises - deployment is so simple, just drop a file on a web server. No middleware needed. - No long compile times because there is no compiling needed. EDIT: why the downvotes? If you don't agree, just reply…

> EDIT: why the downvotes? The anti-PHP cult is strong here on HN. List 5 benefits of React and watch your upvotes skyrocket.

Elitists can't like what the general mass likes. There's a reason the general mass likes but they think they can do better, but let's see how they do so in real life.

Re: I still love PHP and JavaScript

#137
post #4

PHP has so many hidden benefits: - it's stateless by design (much easier to scale) - it was "serverless" before Serverless - surprisingly performant - no "unknown unknowns". it's so tried-and-true, there's no surprises - deployment is so simple, just drop a file on a web server. No middleware needed. - No long compile times because there is no compiling needed. EDIT: why the downvotes? If you don't agree, just reply…

> I feel like PHP documentation is very undervalued PHP is documentation done right because of the comments, essentially "Stack Overflow" for PHP before stackoverflow.com was a thing. I've found an example of documentation done wrong recently with Microsoft .NET 6.0. Apparently, Microsoft has decided that code samples are no longer important

I've been migrating to Azure and their SDK documentation is next to nonexistent. The codebase is also uncommented and inconsistent. It's just been a dumpster fire.

Re: I still love PHP and JavaScript

#139
post #97
post #44

Earlier quoted context omitted.

> EDIT: why the downvotes? The anti-PHP cult is strong here on HN. List 5 benefits of React and watch your upvotes skyrocket.

I agree with you on the anti-PHP cult, but it's become fairly "cool" to criticize React now (and JavaScript stuff in general).

Criticizing is so easy, especially on the internet. If they're that good, why won't they propose a workaround or work with the language developer and provide some feedback?

Re: I still love PHP and JavaScript

#140
post #4

PHP has so many hidden benefits: - it's stateless by design (much easier to scale) - it was "serverless" before Serverless - surprisingly performant - no "unknown unknowns". it's so tried-and-true, there's no surprises - deployment is so simple, just drop a file on a web server. No middleware needed. - No long compile times because there is no compiling needed. EDIT: why the downvotes? If you don't agree, just reply…

I’ve always wondered why the more respectable dynamic languages, like Ruby and Python, don’t have a web framework with the PHP deployment model of “just upload this file to the server and refresh your browser to see changes.”

I would say security by default is a good reason to not have this. I've been burned too many times on PHP projects because someone miss-configured an httpd conf file.
Post reply on HN