On prediction

AVON: Let us examine the nature of prediction. The human mind is capable of seeing into the short-range future with reasonable accuracy. For example, imagine that you are standing on the edge of a cliff.

BLAKE: As long as you’re not standing behind me.

AVON: [Pause] There are a number of alternative futures. You could take a pace forward and plunge to your death. The cliff could crumble under your feet with the same result. A gust of wind could carry you over.

BLAKE: All right, all right, yes. But the probability is that I would turn round and walk away again.

AVON: Exactly. You have just made a prediction based on the known facts. A computer works on precisely the same principle.

BLAKE: But all you’re saying is that prediction is not immutable fact.

AVON: Right. If you hadn’t gone near the cliff in the first place, you wouldn’t have had to face any of the inherent dangers.

From: Blakes 7, series 2, epode 1, Redemption.

Thinking about ancient Rome again…

Even Zmyrina

There was a woman called Asellina who ran a snackbar in a small provincial town in Italy during the second half of the first century. One year she had plastered political messages all over the outside of her eatery in support of a fellow called Fuscus who was a political candidate.

“Vote for Fuscus,” one of the messages read, “Asellina’s girls ask this of you, even Zmyrina.”

It actually said this, “nec sine Zmyrina”, literally ‘not without Zmyrina’.

That is an interesting thing to say. Even.

This could mean:

  • Zmyrina was a very particular woman and she would not just support any candidate.
  • Zmyrina was a very popular waitress and an endorsement of her hit harder: ‘not just, but even’.
  • Or maybe we are witnessing something rare, maybe opinions could hardly ever be extracted from Zmyrina.
  • Most of the time, Zmyrina simply did not know.
  • Zmyrina did not like Fuscus very much, except, as turns out now, for his politics.
  • Zmyrina just needed a mention, as Maria and Aegle already had gotten theirs elsewhere on the building.

Other explanations are certainly possible.

Part of me is curious to know what Asellina meant and to find out what kind of person Zmyrina was, but an equal part, maybe even a fraction more, prefers to keep it a mystery.

Cicero teaches Pompey to abbreviate

One of ancient Rome’s richest people, Pompey, had his theatre built in the Campus Martius. He wanted a plaque that said who had paid for all of this splendour and this plaque would list among his achievements his three consulships. Apparently ‘thrice consul’ is difficult to write in Latin, it is either ‘consul tertium’ or ‘consul tertio’, so he asked a bunch of people for advice, and finally put the problem to the famous speaker, writer, lawyer and politician Marcus Tullius Cicero.

Cicero did not want to make the people who had been asked before him look silly and so he suggested: why not abbreviate it? Make it ‘Consul tert.’.

Later, eye witnesses declared that the text on the plaque ended up being ‘consul III’.

According to Aulus Gellius the matter is settled though:

  • -o indicates an order: first, second, third.
  • -um indicates a count: one time, two times, three times.

‘I am the third consul since so and so’: consul tertio. ‘I have been consul three times’: consul tertium. You won’t find these useful life tips on any other blog!

The inevitability of Rome

Rome used cheats; it had three books that foretold the future. They could have had nine books, but the king was not willing to pay the asking price, so the lady who had written them burnt six.

Strange 1000-year old women distributing prophecies to kings may not have been real, but they were the basis of a system of government, for the books were real and the Romans took them serious – at least until Christian terrorists destroyed them 900 years later.

The 15 keepers of the books were tasked by telling the senate on demand what to do in order to avert calamities.

After the books were destroyed, the Western Roman Empire declined rapidly. I am not saying, just saying.

3 pet peeves

It is old-man-shouting-at-clouds time.

“Get off my lawn, clouds! And stop mixing my metaphors!”

A bunch of years ago I started writing down my pet peeves, convinced that I would end up with a hefty list. ‘Peeves’, because, well that is what they are; and ‘pet’ because I would rather have them than solve them.

The list never grew to a significant size, so perhaps it is time to release the few I have gathered into the wild. Here goes:

Peeve 1. Histories of countries that go back considerably further than the country could reasonably be said to have existed. Neither historians nor encyclopaedians need be nationalists, and if they are, they should state so upfront.

I can make an exception for histories of the terroritory that a country currently and accidentally occupies, as long as those histories are rewritten everytime a border changes, i.e. every 5 or 10 years or so.

