Live data from Hacker News

“Hello, (real) world” in PHP in 2017

kukuruku.co

41–50 of 144 posts

Re: “Hello, (real) world” in PHP in 2017

#41

Earlier quoted context omitted.

I think this is a realistic reflection on the state of this area in our industry. It is both sarcastic/a joke and not a joke at all.

Poe's law in full action. If for some reason this is not a joke, it's a pretty lousy tutorial, as for every single arbitrary framework/tool decision here, there's not a single rationale here but "because it's 2017". I'd absolutely prefer 1995's Hello World if it's just about saying "Hello World".

I don't think it's a joke, but I also don't think "tutorial" is the right word either. It seems more like an illustrative commentary on the state of the webdev industry.

Re: “Hello, (real) world” in PHP in 2017

#42
I get that this article is satire, but I think the deepest (perhaps) unintentional insight presented by the author's veiled criticism is that the justification for using these tools is presented as "it's 2017" and not as a solution to any particular problem. The issue isn't the 2017 ecosystem, the issue is the 2017 programmer's deference to vanity instead of engineering. All these individual tools exist for a reason, and if your project is already functioning to specification without the use of these tools, you shouldn't be using them; doing otherwise is the developer's fault, not the tool's or the ecosystem's.

Re: “Hello, (real) world” in PHP in 2017

#43
Everyone's trying to take this literally as the "right way to display plaintext" in modern PHP. In that sense, it is absolutely absurd.

But if the idea of a "hello world" is to learn the basic boilerplate that you'll need before you start implementing real features, unfortunately for us web developers, this quite accurately represents the minimum before we can even start implementing business logic. With the baseline expectation for a lot of modern SPA-type applications including caching scripts, client-side routing, server-side rendering, working offline, supporting IE9 to iOS to Firefox and all the quirks in between, etc it really is getting to this point.

I wish like nothing else that most of this could come out of the box so "hello world" really was a one-liner, but that just doesn't seem to be the reality that 2017 webapps live in.

Re: “Hello, (real) world” in PHP in 2017

#44
We’ve gone full circle.

Truly look at the PHP code in this article, the JS dependency hell here and in the recent JS article.

Look at the code. At the environment. At the libraries.

Who isn’t reminded of what Java looked like years ago?

We’ve come full circle.

    ------------------------
Now, if one asks why this is, the answer is pretty simple – enterprise products.

To build software of a certain scale, certain technology, patterns, etc are required. These are what we see here again – ORMs, complex dependency systems, complicated frameworks, etc.

One might wonder why people even write PHP and JS nowadays, if Java is still faster, JS and PHP are now equally complicated, and Java ported all of the advantages of the others.

And, in fact, the Play Framework (which supports Java and Scala) is growing.

At the same time, Google’s go is copying the same mistakes Java did in the beginning, with almost all new methods in the standard library taking interface{} – the equivalent of void* or Object, and a simplistic typesystem.

    ------------------------
Why do we, as a profession, create new tools for a new purpose, then force them to adapt to another purpose, until they’ve become identical to the tools we tried to replace?

Re: “Hello, (real) world” in PHP in 2017

#45

Maybe I am old fashioned and outdated. I don't know about anyone else, but it makes me pretty sad that the "modern" way as presented in this article is no longer simple and straightforward and has some severe dependency hell. Not that I'm saying the structure of modern web applications isn't needed and that we haven't advanced. Just that the overhead and knowledge required to set up a modern web application is crazy.…

https://github.com/turbolinks/turbolinks

Re: “Hello, (real) world” in PHP in 2017

#46
I am going to leave this here...

https://en.wikipedia.org/wiki/Rule_of_least_power

If you enjoy overengineered code, check:

- Fizzbuzz Enterprise Edition: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...

- Fizzbuzz in Tensorflow: https://github.com/joelgrus/fizz-buzz-tensorflow/blob/master...

Re: “Hello, (real) world” in PHP in 2017

#47
post #30

This is a bit like $ echo 'Hello World!' which if, you think about it, requires a kernel, multitasking, driver independence on various level, many drivers, memory management, possible resource accounting, binary api, dynamic linker, interpreter, etc, etc, etc. All (or at least most) of this seems overkill if you just want to print out 'hello world'. But it makes total sense if you want to do a little more complex stu…

I think that's kind of the point, though, that OSes and shells have gotten to the point where all that complexity is hidden behind an easy installation. With modern web frameworks, all the "guts" are still fully exposed, warts and all.

It kind of reminds me of the state of Linux in the mid-late 90s, where you'd have "install fests" with a roomful of 25 people and it took a whole day to get Linux installed on your machine (and your sound still didn't work, that took another afternoon).

Re: “Hello, (real) world” in PHP in 2017

#48
post #45

Maybe I am old fashioned and outdated. I don't know about anyone else, but it makes me pretty sad that the "modern" way as presented in this article is no longer simple and straightforward and has some severe dependency hell. Not that I'm saying the structure of modern web applications isn't needed and that we haven't advanced. Just that the overhead and knowledge required to set up a modern web application is crazy.…

https://github.com/turbolinks/turbolinks

The latest version is "supported only by" rails. (I mean that you should implement the server side part in your language/framework)

(in php/asp.net/python you should write something in backend for serve javascript responses as is it in rails with files .js.erb)

Re: “Hello, (real) world” in PHP in 2017

#49
post #44

We’ve gone full circle. Truly look at the PHP code in this article, the JS dependency hell here and in the recent JS article. Look at the code. At the environment. At the libraries. Who isn’t reminded of what Java looked like years ago? We’ve come full circle. ------------------------ Now, if one asks why this is, the answer is pretty simple – enterprise products. To build software of a certain scale, certain technol…

Why is the "enterprise" the culprit? The things you describe have more to do with generational churn, abusing the web as a desktop replacement, and developer's desires to always use the latest stuff as a stepping stone for the next gig, or maybe to convince themselves they're avantgarde when in reality it's mostly boring stuff.

Re: “Hello, (real) world” in PHP in 2017

#50
post #38
post #20

Sometimes I miss the old good days with PHP mixed in HTML. Maybe wasn't the best solution but it worked...and was fast too.

Having had to find and fix a bug in a very long page like that recently I can definitively say I don't. Horrible. Granted the person who wrote it obviously didn't care but that setup was awful for anything of any size.

You can write bad code(not modular) with every language...

If you use some include() in php, you can avoid long php/html pages...

What I really miss is that was very fast "GET SHIT DONE" with PHP.

Post reply on HN