The MediaWiki development experience

For WMF employee / slave nonsense, developer hijinks, and MediaWiki and related software screw-ups.
User avatar
Bbb23sucks
Sucker
Posts: 1351
Joined: Fri Jan 06, 2023 9:08 am
Location: The Astral Plane
Has thanked: 1285 times
Been thanked: 274 times

The MediaWiki development experience

Post by Bbb23sucks » Sun Jul 02, 2023 6:12 pm

Ok, let's imagine that you are a Wikipedia fan boy and wish to help develop MediaWiki - after all, it's a big, open source project, so it can't be that hard, right? Wrong.

So you go to mediawiki.org, and you'll eventually end up on this stupidly named page which explains almost nothing about actual development. After a lot more looking, you'll eventually find this. Now THIS is the real deal! Right? Wrong. Their "documentation" is just an automatically list of comments in their code. In fact, it's so useless, you will be better off just ignoring it completely and just grepping things on your own machine.

Now let's get to their actual code, it's the most unreadable mess I have seen. And believe me I have seen unreadable code.

Refactorization (or lack their of)

To understand why it's so bad, you need to understand a little bit about programming: Overtime, code will be reshuffled and modified as it is written and to meet changing needs. Unfortunately, since the original code was designed for different conditions, the new code will be generally inferior in quality to if it was written from scratch. This is known as "code debt". Usually this is solved via a process known as "refactorization", where some or all of the code is rewritten.

Now let me explain what the WMF does: They never refactorize code, instead they "defactorize" it. They take the original broken code and brake it more by splitting into tiny parts and distributing those parts across several files.

Deprecation

Now let's talk about the next major problem: Deprecation. Usually deprecation is done when all the functions of some set of old code is now preformed by a new set of code and this new set of code is exclusively used internally. The old code remains, but it is only accessible externally and is only their for backwards compatibility as all new code should be using the new interface or functions.

That's not what the WMF does, instead they "deprecate" code that is currently in use with "plans" to write an alternative. Of course, these "plans" never come to fruition and ten years later, the "deprecated" version is the de-facto one to use. This often leads to "reprecation" where the "deprecated" function increases in usage, while the new version is de-facto deprecated.

Here's an example: To create a user you would think that you would go to the user class and create one. And you can do that. But it's deprecated. Because some idiot came up with the "brilliant" idea of defactorizing the creation process to its own class. And these people have the NERVE to claim that "object-oriented programming models the real world" NO IT DOESN'T! Especially not this. Want to know what idiot did this? None other than "MediaWiki developer" DannyS712. This is the kind of "development" he does.

Actually attempting to write code

Even finding a function to do something is insanely difficult. First thing, there is a 99.99% chance that there is no real documentation or tutorial (even if it is something basic). Second, attempting to search for the thing you need will lead to many things that aren't what you want. Your typical search results will look like this:
  • Something completely unrelated that just happens to have a word in it that matches your search result.
  • An API for the thing you want to do (likely not what you actually need).
  • Something with the same name as what you need (but actually does something entirely different).
  • A function that was deprecated in 2005 (made worse by the fact that sometimes that is actually what you need).
  • The thing you actually need (if you get lucky).
Now if you actually find the thing you want, you'll have to deal with "toolkits" or "services" or "factories": random collections of functions that are needed to do almost anything. Which things are included in which "toolkit" isn't really clear, you'll just have to guess. This is made worse by the fact that are different toolkits for each "mode" of operation that MediaWiki runs in.

The "best" strategy

The best strategy to find something is not to directly look for it. But to think of something else that probably uses it and copy that thing's implementation. It's basically like reverse engineering. Now that I think about it, maybe I was wrong to call that article in the beginning "stupidly named". Most of hacking is reverse engineering, and so is most of MediaWiki development.

Occasionally (very very occasionally), there will be a guide on mediawiki.org for what you want. Unfortunately, the guide will probably only contain the very basics of what you need, be missing large amounts of essential steps, can several major errors, and still won't work anyway because it was last updated in 2009 and everything in it was removed ten years ago.

Because of all of this, it will take hours, possibly even days, to do even the simplest operations. There isn't a learning curve either, because there isn't any learning, just trial and error.

How do WMF developers deal with it?

I don't know, but my theory is that they don't. They probably do the same stuff as the rest of us. That's probably why their development takes so long and why they're always yearning to use anything other than their own software. After all, if it takes hours just to write a few lines of code, it makes sense that it would take months, years, or even decades to do anything substantial.
"Globally banned" since September 5, 2023 for exposing harassment.

User avatar
Kumioko
Sucks Mod
Posts: 860
Joined: Wed Aug 23, 2017 11:54 pm
Has thanked: 43 times
Been thanked: 177 times

Re: The MediaWiki development experience

Post by Kumioko » Tue Jul 04, 2023 11:10 am

