10
AleCx04
5y

I have noticed that C/C++ developers that deal with backend server technologies are very much likely to resort to PHP for some reason. I have noticed it from serveral developer friends of mine or simply by noticing how the topic comes along sometimes on web discussion forums.

I believe this is the reason why certain extension codebases that deal with php are(for the most part) exclusively done in C++, take Phalcon, written as an extension in C or PHP Swoole, which is written in cpp iirc.

I wonder what attributes does the language, or the tech stack as a whole has that would make this particular kind of developers feel attracted to the platform. Is it that is easy and widely available and they just say "fuck it, I don't wanna spend too much time in this shit" <--- which is a very valid point really.

Or them just having an innate preference towards it?

The Psychology Behind Developers: By Dr AleCx04

Comments
  • 4
    They started as php devs, fell in love, and moved up to c/c++ but still come back to their beloved php.

    Outside of this.... I got no idea, but I'm thankful they keep building libs/extensions for us.
  • 5
    It's been a long time since I've written any PHP, but originally it was just a fancy templating language that gave you access to the C standard library inside the code blocks. If you look at documentation for earlier versions, a lot of the functions are literally just standard C functions.

    I dunno where the language is at now, though. But my guess is that interop with C is super easy because of its beginnings as a templating language over C.
  • 2
    @C0D4 same, it is actually one of the main reasons why I am going back to C/C++ development, I want to be able to see that code and understand it better as well as helping out.
  • 4
    @baughb Oh I am very familiar with the history of php, been using it since version 4 and I am very glad it had evolved the way it has,.

    The current versions are pretty good! My only gripe is that it(historically at least) lets pretty much everyone get their hands dirty with the code, the legacy systems that I have at work are the stuff of nightmares.
  • 8
    Main reason I suspect: PHP is readily supported on any host set up for websites. There's no crazy ritual with gigatons of useless and possibly defective shit code pulled in from all across the internet - looking at you, Node/NPM.

    You put in a PHP script, and off you go. Just as easy as "gcc mycrap.c -o mycrap".
  • 4
    @Fast-Nop I always felt that way with PHP, there is really no ceremony to many of the tasks done, even a rest api can be simply set without really needing to use a framework or even generate a composer package repo system. I always cringe at the amount of space needed to do even the simplest of express projects with node, and even though I like Node I just can't with the idea of pulling so much shit for something that would just take me a couple of files with php.
  • 4
    @AleCx04 @Fast-Nop

    My greatest issue with nodejs is you pull in a shit tonne of code you didn't write or inspect as you fetch latest dependencies and prey it works or you're dependency hell works with you're deployment, and latest version at deployment time could have changed from a testing phase.

    PHP you bring in a lib and it's set for life unless you update it, giving you the control and certainty that what's being deployed was what you tested.

    I come from a day where the only major options were php or asp, ah how the early 2k was simpler.
  • 3
    @C0D4 Also, dependencies pulling in other dependencies until you have 5 GB of JS trash and then running a crazy ritual to throw 95% away leaves you with no idea what code you actually have retrieved from which sources, and whether you even want to trust them. Left-pad anyone?

    This doesn't resemble anything like professional SW development. I'd be inclined to regard this uncontrolled, jerry-rigged, duct-taped build chain as shit show suited only for toy projects.

    And yeah for PHP, sure there's a lot of junk out there, but at least you know which junk from which sources you even have, and you can vet the important parts.
  • 3
    @Fast-Nop I personally don't trust the ecosystem of nodejs, left-pad was a hilarious and eye opening event for me proving just how fragile it is, nodes place as far as I'm concerned is a quick and dirty prototype but shouldn't be the be all and end all for production software.
  • 4
    @C0D4 well, there was perl to ;)

    But thats something else.
  • 2
    @Voxera I always wanted to get more into perl, but my main issue was that i could make sure that my code was written as clear as possible yet it seems that the community gives 0 shits about making their stuff readable :P
  • 1
    @AleCx04 much of he perl problem as far as I experienced is that you use regex for so many things and since regex is built into the syntax, for one not very good on either regex or perl this looks like pure jiberish :/

    Also the fact that many perl scripts are written as one big script is an obstacle as it can be hard to navigate.

    This is mostly coding standard and if you split it up into multiple files, annotated any regex with a more readable description, I think most would at least be able to read and understand what it does.

    I had to dig into one shopping card script we had back in 97-98 when we wanted to replace the frontend applet with js as the applet did not fit into the site and also lost everything when you changed page.

    So we reversed engineered what the backend script received and built our own front end cart using frames (yes I know but frames was the new fancy tech).

    But I have not touched perl since then.
  • 0
    Both cater to oldheads who dont mind using shit languages
  • 1
    @tekashi You won't find a better portable macro assembler than C.
  • 3
    @tekashi bitch I am 28 lmao
  • 3
    @AleCx04 hey grandpa, time to stop being a dinosaur and make way for this younger generation😅

    Oh wait... I'm older then you 😱
  • 2
Add Comment