Live data from Hacker News

I still love PHP and JavaScript

the.scapegoat.dev

101–110 of 402 posts

Re: I still love PHP and JavaScript

#101
post #52

In 2022 there is no reason to prefer these dynamically typed languages over statically typed ones for production code. When languages like PHP, Ruby, JS blew up the knock against statically typed languages was the verbosity of the resulting code, slow development cycle and general cruft, these languages solved a real problem at that time. That is no longer true today- TypeScript, Go, C# code feels as fluid as a dynam…

"No reason", at all? Have you seen how much standardized legwork is done with a backend framework like Rails and Django? How much easier that is to work with other developers because everyone is following known conventions? With Django, there's also the huge benefit of millions of data libraries an import away. When I search for client libraries to do something, anything under the sun has a Python client. Much much less so with Go, C#, and Java.

Re: I still love PHP and JavaScript

#102
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…

> why the downvotes? If you don't agree, just reply so we can have a healthy dialogue.

I think downvote = disagree is expected. If someone thinks your comment is not making valid points, downvoting is a way to bury it below other comments.

So that, naturally, the comments that the community most agrees with (in addition to adding quality content) bubbles to the top.

https://news.ycombinator.com/item?id=658691

Re: I still love PHP and JavaScript

#104
post #64

Earlier quoted context omitted.

In general, how could one know that something has no unknown unknowns? By definition, one wouldn't know.

That's what makes the statement "no 'unknown unknowns'" a bit ridiculous though. How can you possibly assert that there are absolutely NO 'unknown unknowns'? You can never rule them out, and at best can only suspect there's a possibility either way, that they do or do not exist. You can never actually know with certainty.

Schrödinger’s Cat?

Re: I still love PHP and JavaScript

#105
post #87
post #33

Earlier quoted context omitted.

> - 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.

But genuine question -- what other languages are as simultaneously as useful AND predictable?

ruby...

Re: I still love PHP and JavaScript

#106
post #33

Earlier quoted context omitted.

> - 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.

I’ve been using PHP since 2003 and it’s my full time job and this doesn’t ring true. Very, very rarely is a gotcha not in the docs comment section.

i always found those comment sections to be so odd — fifteen year old comments about a common pitfall and the information never makes it up to the official documentation?

i suppose it's fitting for a web-centric language to crowd source its docs on a website, but does any other mainstream language do this?

Re: I still love PHP and JavaScript

#107
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…

> it's stateless by design (much easier to scale)

I noticed being stateless made it difficult to scale for any complex app. It’s been 7-10 years since I used it but Drupal used 60-128MB+ plus per request. As it was stateless it had to do a full bootstrap for every request coming in, set up a new database connection, module discovery etc, all which was heavy to do for every request. Most people scaled Drupal by putting Varnish in front preventing the origin from being hit so not really scaling Drupal as such, varnish is taking off some load where it can.

Drupal is probably the extreme though. If you have a simple app with a few scripts, light use of a DB it’s not to bad. I’ve heard it’s come on a lot in the past 10 years and Laravel. I certainly had less issues using PHP than I do with JavaScript.

Re: I still love PHP and JavaScript

#108

Earlier quoted context omitted.

I really like the serverless aspect. I still think nothing has the deployment story that PHP applications have. Just upload some source and your website is up.

Pixar should make a film called "Deployment Story" in which PHP is basically Woody (maybe it's even just the PHP stuffed elephant?), and Woody ends up in the box on the street, and then Woody's dev pal doesn't realize what they've really lost until some reflection is done. I'd watch that.

There has to be a Debian angle to this plot as well.

Re: I still love PHP and JavaScript

#109
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…

> it's stateless by design (much easier to scale) I noticed being stateless made it difficult to scale for any complex app. It’s been 7-10 years since I used it but Drupal used 60-128MB+ plus per request. As it was stateless it had to do a full bootstrap for every request coming in, set up a new database connection, module discovery etc, all which was heavy to do for every request. Most people scaled Drupal by puttin…

Had same experience, had same thoughts. I bet I could make my way around the Drupal 7 bootstrap even these days, I looked at it so much... and so often thought... all this... every request?
Post reply on HN