Live data from Hacker News

Taking PHP Seriously (2016)

slack.engineering

131–140 of 150 posts

Re: Taking PHP Seriously (2016)

#131

Earlier quoted context omitted.

I've worked at PHP shops - working on a PHP project for a consultancy right now - and there's 0 issues about 'shortcomings of the language'. "past mistakes" are almost inevitable problems - I've been on both sides of this - creating things which likely caused someone else problems (learning to be better at tests and docs) - and inheriting problems created by someone see ( learning to demand better tests and docs from…

Can you elaborate on the failed node project?

Probably not much of interest. Small team of... 4-6 had mix of experience with php, java and .net (min 8-10 years of each, fwir). Someone wanted to learn node (of course... always the best reason to choose a star), and pushed that on others. I gave up fighting that. Then we needed to "micro service" the node code because... well... you know... we have to be on AWS and lambda because... scale. Funnily enough, 'testing' and 'testability' never seemed to enter in to the decision making equation.

Re: Taking PHP Seriously (2016)

#132
post #84

It's like an ugly C. It's a perfectly reasonable choice for web development, just like a Chevy Caprice is a perfectly reasonable car for a taxi service (as evidenced by the thousands of them in NYC, still plodding along). You'd still rather ride in a Mercedes E430 taxi (long time European standard)... unless you had never experienced both, in which case you probably think the Caprice is just fine. And if you knew Rub…

What a load of bolax. A language is nothing more than a hammer or a saw. PHP is just like the other languages you mentioned very mature. It's up to the developer to make good furniture. Entirely different skillset and not linked to a language. I have seen low level drivers for hardware written in PHP operating for over 15 years. I have seen JavaScript used in a medical device. You sound like that creepy negative 'you…

Nobody says it is not possible to use PHP in all the use cases you mentioned. But is PHP the best tool for those, or is it just the one closest to the hand? You definitely can do surgery with a kitchen knife instead of a scalpel, but often the long-term result would be better if a more appropriate tool was used.

Re: Taking PHP Seriously (2016)

#133

Long live PHP. 15 years of PHP dev work. Games, mobile apps, health care, etc. I have been unemployed for 2 days in 15 years. PHP runs %80 of the internet. Talk to anyone at facebook that wears a suit on friday -- they code PHP (and it seems to scale for them). I think I will be 90 years old hacking on PHP.If you really don't like how the arguments are passed just use an IDE. Or get stuck with real problems like a tr…

80%? Of what?

Re: Taking PHP Seriously (2016)

#134
post #92

Earlier quoted context omitted.

I often hear engineers rave about lisp. Is that really such a superior language?

No, its not, but it is a fun language. I'd take a lisp job over anything if i found one. Not because it is the best language (it is not the best at anything, except maybe prototyping), but because it is fun, and interesting to work with it.

Sounds fun yeah.. Really should start to learn to program. Got a background in pure math but for some illogical reason I feel kind of intimidated by programming.

Re: Taking PHP Seriously (2016)

#135

Earlier quoted context omitted.

I often hear engineers rave about lisp. Is that really such a superior language?

Superior at what? Meta-programming? Yes. Object-oriented programming? Meh. CLOS is nice, but not vastly superior to anything else. Something else? Depends on what that something is.