I could give you an example, but … it is all the countries, I am afraid.

Peeve 2. The use of the word masterpiece to describe anything other than a work or a coherent series of works made by an apprentice to prove that they have mastered the profession they have been training for.

I am willing to forgive the entire lack of an apprenticeship because, honestly, who does those anymore? I draw the line at one masterpiece per artist though.

Peeve 3. Something bothers me about tips – i.e. nodules of knowledge, specifically the suggestion that experts in a field are keeping small, easy to grasp bits of knowledge or skill close to their chest, but these nodules, once revealed, immediately make the recipient productively skillful or knowledgeable.

That is not how knowledge or skill works.

That is not to say that genuine tips do not exist. If I see someone struggling with mastering a certain skill and it takes me back to my own problems learning the same thing and what I needed to do to get over the hump… sure, I can share that story. That would be a genuine tip.

Any listicle that claims to contain tips does not contain tips, though.

Smartwares RM149 ‘teardown’ (smoke detector)

Here is a photo for those who want to see what a Smartwares RM149 smoke detector looks like on the inside.

[Photo of the insides of a smoke detector]

I opened one after it produced a false alarm in the middle of the night (apparently you need to vacuum them regularly to prevent bugs or dust from blocking the sensor) to see if I could see the blockage.

As you can see though, the sensor is in its own housing (the round black thing with the pencil marks) and I did not feel confident I could open it without breaking things, so I did not.

The metal plate in the right element lines up with the three springs in the top right of the left element.

The two elements are attached with four plastic clips (seen on the left element) and a small phillips screw (seen peeking through the battery compartment in the bottom right of the left element).

How I select hosting providers in the Netherlands

In the past 25 years I have had a bunch of web hosting providers turn bad.* Meaning I have had to look for new ones every 4 years or so. That may make me somewhat qualified to tell you how to select a new hosting provider for your website.

Or it may say something about me, namely that I am unfit to pick reliable hosting providers.**

But hear me out; I may be wrong, but I am also somewhat experienced.

When looking for a new web hosting provider, the following selection criteria keep popping up.

– Advertised technical criteria: bandwidth, storage and so on. These are basically the only criteria you can use to compare between providers.

– Basic support: how easy is it to get support for basic problems? For example, you tried to set up a second mailbox but something went wrong and now you need help fixing it. Some of this can be measured, e.g. when the hosting provider says they only provide support during weekdays, or when they will help you move your site between providers, but won’t help you set up new mailboxes.

– Crisis support: what happens when a server keels over? This has happened several times to me and there can be stark differences in the urgency with which a hosting provider tries to right their ship. Unfortunately, due the rarity of these cases, this is typically only something the quality of which you find out once it happens.

– Age. I mean, what is this provider’s life-cycle and at which stage are they now? Presumably providers start by paying for a lot of equipment upfront. This is a great time to be a customer, because your sites are hosted on brand spanking fresh stuff, top of the line, for competitive prices. Then the providers sit back and count their money, while gear ages out of relevance, quietly, in the background. Every new provider you discover offers the opportunity to discover a new Ponzi scheme.

Granted, I do not actually know if this is how it works. What I do know is that my customers and I have had several instances where we suddenly found ourselves on a server that was consistently a lot slower, which at the very least suggests that providers keep their old hardware around.

– Sharing. Sharing is good, right? Most providers share the hardware on which your site runs with dozens if not hundreds of other customers. This makes it so they can charge you 10 euros a month for hosting instead of 300. Sharing is possible because most websites only receive a few visitors per day. If you had the server to yourself it would be idling most of the time. Most web servers should be able to serve a few dozen visitors per second, let alone a day.

One thing, however, a provider can do to deal with rising operating costs is split the server beyond what would be good for your website. First it is 30 users per server, then 60, then 600. Unfortunately, visitors that have to wait a long time to receive a webpage from a busy server tend to leave at some point.

– Reputation: not many of the above criteria are measurable. In the end, the only way to decide is to look at the reputation of providers.

So what is my advice?

If you are looking for a hosting provider, make sure you compare the metrics that you can compare; then pay a lot of attention to reputation. If a close friend with very similar needs to yours is ecstatic about their hosting provider, that should probably count for more than if a hosting provider checks all the checkboxes, metrics-wise.

