I mean, PHP is used on at least ~35% of sites (based on the number of sites that run WordPress), so PHP itself has already taken over the world :)
Aussie living in the San Francisco Bay Area.
Coding since 1998.
.NET Foundation member. C# fan
https://d.sb/
Mastodon: @dan@d.sb
I mean, PHP is used on at least ~35% of sites (based on the number of sites that run WordPress), so PHP itself has already taken over the world :)
Facebook has used Hack for a long time now, which is very different from PHP these days. It’s entirely statically typed with a bunch of advanced features that PHP doesn’t have.
Yahoo used a lot of PHP too, back when they were still very popular.
People tend to hate on PowerShell but it’s cross-platform these days, and far easier to write than shell scripts once you understand the syntax.
You can pipe objects between functions, rather than just string streams like in Bash. Often there’s no cut
, sed
, grep
, etc needed as what you want is probably a property on an object.
It’s not just a basic scripting language like Bash. It’s built on top of .NET, so most of things you can do in C#, you can also do in PowerShell (and if not, you can call into C# code).
It’s especially popular for administration of Windows systems - if there’s anything you want to do on a Windows system, it’s likely there’s a PowerShell module for it.
there was no resume!
IMO the HTTP Range
header (the thing that lets you resume downloads) was one of the best innovations back then. It let the client tell the server where to start the download from, and how much of the file to download. This means it also let you speed up downloads by downloading multiple pieces in parallel. I used to use a program called GetRight and loved it.
We still split up downloads like this today. These days, internet connections are often fast enough that you can’t reach full speed with a single connection, so speed tests and things like Steam will open multiple concurrent connections for their downloads to maximize download speed.
I hosted my personal site using Mono over 10 years ago now and it mostly worked well. I contributed some code to Mono to fix a few edge cases where their behaviour deviated slightly from Microsoft’s.
Of course, I couldn’t actually look at Microsoft’s shared source code when doing that, so I had to just observe its outputs. At the time, Mono code had to all be clean-room implementations, since Microsoft’s shared source program, where they released parts of the .NET Framework 4.x source code publicly, had a very restrictive license that didn’t permit reuse (it wasn’t open-source). Even just looking at the code meant you couldn’t contribute to Mono.
I was very happy when .NET Core was announced and switched to a beta of 1.0 as soon as I could.
It’s not as common any more, but there’s still things using logic programming languages (Prolog and similar) even today.
Java uses it in the type checker. From the JVM spec:
The type checker enforces type rules that are specified by means of Prolog clauses.
There’s some other compiler and NLP (natural language processing) use cases for it too. I’ve seen some companies use it to define restraints for their business logic, which isn’t too different from the type checker rules use case.
It’s definitely fallen out of common use though.
Some people in my office have their work email synced to their phones
Sure, but configure it to turn off notifications outside work hours. Unless you’re oncall, it’s probably fine to handle the new emails during business hours.
stdClass is for objects. I’m talking about maps. I guess you could use stdClass for maps too, but that feels weird.
PHP causes so many issues because of the fact that it uses the same syntax for both arrays and dictionaries/maps. []
(or array()
in older PHP versions) always JSON encodes to []
because there’s no way to tell if it’s supposed to represent an empty array or an empty dictionary.
The best programming languages let you pick if arrays are base 0 or 1. Shout out to Option Base 1
.
The OS in a container is usually pretty barebones though. Great containers usually use distroless base images. https://github.com/GoogleContainerTools/distroless
I write it in lowercase but then the auto-formatter we use at work converts it to uppercase when I save the file.
I love auto formatters. Prettier (the initial version for JS) really popularized the concept. If the coding style is automated where possible (things like tabs vs spaces, tab width, line wrap at 80/100/120 characters, where to put line breaks in long statements, etc), it ensures the entire codebase is consistent, and I can jump between different code bases with different coding styles without having to think too much about it.
My favourite MySQL error is “MySQL server has gone away”, like MySQL decides “nah I don’t want to run this” and runs off.
(it happens when no data is sent over the connection for a while, like if the query is taking too long to run and times out)
Haha I only mentioned the run time to provide some context, since a lot of people have only ran OLTP queries that take less than a few seconds to run.
You don’t “program” things with SQL
Why not? It sounds like you haven’t written any OLAP queries :)
I’ve written ETL data pipelines using a system similar to Apache Airflow, where most of the logic is in SQL (either Presto or Apache Spark) with small pieces of Python to glue things together. Queries that are thousands of lines long that take ~30 minutes to run and do all sorts of transformations to the data. They run once per day, overnight. I’d definitely call that programming.
Most database systems support stored procedures, which are just like functions - you give them some input and they give you some output and/or perform some side effects.
This reminds me of Apple plist files, which appear to have been invented by someone that doesn’t know how XML works.
NuGet (for C# / .NET) is far better than npm.
It’s also much faster to install packages than npm or pip since it uses a local package cache and each package generally only has a few DLL files inside.
Also, if you care about Windows, threads are far lighter than processes on that platform. Starting a new process is relatively slow compared to other platforms.
There’s a few things it’s very good at, but anything outside of that tends to be painful.
I also used Pascal and Prolog in university, in my first year. That was… 15 years ago now. Wow.