Like most companies I've been associated with Wikimedia has a few really good developers holding things together. Magnus Manske and sam reed are 2 off the top of my head. Then there are some that aren't very good and most are somewhere in the middle.
#BbbGate

User avatar
badmachine
Sucker
Posts: 459
Joined: Sat Feb 25, 2017 1:55 am
Has thanked: 557 times
Been thanked: 261 times
Contact:

Re: The MediaWiki development experience

Post by badmachine » Tue Jul 04, 2023 6:43 pm

lol on DannyS712's user page he states:
I wrote m:User:DannyS712/Global watchlist.js, which creates a basic global watchlist, and then converted it to a proper extension as part of a grant from the WMF; see the extension documentation. Try it out: m:Special:GlobalWatchlist.
the MediaWiki page for global watchlists has redlinks on it. maybe this extension was abandoned or incorporated idk

DannyS712 got $11,000 for making the extension (and probably more)

User avatar
Bbb23sucks
Sucker
Posts: 1351
Joined: Fri Jan 06, 2023 9:08 am
Location: The Astral Plane
Has thanked: 1285 times
Been thanked: 274 times

Re: The MediaWiki development experience

Post by Bbb23sucks » Tue Jul 04, 2023 7:55 pm

badmachine wrote:
Tue Jul 04, 2023 6:43 pm
lol on DannyS712's user page he states:
I wrote m:User:DannyS712/Global watchlist.js, which creates a basic global watchlist, and then converted it to a proper extension as part of a grant from the WMF; see the extension documentation. Try it out: m:Special:GlobalWatchlist.
the MediaWiki page for global watchlists has redlinks on it. maybe this extension was abandoned or incorporated idk

DannyS712 got $11,000 for making the extension (and probably more)
I think I know what job I'm getting...
"Globally banned" since September 5, 2023 for exposing harassment.

User avatar
Kumioko
Sucks Mod
Posts: 860
Joined: Wed Aug 23, 2017 11:54 pm
Has thanked: 43 times
Been thanked: 177 times

Re: The MediaWiki development experience

Post by Kumioko » Wed Jul 05, 2023 11:43 am

There are quite a few people getting grants and suckling from the WMF teet. Some like Magioladitis seem to have a knack for it, but a lot are just trying to scam the WMF out of donation money.
#BbbGate

User avatar
ericbarbour
Sucks Admin
Posts: 4626
Joined: Sat Feb 25, 2017 1:56 am
Location: The ass-tral plane
Has thanked: 1158 times
Been thanked: 1848 times

Re: The MediaWiki development experience

Post by ericbarbour » Wed Jul 05, 2023 5:46 pm

Bbb23sucks wrote:
Sun Jul 02, 2023 6:12 pm
Now let me explain what the WMF does: They never refactorize code, instead they "defactorize" it. They take the original broken code and brake it more by splitting into tiny parts and distributing those parts across several files.
Sloppy and lazy development processes are typical for the "open-source" and freeware world. It's been argued about since the mainframe days. As I see it, if you don't have an arrogant bastard like Stallman or Torvalds screaming at people to clean up their code submissions, you end up with "spaghetti".

That was how MediaWiki was written. They didn't have a strong leader who understood coding, they had Jimbo Wales. He has some minor experience writing code but a real talent for manipulating fools into doing whatever feeds his fragile little ego. Not a good recipe for software development.

And now the WMF is so desperate, they're offering cash rewards. Instead of actually HIRING GOOD PEOPLE AND TREATING THEM WELL.

User avatar
Bbb23sucks
Sucker
Posts: 1351
Joined: Fri Jan 06, 2023 9:08 am
Location: The Astral Plane
Has thanked: 1285 times
Been thanked: 274 times

Re: The MediaWiki development experience

Post by Bbb23sucks » Wed Jul 05, 2023 6:21 pm

ericbarbour wrote:
Wed Jul 05, 2023 5:46 pm
Sloppy and lazy development processes are typical for the "open-source" and freeware world. It's been argued about since the mainframe days. As I see it, if you don't have an arrogant bastard like Stallman or Torvalds screaming at people to clean up their code submissions, you end up with "spaghetti".
I disagree. Most of horrors of their own, PAYED developers. The very small amount of good code within Wikipedia has been written by volunteers. No doubt there is lots of bad and incompetent developers within open source/free software. But there are just as many incompetent idiots that are salaried by megacorps. There are plenty of examples of it working successfully. For example: Blender. They have managed to create something with 1000x the capabilities of anything from the WMF with a budget of about $2,000,000 per year. How? Because they employ who are good at programming, as opposed to lots of codemonkeys. That, combined with a healthy community, is how you create good software.

