Scratch

A few weeks ago, William told me he wanted to make his own computer game. So I installed Scratch on his laptop and told him to see what he could do. It turns out he can do quite a lot.

Scratch is a visual programming language. While it has all the features you would expect, the programming itself is done by dragging and dropping blocks rather than typing text. This makes for a very intuitive interface which allows you to get up to speed very quickly. Well, William did.

After a couple of pointers from me about loops and variables, he was off and now has a working game in which teleporting monkey has to collect various objects.

He then discovered that there is an online editor and a collection of tutorials and, after two weeks, he’s probably a better Scratch programmer than I will ever be. If he carries on like this, it’s not going to be long before he has a better handle on event-driven programming than I do.

As someone who makes a living as a developer, I’m not sure whether I should be proud or embarrassed.

Either way, Scratch itself is proving a very effective way of enabling kids to not only build their own applications, but also understand the underlying principles. The visual interface allows them to focus on developing applications, rather than having to worry about syntax, and the development environment provides instant feedback which encourages them to try things out and see what happens.

I am very impressed.

Facebook threatens to stop spreading conspiracy theories if they can’t spy on their users

Back in July, the court of justice of the European Union ruled that companies like Facebook could be prevented from sending data back to the US because they don’t have enough protections against snooping by US intelligence agencies.

The ruling didn’t immediately end all transfers, but does place a requirement on national data protection authorities to vet the sending of any new data to ensure that any personal data complies EU’s GDPR data protection rules.

And so to Ireland, where Facebook’s European operation is located and, therefore, responsible for enforcing this rule.

On Tuesday Facebook tried to strong-arm the Irish data protection commissioner by threatening to pull out of Europe if forced to comply with the law.

We live in hope.

I was going to go on a rant here, but then I noticed that the satirists at NewsThump have already been there: Facebook threatens Europe with fair elections decided by well-informed voters. What a prospect.

Of course, they’re bluffing and, by Wednesday Nick Clegg, Facebook’s vice president for justifying Zuckerberg’s tantrums, and former UK deputy prime minister1 was frantically backpedalling.

I find his arguments (as reported) more than a little disingenuous. He’s eliding personal data (which is covered by the GDPR) and data in general (which isn’t) and claiming that having to keep up with ever changing rules (they aren’t) is impossible (it isn’t).

Realistically, Facebook isn’t going to go anywhere. They might thrash around for a bit but, ultimately, there is too much money in spreading hate speach and algorithmically promoting conspiracy theories and the Zuckerborg will comply with whatever rules are imposed.

But imagine being able to go online without being endlessly monitored, and not having ever more extreme content pushed at you.

The technology exists. It’s called RSS and Daniel Miessler thinks that it’s time to get back into RSS. Personally, I never stopped using RSS — my reader of choice is Newsblur — and I can’t imagine not having a single place to find pretty much everything I have chosen to read or watch online.

Footnote

  1. Of course Liberal politicians end up working for surveillance capitalists. It’s 2020.

The spirit of Tony Hancock lives on

This is too wonderful for words. It turns out that almost all 57,000 articles in the Scots language version of Wikipedia were written, edited or overseen by a single person. Who doesn’t speak Scots.

That’s right, someone doing a bad impression of a Scottish accent and then writing it down phonetically is the chief maintainer of the online encyclopedia’s Scots edition. And although this has been carrying on for the best part of a decade, the world was mostly oblivious to it all – until today, when one Redditor finally had enough of reading terrible Scots and decided to look behind the curtain.

Emphasis mine.

My first thought when I read this was of Tony Hancock and, since everything is on YouTube these days, here is the scene I thought of:

It’s not clear whether the Wikipedian has spent the past near-decade creating thousands of fake posts as some kind of incredible practical joke, or that they honestly felt they were doing a good job. There have been occasional interactions with real Scottish folk taking exception to pages, and the administrator has responded in a dead-pan fashion.

I do hope that this is a joke — for the sake of the Wikipedian in question — because if he really is a latter-day Hancock then this is a screw-up of epic proportions.

Blob World

This is wonderful. There’s a guy on YouTube, going by the name of Primer, who uses a computer model to explore evolutionary concepts, which he discusses on his YouTube channel.

Visually, it’s all very simple but there is something remarkably appealing about watching these amorphous blobs evolve and survive as he discusses the concepts being displayed.

It gets better though. Jasper Palfree at MinuteLabs have taken Primer’s simulator and made an online gadget that allows you to play around with the initial settings and watch the blobs evolve.

The blobs have three traits — speed, sight and sense range — all of which mutate at a predetermined rate. You can choose both the initial values for these traits and the rate of variance, and then you let it run and see what happens.

It’s fascinating.

Administrative Note

This shouldn’t affect any humans following this site, but I have noticed that the various spam bots always target older posts. In order to splat them a bit, I have changed my WordPress settings so that comments will be automatically closed after four weeks.

