Listen

Description

Sorry for the lack of news recently — I’ve been tinkering around with a spanner in the underbelly of the great steampunk machine which is the JC. The website’s performance — how quickly it serves pages — had fallen off a cliff. It had even started refusing to serve pages at all. The more I looked into it the more I realised I had to do something. The problem turned out to be twofold:

Bots

Firstly, bots. There are a lot of random webscraping devices roaming the dark netherworlds of the Grid that just incessantly hit unsuspecting websites. They have always done this, but it is getting worse. There are good webscrapers — Google does this so that its search engines work — sort of bad ones — all the AI engines just harvest text for training material, which is kind of annoying — IP fundamentalists get very wounded about it — but it is also nice to think my bloviations might form part of the forthcoming memeplex forging a contingent path to our future in the digital simulacrum — and baaaaad ones — these come from China, mostly, and Russia, and God knows what they want with the JC but, until recently, they were making up about 90% of all traffic and slowing down everything for everyone else.

No more. Good webhosts can help with this, and JC now has measures in place to throttle these bots. One is just blocking traffic from China altogether. Sorry Chinese ISDA fans!

This Substack is reader-supported. To receive new posts and support my work, consider becoming a free or paid subscriber.

Moi

Secondly, to put not too fine a point on it, me.

I have designed and built the JC in a decidedly evolutionary way. I got stuck with certain design decisions I made — or didn’t make — early on and that was that. It is like the famous XKCD cartoon:

This is a common feature of all big organisations of any longevity. At the heart of every investment bank, be assured there will be some Wang server kicking out ASCII code on an orange screen that is absolutely fundamental to the risk management systems, and which no-one dares remove for fear of unintended consequences. In smaller ways it is true of the JC. As I’ve gone along I have configured things in certain ways that seemed sensible at the time, but in hindsight not so much.

The nature of evolutionary adaptation is that ostensibly good decisions get sedimented into the architecture, overlaid with more and more stuff, and it gets harder and harder to go back and fix them because of all the knock-on consequences. Usually, it is not until much later that ostensibly good decisions reveal themselves to have been bad decisions.

Some were good decisions, once: whether a decision is good or bad is situational — we tend to forget this: hindsight conquers all. But unintended knock-on effects aren’t always obvious. They depend on how the future unfurls. (That figure of speech is wrong, by the way: it implies the future is already there waiting for is, like a rolled-up flag, and just needs to be revealed. But the future is not like that: it needs to be invented).

I have a piece upcoming about non-catastrophic failure modes in complex systems — “systems glitches” — that can lie latent in a system for a long time, and the longer they lie, the more they are normalised and start to look like normal functioning. The Post Office Horizon debacle is a good example. So, I think, is the Healthcare Serial Murder phenomenon. But there was one right under my nose.

This is also what happens when non-experts dabble. I am, first and foremost, a windbag: I am no web developer. And I made the choice a long time ago to use the MediaWiki platform, which is really good at being a knowhow wiki, but not very good at user rights management, founded as it is on the premise that information should be free, and the assumption that lots of people would be contributing and not just one.

I “solved” the problem of rights management by creating two wikis, and having them talk to each other. The premium wiki pulls all the free content from the main one, and then overlays it with extra juicy stuff. (This is mainly of interest to people involved in legal negotiation — especially ISDA — so if you are here for the Otto Büchstein’s cod Shakespearean melodrama fear not, you are not missing much. But if you want even more about Indemnifiable Taxes then, boy oh boy, is the Premium subscription for you!)

Anyway this two-wiki approach — which as far as I can tell, I invented by myself — has created some performance issues. Because requests to view one page creates all kinds of demands to load content from the other wiki. Because of the complex interplay of transcluded templates.

This is much more interesting than it sounds.

Templating

The thing that first sold me on Mediawiki is its really cool templating feature. Over my life parents, siblings, teachers, lecturers, bosses, children and most long-sufferingly, my spouse have railed and bemoaned my impulsiveness, lack of attention to detail, goldfish-like attention span, general slapdashery and a tendency to get easily carried away. (Also fecklessness and verbosity but they’re not important right now). I tend to be all over the place, as anyone who has tried to arrange a meeting with me more than ten minutes into the future will know.

Apparently, by the way, this is a classic trait of ENTPs. We also tend to build self-organising systems around ourselves and get into set routines, because force of habit is a great way of remembering to do things.

THERE I GO GETTING DISTRACTED AGAIN.

Mediawiki has this system of dynamic templating that is brilliant for building self-organising systems. I got really into them. They are what makes the site so apparently organised and so content-rich, but if you get too carried away with them they can become quite an albatross.

I got quite carried away.

Templates are essentially reusable gobbets of text. There is a different area on the wiki called the Template namespace where you can create little slugs of text, name them, save them down and then “call” them in the main pages of the wiki by writing their names inside {{double curly brackets}}.

At first blush this is just a time and labour saver: if I create a template called “QBF” with the text string, “the quick brown fox jumps over the lazy dog”, then I can “call” that text string on any page in the wiki by typing “{{QBF}}” and saving the page.

So if I type:

“my mother called me yesterday to tell me {{QBF}}.”

That would render as:

“my mother called me yesterday to tell me the quick brown fox jumps over the lazy dog.”

This is called “transcluding”. The term was coined by Ted Nelson in his 1982 book Literary Machines to describe the idea of a document including portions of another document by reference, rather than by copying the text.

Transcluding probably seems unremarkable. But it does two things: it saves keystrokes and it ensures consistency. Every time you get the same words, the same capitalisation, the same form: you can be confident it will always be “jumps” and not “jumped”. It saves you having to think about it. It compensates for a lack of attention to detail. It dramatically reduces faff. I have a template {{otto}}, for example, that returns the text “Otto Büchstein” because it is a pain in the arse remembering how to put the umlaut over the ü. And as all metal fans know, umlauts are a matter of, um, grave importance.

But there is more. Templates can have variables in them. Variables are designated by triple curly brackets. So I could set my {{QBF}} template up as follows:

“the quick brown {{{1}}} jumps over the lazy {{{2}}}”

Now if I “call” {{QBF|orang-utan|moon}} it will render as:

the quick brown orang-utan jumps over the lazy moon

I can quickly create a magical universe of all kinds of wonderful quick brown things jumping over lazy things. I can add more variables for the adjectives! There is a world of possibilities! I could rewrite the template as

The {{{1}}} {{{2}}} {{{3}}} {{{4}}} over the {{{5}}} {{{6}}}

But of course, at some point you might as well …



This is a public episode. If you'd like to discuss this with other subscribers or get access to bonus episodes, visit jollycontrarian.substack.com/subscribe