You know, I used PHP back in the early 2000s and sometimes I miss it after having worked with Python, Ruby and Elixir over the years but it's not necessarily related to the language itself.
I use this one program called Sendy (a PHP app) to help manage my email list. It's a typical LAMP set up.
It's been running on a $5 / month server uninterrupted for 905 days with no down time related to the app malfunctioning. The whole system uses around 300mb of memory.
Yesterday I decided to spin up a new server to finally retire the old one since it was using Debian Jessie that just went EOL 2 weeks ago. This required migrating a ~3 year old version of Sendy to the newest one (dozens of database schema changes included) and export / import my entire database.
Everything just worked and all I had to do was rsync the PHP files to a directory and access the site in a browser, and it was upgraded and ready to go.
I even ran into what I thought was a bug because my existing forms weren't working, so I looked into the single PHP file that was the form's action and within 5 minutes determined I was missing a hidden field (something Sendy added in a recent version). That was the first time I ever looked at its source code and PHP in a long time.
It very much reminded me of my PHP cowboy days. No complicated build process, no dependencies (the whole app uses PHP's standard library), no having to restart the server between deploys, etc.. I know there's downsides to that and I'm very aware of them, but after having worked with increasing complexity for the last 10 years of web dev, man it felt nice for a change.
Sendy is without a doubt one of the worst written pieces of software I’ve ever had the displeasure of (a) supporting in product And (b) having to patch.
I would quit working in software dev and become a fucking gardener before I would work on Wordpress projects all the time, and Sendy makes Wordpress look well written.
Edit: cowboy is a very apt term for Sendy. If the cowboy were drunk, and tried to make babies with the cows.
"Sendy is without a doubt one of the worst written pieces of software I’ve ever had the displeasure of (a) supporting in product And (b) having to patch."
So you're saying you've never worked with Magento?
My thoughts exactly. Sometimes I think I hate Magento for being so overly complex, slow, resource-intensive, and feature-poor yet bloat-rich that only Adobe could be interested in it. Then I think of the poor people paying me to maintain and write extensions for it.
Does magento have any kind of code reuse, at all? Does it use classes to encapsulate logic and data? Does it use any kind of separation of logic and display?
If it has any one of those things it’s already better than Sendy. Sendy literally (and I mean literally not figuratively) looks like someone used stack overflow and copy/paste instead of any kind of education or experience writing code.
I didn't carefully analyze the code base but in my mind it's a victory if I can skim code in an unfamiliar code base / language and within a couple of minutes figure out a problem (not a problem with the code, but how I was using it).
Did you run into bugs with it that required patching? I haven't to my knowledge.
It doesn’t support (and yes I asked the author, he refused to add support) tls connections to the database (despite that being a ~2 line change when the dB handle is opened) - because the code is a metric fuck ton of copy pasted code (ie the same exact code copy and pasted in dozens of files) patching it to support tls means we have a non trivial system in place to patch the code.
It also tries to use a MySQL database as a queue/cache which is (predictably) terrible at larger volumes when you have eg a db cluster tuned for durability rather than raw throughput.
Can you elaborate on what makes it that bad? Some snippets of code, or egregious bug reports to satisfy my curiosity. Otherwise, it feels like bad-mouthing software.
For example the db connection logic is about a dozen or so lines. Those same lines are copy pasted into dozens and dozens of files. The same goes for other logic.
Want to fix a piece of logic (ie add tls support to the db connection)? Well you have a couple of dozen files to make the same change in.
And no i can’t link to it because it’s proprietary, and the really ridiculously bad code is even “obfuscated”, in a manner.
I use this one program called Sendy (a PHP app) to help manage my email list. It's a typical LAMP set up.
It's been running on a $5 / month server uninterrupted for 905 days with no down time related to the app malfunctioning. The whole system uses around 300mb of memory.
Yesterday I decided to spin up a new server to finally retire the old one since it was using Debian Jessie that just went EOL 2 weeks ago. This required migrating a ~3 year old version of Sendy to the newest one (dozens of database schema changes included) and export / import my entire database.
Everything just worked and all I had to do was rsync the PHP files to a directory and access the site in a browser, and it was upgraded and ready to go.
I even ran into what I thought was a bug because my existing forms weren't working, so I looked into the single PHP file that was the form's action and within 5 minutes determined I was missing a hidden field (something Sendy added in a recent version). That was the first time I ever looked at its source code and PHP in a long time.
It very much reminded me of my PHP cowboy days. No complicated build process, no dependencies (the whole app uses PHP's standard library), no having to restart the server between deploys, etc.. I know there's downsides to that and I'm very aware of them, but after having worked with increasing complexity for the last 10 years of web dev, man it felt nice for a change.