If you run into any problem with commenting on the site, please let me know via the contact form.

Covid: Resurgence and risk

While the Covid infection rate is still trending downwards in Europe, there have been a few flare-ups and several areas have gone back into lockdown. In response, the European Commission’s research centre has launched a tool that provides an overview of which countries are most at risk.

It takes a while to load, and some of the data used can be a few days old, but it is interesting to see how various countries are coping. And clicking through to the underlying data is already proving to be far too much of a time sink for me.

What really leapt out at me when I first saw the map, though, was just how vast is the discrepancy in infection rates between England, Scotland and Wales.

Stay safe, folks.

Belated birthday wishes to PHP

PHP, the web scripting language that powers almost 80% of the web turned 25 yesterday. This is quite an achievement for something developer, Rasmus Lerdorf had intended as nothing more than a C templating language.

I remember playing around with the language in the early years of this century, back when it was still a new thing, and got as far as writing half a content management system before I discovered that B2 and (later) WordPress were achieving the same results in a far, far better manner.

PHP is the workhorse of the web but not fashionable. The language is easy to use but its dynamic and forgiving nature makes it accessible to developers of every level of skill, so that there is plenty of spaghetti code out there, quick hacks that evolved into bigger projects. In particular, early PHP code was prone to SQL injection bugs as developers stuffed input from web forms directly into SQL statements, or other bugs and vulnerabilities thanks to a feature called register_globals that was on by default and which will “inject your scripts with all sorts of variables,” according to its own documentation.

Which is probably a fair summary of the language. It’s very easy to pick up and start using but this ease of use also means that it’s similarly easy to get way over your head and create something of a disaster for yourself.

That said, it’s a well established language now and one that isn’t going anywhere. PHP will certainly still be around in 25 years time, but it will be interesting to see just how much further it develops over that time.

Administrative Note

I have just noticed that WordPress is being a bit over-aggressive with its spam filters. Consequently, several comments have been incorrectly blocked.

I have now released these, so if you suddenly see a reply to an old comment now you know why.

Board Game Arena and Blooms

A couple of months ago, someone mentioned Board Game Arena to me and I signed up to take a look. The site carries a huge collection of board games, all of which can be played online. You can either play in real time (live against an opponent) or (as is my preference, turn based in which each play has a day or more to make a move. Not all games lend themselves to turn-based play, but the ones that do are handled well by the site.

Board Game Arena has recently added Nick Bentley’s Blooms to the site. And this is proving to be a frighteningly addictive two-player game.

The rules are pretty simple. The game is played on a hexagonal board made up of smaller hexes. Each player has two sets of coloured stones. The first player players a single stone and in each subsequent turn players can place one or two stones onto any empty space — if you play two stones they have to be different colours. To capture a stone or ‘bloom’ of connected stones you have to surround them so that there are no empty spaces into which the bloom can expand.

And that’s it.

The game is inspired by Go in that you place stones to surround territory but differs in that the emphasis is on capturing stones rather than territory. Also, the much smaller board size makes for a much faster game.

The number of stones you have to capture varies depending on the size of the board (15 stones when it’s four hexes per side; more for bigger boards).

What makes this game really fascinating is that you have to watch out for your opponent’s pieces but also your own. Each player has two colours which means that, if you’re not careful, you can end up trapping your own pieces. This adds a whole new element to the game and one that makes it a real challenge.

I’m still terrible at this game, but the depth that emerges does leave me wanting to play more and to get a much better handle on the game. It’s a game that is easy to understand but one in which you really need to think about your moves if you want to avoid tripping over the sort of mistake that can quickly lose you the game.

It’s certainly a game worth playing, but I would suggest you avoid the four hexes per side option. This makes for a very small playing area in which the outcome is determined by whoever makes the first mistake.

Decoupling

When I last moved my blog, I exported my posts archive, used Vim to correct all of the internal links in the XML file and then imported it into the new instance. I don’t think an option to export and import media even existed back in 2010. If it did, I didn’t see it and simply FTP’ed the images from the old site to the new.

With the move to WordPress.com I encountered a couple of glitches. The first one was my own fault — I forgot to fix the links which means that there are still some posts on here posting to images on the old server. Those images are still there, so this isn’t a problem — yet.

Slightly more concerning is the fact that not all images seem to have been transferred. This could either be because WordPress didn’t always neatly organise it’s media files by year and month, or it may just because I have too many of them. Again, this isn’t a problem while the files can still be found on the old server, but I don’t want to be dependent on having to indefinitely maintain a bunch of old domains.

So I am thinking of hosting my media files elsewhere. Media Goblin is my first thought, which would allow me to host images elsewhere while retaining control over them.

I’m not in any great hurry just yet, but decoupling my posts from my images does strike me as an effective way of maximising flexibility at minimal cost.

Another task for 2019, I think.