PHP 7 deployment at Dailymotion
151–160 of 166 posts
Re: PHP 7 deployment at Dailymotion
#152Earlier quoted context omitted.
>PHPs reputation seems to surround the fact that it tends to be (or was) the first language amateur coders dabbled with. That's certainly part of it. JavaScript suffers the same hate today -- amateur and junior developers produce thousands of lines of crap per year, and people blame it on the language. But PHP itself is just a mess. I'm an experience developer (about 30 years at this point), and about 12 years ago I…
>JavaScript suffers the same hate today.. The difference between Php and Javascript is that Javascript have competent people driving it forward. Php is still developed by college students with no real world programming experience, in their spare time.... Downvotes? Don't think this is true? See the following. These are couple of most prominent people working in the language. [1] https://nikic.github.io/aboutMe.html […
Everyone focuses on the "my experience is old" and not on the "it's not an asynchronous language" part. Oh well, I lost some Internet points.
Re: PHP 7 deployment at Dailymotion
#153Earlier quoted context omitted.
>PHPs reputation seems to surround the fact that it tends to be (or was) the first language amateur coders dabbled with. That's certainly part of it. JavaScript suffers the same hate today -- amateur and junior developers produce thousands of lines of crap per year, and people blame it on the language. But PHP itself is just a mess. I'm an experience developer (about 30 years at this point), and about 12 years ago I…
> I'm an experience developer (about 30 years at this point), and about 12 years ago I decided to do a volunteer project for a nonprofit in PHP > mysql_xxxx functions So, you used PHP 12 years ago and comment based on that. You have a point though. I used this internet thing about 17 years ago, it was terrible. Only dial-up. SLOW! And don't talk to me about browsers. Netscape? Internet Explorer? Ugh. Forget it. I don…
This is still true today, and this fact alone makes it not worth trying out as a server language.
Re: PHP 7 deployment at Dailymotion
#154Earlier quoted context omitted.
> Are you expecting it to be an integer? Easy > if(!ctype_digit($_POST['ID'])) { // throw exception here } ctype_digit is broken. Try passing integer values. ctype_digit(50) === true, but ctype_digit(100) === false. And "0000001" passes as true, which most people in the majority of scenarios would prefer not to pass. I can't remember what the even-worse-bug is with ctype_digit is, but even if you cast the value to st…
>try passing integer values. ctype_digit(50) === true, but ctype_digit(100) === false. That is hilarious! I love how even stuff that is supposed to fix other stuff itself end up being completely broken. But hey, it is documented. Learning Php is like taking a massive loan. It get you started easily, but causes eternal suffering in the long run...
Re: PHP 7 deployment at Dailymotion
#155Earlier quoted context omitted.
> I'm an experience developer (about 30 years at this point), and about 12 years ago I decided to do a volunteer project for a nonprofit in PHP > mysql_xxxx functions So, you used PHP 12 years ago and comment based on that. You have a point though. I used this internet thing about 17 years ago, it was terrible. Only dial-up. SLOW! And don't talk to me about browsers. Netscape? Internet Explorer? Ugh. Forget it. I don…
>And it's not asynchronous. There's not even a good reason to use a synchronous language for web development today. Not to mention the ease of running NodeJS code in a debugger, or running tests in a browser and debugging it there... This is still true today, and this fact alone makes it not worth trying out as a server language.
Also, claiming that only the programming model and language that introduced the term "callback hell" should be used is a pretty big claim to make..
Re: PHP 7 deployment at Dailymotion
#156Earlier quoted context omitted.
This is the typical "hatred of the web" that I usually ignore. ES2015 brought a ton of huge language improvements that are still filtering out into usage, Babel means you can use them all now without waiting for browsers to implement them, Webpack gives you a ton of flexibility for packaging it, Eslint allows you to lint in a completely pluggable way, NPM (and now Yarn, which fixes many of NPM's problems at scale) al…
The length of that paragraph and the number of tools mentioned is exactly one of the problems of web development. It's like missing the forest for the trees. And even with all the huge language improvements, it's still no where near the capabilities and safety of non-web languages. But I don't disagree that it's possible to write very high quality JavaScript code -- it's just a little bit painful.
In the real world, changing web development to give it the "capabilities and safety of non-web languages" is extremely difficult to do on any sort of timeframe because it needs to be supported AND backwards compatible in all browsers. Realistically speaking, how do you 'fix' web development? How could you make it better?
The modern Javascript ecosystem is a realisation of this and it does the best it can do given the shitty situation it's in - using tooling and preprocessing to give it some features from other types of development, like static types!
Re: PHP 7 deployment at Dailymotion
#157Earlier quoted context omitted.
Except I have built Java apps that did the same kind of things as Magento, and yes it really was 500 to 3.
Benchmarks or no you haven't.
Also if you need someone to validate that their system does 500 qps, you really need to check your assumptions. I'm trying very hard to think of what kind of system I'd build that would do less than that (hint each q would be big)
Re: PHP 7 deployment at Dailymotion
#158Earlier quoted context omitted.
> There's absolutely NOTHING wrong with having $_POST['whatever'] inside a controller as long as you're doing proper checks. The last part is why this is a problem. The truth is that programming is simply too difficult a task for human beings. Software is so complicated with so many moving parts that it is impossible for anyone to understand all the details of even the simplest piece of code. This is why we have oper…
> The last part is why this is a problem. $_POST isn't the problem. The scope of the variable isn't the problem. You've realized this, too, and that's why you're shifting the argument to one about typing instead of superglobals-are-bad (typing and scope are obviously independent features). > You want to reduce the number of things you have to think about to the absolute minimum The net effect of type systems seems to…
> $_POST isn't the problem
No, it isn't. That's why I specifically said "The last part is the problem", referring to "as long as you're doing proper checks."
Specifically, my point is that you should not rely on people 'doing the proper checks' because people make mistakes, thus you want to reduce the amount of situations where people are given the opportunity to make those mistakes.
There are a lot of situations in PHP where you need to 'do the proper checks' for no reason other than bad language design, and that is what makes PHP a bad language.
Re: PHP 7 deployment at Dailymotion
#159Earlier quoted context omitted.
Benchmarks or no you haven't.
Without getting into a pissing war if Brian says he's done something on the JVM, trust him. Also if you need someone to validate that their system does 500 qps, you really need to check your assumptions. I'm trying very hard to think of what kind of system I'd build that would do less than that (hint each q would be big)
Without anyone dropping any factual proof my app is definitely better.
Re: PHP 7 deployment at Dailymotion
#160Earlier quoted context omitted.
Of course, but they won't do that because of backwards compatibility and I get that. It's one of the nice parts of rebranding. Hack could keep and throw out anything they wanted because it was intended for private FB use. At some point, PHP will have to start cutting off the stdlib PHP4.x warts. There's enough about PHP 7 that's good enough to be compelling to anyone working in an interpreted language on the web, but…
They don't have to remove them. Just put the updated versions under a namespace. This will slowly help developers migrate.