PHP Is Just Sad
-
@loopback0 I wouldn't say no to one either, far rather have that than the free copy of Zend Studio I got for passing the Zend certification.
-
@loose said in The "That's just sad" thread:
Is it an elephant because it is "something in the room that nobody wants to talk about"? :p
Could also be a euphemism for memory leaks: "Never forgets anything!"
-
-
@loopback0 it's practically the language's mantra. If it can proceed, despite an error, it will. You have to go to 'syntax error' or 'some level of like trying to call a method on an object when the object is really an int or something' before it will fall over.
-
@Arantor said in The "That's just sad" thread:
If it can proceed, despite an error, it will.
@Arantor said in The "That's just sad" thread:
You have to go to [...] 'some level of like trying to call a method on an object when the object is really an int [...]' before it will fall over.
It'll do everything it can to 'save' a crappy program, but it won't autobox an int?
-
@Dreikin pretty much
-
@loopback0 IMMA LEAVE THIS HERE http://www.elephpant.com/
-
@Arantor said in The "That's just sad" thread:
@Dreikin pretty much
I used to think "nah, it can't really be as bad as everyone else is making it out to be". But for the past - I dunno, six months? year? - every time I've come across some 'feature' or another in PHP I've gotten that "how can it be so wrong?" feeling. I even tried doing a little bit of it (completing the challenge one of @cartman82's
marksapplicants failed at) and was astounded at the sheer randomness of parameter ordering in closely related methods.I'm starting to believe it really is TRWTF. How did it get so popular? And why hasn't it been replaced yet?
PHP is going to be the web's COBOL/VB6/Choose-your-poison, isn't it?
-
@Arantor said in The "That's just sad" thread:
@loopback0 IMMA LEAVE THIS HERE http://www.elephpant.com/
E_PINK_ELEPHPANT_NOT_INVISIBLE
-
@Dreikin said in The "That's just sad" thread:
I even tried doing a little bit of it (completing the challenge one of @cartman82's marksapplicants failed at) and was astounded at the sheer randomness of parameter ordering in closely related methods.
Yeah, the worst part of the language is the standard library, which is never going to be fixed. There have been multiple discussions about that on the mailing list and the consensus was that it doesn't make sense to break BC in a spectacular fashion to make the APIs look better. Which makes sense, IMO, the damage is already done and there is no easy fix.
-
@Arantor It's true! The whole concept of the "elephpant" and the people behind it and for it deserve a whole new "sad" category of their own. They have created a rod for their own back; something so ridiculous that it will still be an object of derision long after we have evolved beyond the need for computers and programs. WTF were they thinking? <--- Rhetorical question.
-
@Dreikin What do you mean 'going to be'? It already is.
As for its popularity, that's largely a factor of 'even idiots can smash some shit together in it' and 'it's not Perl' (specifically in a context of 'it's easier/safer to deploy on shared hosting and easier for people to write things)
Thing is, it's 'good enough' that no-one wants to try to derail it. The only thing that's doing that at present at the bottom end of the VPS market is NodeJS and I'm not sure JS on the server is vastly better - or worse.
-
@Arantor I don't think It's even got Integer objects? None that I ever ran into at least.
I think the most common php fatal errors I see are when it tries to invoke a function or method that doesn't exist. Or syntax errors of course.
-
"Early PHP was not intended to be a new programming language, and grew organically, with Lerdorf noting in retrospect: "I don’t know how to stop it, there was never any intent to write a programming language […] I have absolutely no idea how to write a programming language"
-
@PleegWat It doesn't have int objects, no. Ints are a primitive type along with strings, bools and floats. Though strings aren't really truly primitive any more >_<
The most common fatal errors? They're pretty much the only ways to fatal error.
The whole list, from memory:
- syntax errors
- invoking a function that doesn't exist
- invoking a method that doesn't exist (either at all or out of scope, e.g. private)
- invoking a method on a non-object
- require/require_once a file that doesn't exist
- an uncaught exception being thrown
- instance of trigger_error where E_ERROR or one of its friends is the error type
You really have to go out of your way to fatally error in PHP.
-
@asdf said in The "That's just sad" thread:
Yeah, the worst part of the language is the standard library, which is never going to be fixed.
"The worst part of the language is the easiest to fix. But we're not gonna do that because fuckit: we've got this far up shit creek without a paddle, might as well go all the way!" /blakeyrat
@Arantor said in The "That's just sad" thread:
Thing is, it's 'good enough' that no-one wants to try to derail it. The only thing that's doing that at present at the bottom end of the VPS market is NodeJS and I'm not sure JS on the server is vastly better - or worse.
Sounds like an opportunity for some (skilled!) language designer to come along and take a bite out of that pie.
@PleegWat said in The "That's just sad" thread:
I don't think It's even got Integer objects?
To be fair, neither does JS.
-
@Dreikin while I have no doubt that a skilled language designer could mop the floor with PHP, it still faces two serious problems.
PHP is basically everywhere by now. Getting something non PHP on there would be a challenge. Fuck, even Python hosting is fairly rare and that's less fucktarded than PHP.
Secondly, you need to have that killer app. The app everyone wants to use to build their shit in. When PHP came along, there weren't that many great apps on the other platforms, and most of the time people who built shit were quite happy to build it themselves.
Today though we live in a web app appliance world. Any language that wants to take on PHP needs to take on WordPress as its killer app. I've seen pretenders to that crown but none that actually fucking stand up.
-
@Arantor If there is a terrible language with very simple deployment, you can try cross-compilation, like all those things that compile into JS to run in websites.
-
@Adynathos it can't make things worse...
Famous last fucking words...
-
@Arantor said in The "That's just sad" thread:
Any language that wants to take on PHP needs to take on WordPress as its killer app. I've seen pretenders to that crown but none that actually fucking stand up.
The fact that these two sentences exist is offensive to the very existence of our trade.
-
@Weng well, here's the thing.
I have no love for WordPress. But... the users love it. WP's devs figured out one thing. That whole 'you had one job...' meme. They fucking nailed it.
They made their shit usable. Until other apps figure out how to be as usable to regular mortal users as WP is, none of it matters.
I can think of many platforms that are less fucktarded internally than WP - but none of them are as readily usable.
-
@Arantor said in The "That's just sad" thread:
it has two of the three letters
in the right orderGiven the nature of the initialism, it would be impossible for them to be in the wrong order.
-
@CarrieVS this is PHP we're talking about here, any fucktardary is possible.
-
@Dreikin said in The "That's just sad" thread:
How did it get so popular?
The same way Javascript did.
-
@Arantor I think some of those won't even kill it completely in some cases - I'm pretty sure you can get it to just error out on an included file and then happily execute the rest of the main file.
-
@Dreikin said in The "That's just sad" thread:
"The worst part of the language is the easiest to fix. But we're not gonna do that because fuckit: we've got this far up shit creek without a paddle, might as well go all the way!" /blakeyrat
If they actually fixed it, nobody would use the new version, since all existing code would have to be re-written. That would instantly kill the PHP community, since one of the reasons why the language is so popular is the vast amount of code written in it.
@Adynathos said in The "That's just sad" thread:
you can try cross-compilation
The design flaws are deeper in the stack, they cannot be fixed by layering another language on top. The PHP dev team is actually pretty good at polishing the turd as much as possible, PHP 7 was a pretty great release.
-
@Arantor said in The "That's just sad" thread:
Fuck, even Python hosting is fairly rare and that's less fucktarded than PHP.
HELL NO. python is a nice language, but it's ecosystem and deploying tools are a world of pain (and i DO like python).
like it or not, setting up a PHP enviroment is dead simple, time-wise i bet that it's better to put up with PHP fuckery than fighting with python and its deploy sheananigans.PHP > 5.5 is a nice language. it has no more quirks than other langs.
-
@Jarry said in The "That's just sad" thread:
python and its deploy sheananigans.
If you are not using Virtual Environment you are and if you are, what exactly is hard? Serious question, because I have used NumPy + django +custom code + ... and it was simple as fuck. Deploy in a
requirements.txt
then pip install your code from your git by a given release/test branch, everything in an isolatedVirtualEnv
.
-
@asdf said in The "That's just sad" thread:
If they actually fixed it, nobody would use the new version, since all existing code would have to be re-written. That would instantly kill the PHP community, since one of the reasons why the language is so popular is the vast amount of code written in it.
The design flaws are deeper in the stack, they cannot be fixed by layering another language on top.
Has anyone here got any opinions about Hack (facebook's bastard child of php)? I've no experience of using it, but faced with maintaining a somewhat wtf'y php app am quite tempted to jump ship. Hack appears to bring in some nice static typing along with a whole lot of stuff that looks tempting, without instantly breaking backward compatibility.
What worries me a bit is that it might be a blind alley - facebook could drop it at any time. I think Wikipedia's using hack but I'm not sure it's gained traction anywhere else.
-
@Rhywden said in The "That's just sad" thread:
@loose said in The "That's just sad" thread:
Is it an elephant because it is "something in the room that nobody wants to talk about"? :p
Could also be a euphemism for memory leaks: "Never forgets anything!"
Could also be because elephants are from India, and PHP is associated with shitty outsourced "development"...
-
@loopback0 said in The "That's just sad" thread:
elePHPant.
Really? Is that where the animal comes from.
I think we found "that's just sad" #2.
-
-
@Dreikin said in The "That's just sad" thread:
PHP is going to be the web's COBOL/VB6/Choose-your-poison, isn't it?
Going to be?
Someone contacted me last week about a possibly-PHP gig and heaven help me, I'm so bored where I am now, I considered it.
-
@Arantor said in The "That's just sad" thread:
I'm not sure JS on the server is vastly better - or worse.
Do they try to get a consistent parameter ordering?
-
@Onyx actually, fatal does mean fatal... for the most part.
It is possible to get some behaviour going even after a fatal error but not the rest of a regular file; you have to pull some shit with a registered shut down function and hope that doesn't error out too.
-
@japonicus whether your app will work on it is extremely hit or miss, depending how much you have lurking under the surface.
-
@dkf most things in JS from what I've seen don't even have that many parameters, and the standard library is/was missing things. We didn't get an is-thing-in-array construct until fairly recently for example.
-
@Arantor said in The "That's just sad" thread:
most things in JS from what I've seen don't even have that many parameters
It's probably for the best.
The main gripes I've heard over node have been on the dysfunctional library system (see ) and the difficulty of debugging event-driven code. The latter isn't helped by everyone using unnamed functions; while yes, when they're working they're very nice, when they go wrong they're really annoying to comprehend.
-
@dkf Node is a specific implementation of JavaScript which introduced library management (badly), all the objections to JS as a language apply to it both in the Node space as well as the front end space where it's even worse in most places.
-
@dkf Unfortunately for some reason people don't understand you can pass a method reference to a callback or similar.
var myFunction = function(e) { //some stuff. } something.on('myevent', myFunction)
Not only that is that if you wanna write (OMG) tests for it is easy to have create event mock.
Instead on the frontend everyone abuses the fuck outta jQuery:
$('.my-element').hover(function() { //snip }, function () { //snip });
-
@Arantor I may have misremembered, or my template fuckery is throwing me off, I'm pretty sure I had it not die completely on non-existent methods.
-
This post is deleted!
-
@Arantor said in The "That's just sad" thread:
@FrostCat That particular iteration of logo looks like it has some kind of dart inserted into its butt. Which is also 'just sad'.
Seems to me that he's into that.
-
@Arantor said in The "That's just sad" thread:
that's largely a factor of 'even idiots can smash some shit together in it'
That's a very good thing though. Lowering the "cost of entry" is one of the big things that most other programming languages and tools seem to forget.
Nobody wants to install a 10GB IDE and spend 100 hours learning about a language before being able to write something in it. Doesn't matter how beautiful and powerful its object model and standard library are, PHP is better because they can actually use it now.
So like I say with javascript/HTML5: don't blame it for being bad, blame the others for being worse.
-
@anonymous234 said in The "That's just sad" thread:
That's a very good thing though. Lowering the "cost of entry" is one of the big things that most other programming languages and tools seem to forget.
This is one of the main complaints I hear from Junior devs when it comes to .NET. ASP.NET is a beast, it takes years to learn properly.
Smaller stuff like python, node and PHP you can literally install the interpreter, a popular library and just start hacking.
-
@Arantor said in The "That's just sad" thread:
@Weng well, here's the thing.
I have no love for WordPress. But... the users love it. WP's devs figured out one thing. That whole 'you had one job...' meme. They fucking nailed it.
They made their shit usable. Until other apps figure out how to be as usable to regular mortal users as WP is, none of it matters.
I can think of many platforms that are less fucktarded internally than WP - but none of them are as readily usable.
QFFT!
-
@lucas1 said in The "That's just sad" thread:
@anonymous234 said in The "That's just sad" thread:
That's a very good thing though. Lowering the "cost of entry" is one of the big things that most other programming languages and tools seem to forget.
This is one of the main complaints I hear from Junior devs when it comes to .NET. ASP.NET is a beast, it takes years to learn properly.
Smaller stuff like python, node and PHP you can literally install the interpreter, a popular library and just start hacking.
Good, I will make a note to send a cookie to Microsoft as thanks for keeping those damn kids off my lawn! :D
-
@Vaire Well unfortunately your lawn happens to be every fucking dev shop in the UK and I have to work with "enterprise" i.e. shite written by people that think it is a good idea to have 15 projects using a custom DI framework that some contractor built in house because he didn't want to use autofac so he could continue raking another 2 years worth of contract work. Apparently I am not a very good contractor because I bother to write docs.
One of the other places I was working at they decided it would be a good idea to base everything on StructureMap which in affect made all our code incompatible with .NET 4.5 even though it ran on 4.0 fine.
I dream of the days where I have earned enough cash and can go back to writing little hacky web apps built using some hipster language that on runs on Ubuntu and MacOS.
-
@lucas1
you and I are VERY different people.
But I also literally have no idea what you are referring to with most of the keywords you just mentioned, those sound like specialized industry things, not core .NET stuff.For what it's worth. Documentation is law in my division (because I AM THE LAW!), and anyone caught over-engineering something, or clearly padding their work because they want to extend a contract or something, gets ... talked to =_=
-
@Vaire Everything I referred to are .NET libraries except for DI which is used in pretty much everything these days. Almost all of the ASP.NET MVC example now use some sort of DI framework in the video.
you and I are VERY different people.
I literally saw a block of flats being built next to me at work faster than I could build a decent project due to the stupidity of "Senior" Developers and Project Management. When if I was left alone to just fucking do it It would have been done in less than a month. It is demoralising to see something making steady progress towards completion, while at the same time you see your own work hindered by stupidity.