If you are happy with your provider, always keep an eye out for signs of trouble. A good sign can be when something goes wrong, but the provider immediately and flawlessly fixes it. Providers that learn are a good sign. Providers that, as I have had happen recently, try to force you onto a new product that seems worse than the old one and expect you to pay 3 times as much for it — those are a sign of trouble (regardless of whether the new product objectively makes sense).

Basically, how providers deal with challenges may not always be transparent, but it always seems educational.

Footnotes

* A couple of patterns emerged. The most common was: hosting provider gets bought by bigger fish, hosting provider turns to garbage.

This is not necessarily an indicator that the bigger fish is garbage. Bigger fish can engage in asset stripping, where they keep the customers that overpay by orders of magnitude and try to entice the rest into buying a different product, by reducing the service on the current product.

If that happens to you, your best bet is to get ready to move to a different provider. Unfortunately you don’t always realise on time that that is happening to you.

The other pattern then is logically the smaller, fiercely independent provider who gets things wrong because they simple lack the knowledge and experience that being big can bring.^

** “But Branko,” I hear you say, “you are a web developer. Should you not know this?”

The thing is, new customers are not new to the web. They already have a site somewhere and that is where they will host the next one. It rarely happens that I have to also recommend the provider. ^

Some tips for updating a manually installed Drupal 9 site to Drupal 10

I was hired recently by two companies to upgrade their Drupal-based websites from D9 to D10.

Both had in common that their sites weren’t controlled by Composer, but had been manually installed.

This is relevant to this post in 2 ways: 1) most online documentation assumes you use Composer and is therefore of limited use for the upgrade process if you are not using composer, and 2) a Composer upgrade may go wrong in ways that a manual upgrade does not and vice versa.

1) Read the Drupalize.me upgrade tutorial.

In the following I am going to assume you have read that document.

2) Drupal 10 is Drupal 9.5 with bits taken out.

That is still from the above document, but I am going to explain what that means.

What it means is that if you have upgraded everything as far as it goes in the D9 branch, and I do not just mean Drupal core, but also contrib modules, contrib themes, custom modules and custom themes, you are 90 % of the way there.

Upgrading everything means also upgrading contrib modules to a next major version that supports both D9 and D10 if the current version only works with D9. Upgrading to a major version may mean loss of functionality, so make sure that after all those upgrades the site still runs the way you like.

2a) The Metatag module pretends to not be upgradeable.

This is a known bug that has been solved in later versions.

3) Remove unused and uninstalled modules.

As in, uninstall and then remove the files. Drupal will try and read uninstalled modules, and D10 will definitely croak if it finds incompatible uninstalled modules.

4) Learn how to clear caches without a running Drupal install.

There are going to be conflicts between the cached database configuration and the actual code. They will lead to a down website. Being able to clear those caches and then log in and run the database scripts is important.

5) Learn where your PHP and/or web server error logs are.

Modern error messages can be confusingly woolly, but they typically at least give you some idea of which contrib module or theme is acting up.

If you forgot to upgrade a contrib module to a version that supports D10, now is when you will find out.

Error messages are great for googling. Often times you will be sent on a wild goose chase by people who don’t know either but who cannot avoid pretending they do, but sometimes you will find the solution.

6) Update custom themes.

One of the changes in D10 as compared to D9 is that it uses Twig 3 instead of Twig 2. In Twig 2 a number of features were deprecated, so check your custom themes for these features.

If you are confident that your theme will work with D10, you can edit your *.info.yml file so that the core_version_requirement field lists ^10.

There probably are a lot more things that can go wrong and a lot more tips that can be given, but these are the ones I have for you.

If you can learn one thing from this post, learn that you should get your D9 install as close to D10 as you can before attempting the actual upgrade. Failing to do so will almost guarantee a broken site. An upgrade to D10 can be a lot of work, so it can be tempting to skip things. Drupal can unfortunately be pretty fragile at times, so a proper preparation is important.

Headless Wordpress equals…

I never quite understood what headless Wordpress means in practice, but then I decided to apply some maths to the problem.

Tell me if you believe this works:

  • headless chickens = wordpress developers;
  • headless = (wordpress developers) / chickens;
  • headless wordpress = (wordpress^3 developers) / chickens.