It's interesting.. all these different languages. Wonder if at some point in the future, you'd just have 1 language. (not an engineer so idk if that's possible/practical)

Re: Taking PHP Seriously (2016)

#136

Earlier quoted context omitted.

No, really no, as someone who has worked on code bases where people followed the path of least resistance (PHP in this case) things turned into a giant mess of human suffering. Pick a language that has tooling for what you want to achieve otherwise everyone reinvents it or just makes a mess.

I’ve found giant messes of human suffering even where the tooling chosen was relatively excellent for the problem at hand. The part not being considered is that some problems are hard to solve and developers will make a mess even with the right tools. Programming isn’t easy, but especially in uncharted territory. I think that’s why choosing tools you at least know has merits. I spent a lot of my career consulting as…

If premature optimization getting in the way is the norm for the projects you helped then I'm afraid that the people who crated them before that might not be as smart as you imply.

A "smart" and/or a "senior" programmer knows not to optimize prematurely.

But maybe I latched only on this one sentence and missed your point. Sorry if that's the case.

Re: Taking PHP Seriously (2016)

#137
post #76

PHP was the first language I learnt and although I don't use it as much today I still think it's a great language for startups. Languages like Java, Node, C#, etc are great but unlike PHP you can't just drag and drop a .php file on a webserver, point your browser at it and go. Basic things required for web development like connecting to a MySQL database are made trivial in PHP. Code is executed synchronously in PHP a…

And this has led to countless SQL injection vulnerabilities some of which WordPress in particular is still fighting with (in community extensions, not in their core) to this day.

"Trivial to connect to a database" isn't a selling point. It is a liability when put in the hands of inexperienced programmers.

Re: Taking PHP Seriously (2016)

#138
post #84

It's like an ugly C. It's a perfectly reasonable choice for web development, just like a Chevy Caprice is a perfectly reasonable car for a taxi service (as evidenced by the thousands of them in NYC, still plodding along). You'd still rather ride in a Mercedes E430 taxi (long time European standard)... unless you had never experienced both, in which case you probably think the Caprice is just fine. And if you knew Rub…

What a load of bolax. A language is nothing more than a hammer or a saw. PHP is just like the other languages you mentioned very mature. It's up to the developer to make good furniture. Entirely different skillset and not linked to a language. I have seen low level drivers for hardware written in PHP operating for over 15 years. I have seen JavaScript used in a medical device. You sound like that creepy negative 'you…

I appreciate JS and PHP but I do reach for Elixir for most of my web work because it parallelizes transparently, unlike PHP where you literally have to spin several interpreters -- separate OS processes -- and somehow coordinate through them. And this "coordination" turns out to have a lot of holes. So why not use a language that's explicitly made to coordinate between a lot of tasks easily?

An experienced programmer might appreciate most tech (I certainly do and I recognize what they brought to the table) but there also comes the time to retire some of that tech because you have something that has all the benefits of the old stuff plus new goodies that make productivity objectively better -- we're not talking some fanboyism here like "I like the syntax better!", we're talking "I can make it in 2 days as opposed to 5, plus it will have less bugs on the first deployment" (which is something that statically and strongly typed languages like Rust bring to the table).

I worked with PHP, with Java, with JS, some .NET, and a bunch of others. I wouldn't reach for them nowadays. I recognize that rewriting some systems might cost millions and I am sympathetic to the companies who can't just spend that much and are keeping their old giants alive and well. More power to them. But there are many situations where new and improved tech can be picked, yet people still refuse because of the fear of the unknown and because they became way too set in their ways.

A lot of modern tech -- Elixir, Rust, F#, BuckleScript, Nim, Zig being a few good examples -- only lacks the network effects of Java / PHP / JS and it beats them in almost every other aspect.

Inertia. Problem is always the inertia and people becoming old men in their 30s, yelling: "Back in my day and ...!". (Hell, I've seen people being like that at 27 years old; quite sad.)

So no, languages aren't just a hammer and a saw. Some languages can only be a saw ever, some can be a lame hammer and a lame screwdriver at the same time, others can only ever be a good car to transport tools from one place to another.

What a "good developer" is, is a guy/girl who can use one or more of them in a team where each shines in their strong area.

Re: Taking PHP Seriously (2016)

#139
post #79

Earlier quoted context omitted.

"Use an IDE" is never an answer to shitty language design. Shitty language design is shitty language design. That said, I cut my teeth on PHP and still have a fondness for it. It's especially great being able to deploy small little backend-driven pages with rsync or sftp in a pinch. I just discovered other languages and environments I enjoyed working in much better.

If there's room for Javascript, there's room for PHP. Both are sloppy, inferior languages, but both can do anything you need. And unfortunately, both have immense momentum from being first in the web game.

> If there's room for Javascript, there's room for PHP.

PHP doesn't run in the browser. For browser programming there's literally almost no choice. TypeScript seems to be an improvement but even that compiles down to JS. Same for ReasonML and BuckleScript and Elm.

Re: Taking PHP Seriously (2016)

#140

Somewhat unrelated comment, but the fact that PHP got so good and most people are still not willing to give it a second chance goes to show how hard it is for a language to regain market share after people left for greener pastures.

"Greener pastures" does not sound specific so not sure what your argument is. Clarify, please?
Post reply on HN