Also, freeware is different from open source/free software. Freeware is still proprietary, it is just offered for free.
ericbarbour wrote:
Wed Jul 05, 2023 5:46 pm
As I see it, if you don't have an arrogant bastard like Stallman or Torvalds screaming at people to clean up their code submissions, you end up with "spaghetti".
Same could also be said for proprietary software. It just happens behind closed doors. You will eventually need strict quality control with any project with more than a couple dozen people working on it.
ericbarbour wrote:
Wed Jul 05, 2023 5:46 pm
That was how MediaWiki was written. They didn't have a strong leader who understood coding, they had Jimbo Wales. He has some minor experience writing code but a real talent for manipulating fools into doing whatever feeds his fragile little ego. Not a good recipe for software development.

And now the WMF is so desperate, they're offering cash rewards. Instead of actually HIRING GOOD PEOPLE AND TREATING THEM WELL.
Exactly! Start with garbage, end with garbage. If you want to have any hope of ending up with anything good, you must start with good, simple, clean code and dedicated GOOD programmers to start with. If you don't have these things, you will fail no matter if it is proprietary or open source.
Last edited by ericbarbour on Thu Sep 21, 2023 6:31 pm, edited 1 time in total.
"Globally banned" since September 5, 2023 for exposing harassment.

User avatar
Bbb23sucks
Sucker
Posts: 1351
Joined: Fri Jan 06, 2023 9:08 am
Location: The Astral Plane
Has thanked: 1285 times
Been thanked: 274 times

Re: The MediaWiki development experience

Post by Bbb23sucks » Thu Sep 21, 2023 6:57 am

"Globally banned" since September 5, 2023 for exposing harassment.

User avatar
ericbarbour
Sucks Admin
Posts: 4626
Joined: Sat Feb 25, 2017 1:56 am
Location: The ass-tral plane
Has thanked: 1158 times
Been thanked: 1848 times

Re: The MediaWiki development experience

Post by ericbarbour » Thu Sep 21, 2023 7:06 pm

Bbb23sucks wrote:
Wed Jul 05, 2023 6:21 pm
I disagree. Most of horrors of their own, PAYED developers. The very small amount of good code within Wikipedia has been written by volunteers. No doubt there is lots of bad and incompetent developers within open source/free software. But there are just as many incompetent idiots that are salaried by megacorps.
You know I can't disagree. I'm old enough to remember the age of mainframes. The WORST software I had to deal with, unquestionably, was written by IBM engineers. Not only is OS/MVS one of the least efficient, most byzantine, most cryptic operating systems I've ever seen, and JCL is one of the worst "scripting languages" of all time, many large IBM customers are STILL USING IT TODAY.

Instead of making giant mainframes to run that crap, they have the "Z Series". A small multiprocessor server in a big ugly black box with an 800-pound steel weight in the bottom to make it heavier and therefore more impressive. I am not joking. The damn thing "apparently" runs a special version of Linux natively, which runs an obscenely complicated emulator, which emulates their old 370 series mainframes, on top of which runs MVS and applications. Because their big stupid customers (banks, industrial companies, and yes, government agencies like the IRS) want to keep running their 50-year-old financial-transaction code, usually written in hopelessly archaic COBOL. Oh well, at least they have multiprocessor redundancy built in. That's what you get for $15 million (and up, and up).

Another insane aspect of modern life that no sane science-fiction writer would have dared to predict. The "cyberpunks" were wrong about so many things.

Was this pile of mush-mouthing shit written by undeclared paid editors? Chances are excellent.

https://en.wikipedia.org/wiki/User:Klbrain
https://en.wikipedia.org/wiki/Special:C ... .76.67.254
https://en.wikipedia.org/wiki/User:ThisIsNotABetter
And one who did self-declare. Only one.
https://en.wikipedia.org/wiki/User:Davidlharlan
Last edited by ericbarbour on Thu Sep 21, 2023 7:32 pm, edited 1 time in total.

User avatar
Bbb23sucks
Sucker
Posts: 1351
Joined: Fri Jan 06, 2023 9:08 am
Location: The Astral Plane
Has thanked: 1285 times
Been thanked: 274 times

Re: The MediaWiki development experience

Post by Bbb23sucks » Thu Sep 21, 2023 7:47 pm

To add to this, it's often said that software development has negative economics of scale (as in that it becomes worse and less efficient with larger teams). And I'm inclined to agree. You need not look further than modern web development to find examples.

Just look at a company like Twitter or the WMF. They have hundreds if not thousands of highly salaried developers and yet their software barely works (if at all in Twitter's case). Compare that to Blender, which despite only 39 permanent employees (many of which are only part time) that individually get paid far lower salaries, have created a highly usable and versatile software suite that is used by some of the biggest animation studios.
Last edited by Bbb23sucks on Thu Sep 21, 2023 11:33 pm, edited 5 times in total.
"Globally banned" since September 5, 2023 for exposing harassment.

Post Reply