A simple way of getting to know the Vue Javascript framework

(Disclosure: this may work for me but not for others, see the bottom of this piece for why.)

Vue is one of the larger and more popular Javascript frameworks.

It is very versatile and has great documentation. It can be used in different ways, either using Single File Components or as a library. It supports different API styles (options or composition) and offers a range of build tools. If you want to learn Vue, there is the Guide, the Quick Start and the Tutorial.

In other words, there are a ton of resources for beginners and quite frankly, when I tried to start learning Vue a couple of weeks ago, it was too much. I could not see the forest for the trees.

And by that I mean: I failed to start making even the simplest of applications in Vue.

So here is what I ended up doing:

(The underlying assumption being that you, like I, already know the 3 web technologies of HTML, CSS and Javascript.)

  • Follow the exercises in the Tutorial.
  • Create a minimal app in the Playground.
    • Hello World suffices, but if you want to see if you can make something more complex, you can do that too.
  • Download your prototype from the Playground (button: Download Project Files).
  • Download and install node.js.
  • CD to your project files.
  • npm install
  • npm run dev

This is more or less the same procedure as the one outlined in the Quick Start section of vue.js. That section, however, tripped me up, because it produced a more than minimal app, and as such it didn’t give me a very good idea of what a minimal Vue app looks like. (The Quick Start app might help to provide some contrast though, I am certainly not saying that it is useless.)

I ended up scooping out the parts I did not need from the Quick Start app, but this left me with a broken app. I needed a gentler start, something that would let me put “Hello World” on the screen without having to worry about a ton of other things.

The tutorial let me do exactly that, but it would not let me save the results as an app.

The Playground would.

In fact I still use the Playground even now that I am working on my own app, just to quickly try out things that don’t work in my (currently) 550-line (and counting) app.

Note that if you use Vue as a library you end up with none of these problems and quite frankly, to each their own. I personally liked the workflow from the Tutorial (Single File Components and Composition API), so I tried to recreate that.

Pet peeve: people asking Vue questions on Stack Overflow without reducing their code to the minimum required to reproduce their problem.

Discussion: note that the Vue Playground only uses the Composition API at the time of writing. This is a fairly recent API: if I am not mistaken, it was introduced a little under 3 years ago. If you had tried Vue before or already have some Vue experience, this might not be the way for you.

The table-top game that packs tons of strategy in a sprint

7 Wonders Duel

If you are looking for a two-player table-top game and can curb your rage, buy this game.

The other day my friend told me my table top games are boring. She has also taken to calling me a boomer, so I had to move quickly! (Rest assured, I fit solidly in the Gen X bracket.)

So I contacted a couple of real gamers and told them:

I am looking for something that:

  • can be played by 2 players
  • is quick to learn yet stays challenging
  • takes between 10 and 30 minutes to finish
  • card or board
  • costs up to twice of what you might expect from a ‘small’ game.

They gave me a list of suggestions, two of which I bought.

And hoo boy, was 7 Wonders Duel a hit! My friend and I have played the game about a dozen times in the span of two months.

(The other game? ‘Twas Claim, the German Whist with vampires. I like it, but we have barely touched it.)

So first: what is it? 7 Wonders Duel is a spin-off from the game 7 Wonders (in case you happen to know that one) and is a mixed card (drawing) and board game. In it you build cities and civilisations: the player with the most evolved civilisation wins.

There are three victory tracks: military, scientific, and points. Although the military and science tracks work very well to keep your opponent on their toes, you will find that their victories are hard to achieve and most wins end up being points victories.

There are three eras represented by three decks of cards, each card representing a building. Furthermore there are the eponymous wonders, seven of which can be built at most. Although wonders are more expensive than regular buildings, they convey unique advantages (such as playing a zombie card from the discard pile, or playing an extra turn) that regular buildings do not.

Like I said, it takes some time to explore the rules and options, so I am not going to list them all. There is, however, if you are interested, a video series on the Tubes of U called Watch It Played that does a heavily commented play-through. Here is the first episode. My apologies in advance for the tweeness. Oh, the tweeness!

Since the game can be played in less than 30 minutes, even a heavily annotated play-through won’t take a lot of your time, and they have helpfully divided the play-through into a number of videos.

Back to the review!

Let us get this out of the way: 7 Wonders Duel almost hits all the points from my wish list. The only exception being “quick to learn”, but really, that is only a problem for the first 2 or 3 games; and since each game takes about 20 to 30 minutes, it is not much of a problem at all.

Also, the first era is the simplest, then the second, then the third, so you sort of learn to play the game as you go.

As for why it is such good game, that is much harder to express. Saying “it is a very balanced game” is, while true, also not something that is going to set a lot of hearts aflutter. Nevertheless, if you hate the type of game where once you have figured out the moves that guarantee a victory and given the right conditions – skill, luck – you are going to always win, this might be the game for you.

There are numerous paths to victory, but only a selection of them available at any given time. What makes the game really interesting though is that every time a card is played, this selection of paths changes and you have to adapt your strategy. What you end up doing is trying to play a balanced game while stimying your opponent at every possible opportunity. Basically, you are not just playing your own game, but in your head also your opponent’s.

Some of the ways you can influence the way your opponent’s game flows:

  • Build a wonder with a free turn attached, so you can play two cards in row.
  • Sell a high value building before your opponent can get to it.
  • Play the science or military track, so your opponent no longer has a free hand but must respond.
  • Build the sort of wonder that lets you destroy your opponent’s money or buildings.
  • Win a free resources coin so you no longer have to worry about money.
  • And so on…

There are two minor down-sides to this game, in my opinion, and I mention them just to be complete:

The first is that, even though I rarely get worked up because of a game (or rather, never until now), I felt the rage rise in me on a couple of occasions. Make a couple of bad moves and you get stuck into a losing rut that is almost impossible to get out of. Your opponent may not even notice it, but to me it felt that she was starting her victory laps half an era before the end, with me tied behind her chariot as she kept going around the Circus Maximus.

Note that I am not saying that if one of the players is a sore loser, you should not play it. This is a game that it might be worth being a sore loser about, if that makes sense.

The other problem is, or so it seems to me, that the balance is so fine that if I were to physically lose a couple of cards (maybe the dog ate them), I am not sure the game would remain as playable.

Note that the game introduces randomness by letting you discard 13 cards unseen at the start, 3 for each of the first two eras and 7 for the last, so you have some leeway. Nevertheless, if you lose a couple of high value cards (let us say, both the papyrus resource cards), that’s gotta go and skew the game a bit.

At first I wanted to deduct a point for that last bit. Then I realised I have already had a handful of hours of fun out of a game that can be had for less than the cost of a night’s out, so docking a point for that seemed churlish. I can easily afford a spare. Therefore I am giving 7 Wonders Duel the full 5 out of 5 points.

By the way, another way to try before you buy is play one of the online versions. I believe both are free to play.

Rating by brankl: 5.0 stars
*****

Photo showing part of a table with two sets of playing cards on top, spread out. A text overlay says «the deck» for the top set and «your city» for the bottom.

Image 1: the deck gets laid out in a pre-defined fashion and then players take turns taking the cards that are face up and not covered by any other card. If face-down cards are no longer covered by other cards, they must be turned up before the next player’s turn.

Photo showing two cards. The one on the left is brown, is called Clay Pit and has an image of bricks over an image of a coin. The one on the right is read, is called Stables and has two images, one of a shield and swords and the other of a horse shoe, over an image of some sawed up tree trunks.

Image 2: one of the players has paid one coin to build the clay pit and one wood to build the stables. Since the player does not posess wood, they will have had to pay the bank two coins instead – more if the opponent produces wood. The rewards are worth it; the clay pit will produce one brick per round for the remainder of the game and the stables will move the player’s army one step closer to the opponent’s city. The presence of a white symbol (here a horse shoe) means the player has the chance to build a related military building for free later in the game.

Link: the printed book as a preservation device

My 2008 article about digital deterioration of e-books has, in a fit of irony, become unfindable through Google. The reason may be that no-one links to it any more, including the platform on which it was published.

So let me link to it myself:

The printed book as a preservation device

In the article I discuss three dangers that beset digital works:

  1. Format deterioration
  2. Digital Rights Management (DRM)
  3. An adversive position of archivists

I offer no achievable solutions to these problems, but point out that, ironically, because of these dangers a print version of a book offers a greater chance of said book surviving the ages than the digital version does.