# Normalised empires

When talking about empires, different ones come to mind: the roman empire, China, the British Empire, all encompassed larges swathes of territories during centuries or more, but they are somehow difficult to compare. I was wondering how the comparison would be if you normalised them.

One simple way to do this is measure them in year-men, i.e. the population multiplied by the length of the empire in time. My calculation are very approximate, taking the mid-point population is probably a very bad approximation for the integral of the population over time, but it is late. This yields the following table:

Duration Population (mid-point) Product 426 (206 BC–220) 57’671’400 24’568’016’400 503 (27 BC–476) 58’800’000 29’576’400’000 289 (618–907) 65’000’000 18’785’000’000 891 (330–1453) 9’265’000 8’255’115’000 162 (1206-1368) 100’000’000 16’200’000’000 624 (1299–1923) 20’769’225 12’959’996’400 268 (1644–1912) 268’238’000 71’887’784’000 99 (1815–1914) 400’000’000 39’600’000’000

I find it interesting that empires start at around 10 Giga-person-years (so I should have kicked out the Byzantine Empire). With the exponential growth of population it is not surprising that the two heavy weight empires (Qing Dynasty and British Empire) are closest to the present time.

If we use this metric, if we consider the USA as an empire that started in 1945, then it would have an approximate size of 14’913’164’515 persons-years, in comparison the People’s Republic of China is 49’264’740’000 persons-years.

# Redbot

While building a web-site is easy, making sure it works smoothly is not. One area that is often neglected is making sure that the caches and the proxies on the client side work properly: loading resources takes time, so making sure a maximal amount of data can be cached in the network can improve performance. I just found a good tool for this: .

RED is a robot that checks HTTP resources to see how they’ll behave, pointing out common problems and suggesting improvements. Although it is not a HTTP conformance tester, it can find a number of HTTP-related issues.

Thanks to this tool, I fixed the following issues on the server hosting this blog:

• Added missing MIME types for images, this was highlighted by testing my image test page.
• Added compression for certain MIME types (svg).
• Added expiration times for some image types, but also for html.

# Image Formats

One fascinating aspect of HTML is the fact that a web page written for a web browser released 19 years ago will still display fine (pages designed for later browser are much more of a problem). Today we take the ability to have images within a web page for granted, but it was the big innovation of the Mosaic web browser. The tag for inserting images into web-pages was proposed in a simple e-mail from Marc Andreessen:

I’d like to propose a new, optional HTML tag:
IMG
Required argument is SRC="url".
This names a bitmap or pixmap file for the browser to attempt to pull over the network and interpret as an image, to be embedded in the text at the point of the tag’s occurrence.
An example is:
`<IMG SRC="file://foobar.com/foo/bar/blargh.xbm">`
(There is no closing tag; this is just a standalone tag.)
This tag can be embedded in an anchor like anything else; when that happens, it becomes an icon that’s sensitive to activation just like a regular text anchor.
Browsers should be afforded flexibility as to which image formats they support. Xbm and Xpm are good ones to support, for example. If a browser cannot interpret a given format, it can do whatever it wants instead (X Mosaic will pop up a default bitmap as a placeholder).

While the tag was universally adopted, the image formats he suggested were not. No browser I know of supports XPM images, and XBM support is far from universal. If you do not see an image in this post, your browser does not support XBM. This made me curious, so I created a small image test page, it contains the same image (the Telefunken PAL test pattern) in various formats. The image range from esoteric formats like Targa, to old workhorses like Tiff to the newest proposals like WebP. As far as I know, no browser manages to display all the images.

# Création de personnages

Un des aspects du jeu de rôle qui m’ennuie le plus est la création de personnages. L’option classique consiste à expliquer les règles et à laisser chaque joueur créer son personnage, ce qui veut dire une grosse heure de lecture de règles et des bricolage d’options. Si les règles des jeux récent sont plus simples que celles des classiques, elles mettent en général plus d’emphase sur le concept du personnage, ce qui n’est pas toujours quelque chose de trivial à trouver.

Le résultat est souvent un groupe de personnage pas très bien dégrossis, surtout quand les joueurs ne connaissent pas bien le jeu et il faut souvent plusieurs parties et quelques ajustements pour avoir quelque chose qui fonctionne, surtout pour un jeu comme Serenity où les avantages/complications sont en grande partie gérées par les joueurs.

L’alternative consiste à avoir des pré-tirés créés par le maître de jeu, l’avantage c’est que les joueurs peuvent commencer à jouer immédiatement, et les personnages peuvent être conçus de telle manière à bien s’intégrer dans les premiers scénarios. Le problème c’est que cela requiert plus de travail du maître de jeu, et les joueurs n’ont pas leur personnage.

Une des originalités de Serenity, c’est que le vaisseau du groupe de personnages est créé avec des règles similaires à celles utilisées pour créer des personnages. L’idée est sympathique, car elle permet de faire du vaisseau un protagoniste à part entière de l’histoire, et de réutiliser des règles connues par les joueurs. Évidemment, on se retrouve avec les mêmes problèmes de création, avec en plus un effet de comité.

Un système de création de vaisseau que j’ai trouvé très amusant est celui du jeu de plateau Galaxy Trucker. L’idée est qu’on construit un vaisseau en ajoutant des tuiles sur un plateau, chaque tuile est une option, une fonction du vaisseau. Les tuiles qui ne sont pas connectée correctement au moment du décollage tombent. Le temps imparti pour construire le vaisseau est limité, et les tuiles sont partagées entre les joueurs.

Je me demande si on ne pourrait pas faire un système similaire pour créer des personnages, surtout pour un jeu comme Serenity.

• Un plateau par type de personnage: pilote, mécanicien, capitaine, mercenaire, etc.
• Une tuile par aspect du personnage: caractéristique, avantage, défauts, écoles, alliés, ennemis, capacités spéciales.
• Une couleur par type de connexion: famille, métier, unités, compagnies, guildes, amants, ennemis
• Les avantages et les caractéristiques ont peu de connexions, les tuiles encombrantes (guildes, famille) en ont plus.
• Les tuiles sont face cachées, une fois découvertes, elles sont partagées parmi les membres du groupe.
• Un joueur n’a le droit de garder qu’un nombre limité de tuiles en main

Je ne sais très bien comment représenter la palette d’options de personnage de manière graphique pour qu’elles tiennent sur une tuile, mais ça me semble jouable.

# Computer Science is the new Latin

I recently found an article on the BBC website about an campaign to get kids to study computer science called “Coding is the new Latin”. This made me ponder, as I studied latin in high-school. I think this slogan is quite correct, and probably very bad.

Computer science increasingly underpins all forms of communication in our societies, so did latin in the past. For a long time, learning latin was considered the basis of a proper education, and its proponent argued (and still do) that this is necessary because latin is a basic building block of our culture.

While learning latin gave me a better understanding of the french language, and was probably a good mental gymnastic to learn both programming and foreign languages like japanese, it was also quite boring and sterile. Latin is a dead language, so you basically spend your time translating stuff that has been translated by millions of students before you, you learn a lot of words, none of which will ever be used to even order a beer. Although some part of my latin courses might have paid off later, I did not enjoy them, nor was I very good, I had pretty bad grades. I also cannot pretend that I have a better understanding of culture and society around me than people who did not study latin.

What is the relationship with computer science? For most of my life, the world of computer science was full of dilettante, people who did no formal studies in that field. In fact, most of the famous people in the world of computers fall into this category: Bill Gates – studied at Harward, Steve Jobs – dropped out of College, Steve Wozniak – dropped out of Berkley, Mark Zuckerberg – dropped out Harvard, Tim Berners-Lee – studied physics, Grace Hopper – PhD in Math, was rejected from Vassar College because here latin scores were to low. Basically, once you get to the names the general public knows less or not at all, you get computer scientists: Vint Cerf, Linus Torvalds, James Gosling, etc…

Our cultural landscape is dominated by people who have never read a line of latin, the computer science landscape is dominated by people who did not study it. Sometimes the reasons are different, i.e. the people studied before computer science existed as a field of study, but one core similarity remains: both culture and computer-science have a low barrier to entry – although this might be changing.

Another similarity is in the study: studying latin is two things: understanding the grammar, memorising lots of vocabulary and then banging your head on how the various grammatical rules were abused in practice. Computer science is two things: mathematics, and coding. Everybody knows and fears maths, but coding is in my opinion closer to playing a musical instrument: there is a bit of theory, but it is mostly practice, you need to discover how the various computer science concepts were abused by frameworks and libraries.

There are marginally more chances of becoming rich or famous in studying computer science than latin, but the social stigma is also higher, when did you last see a stereotypical latinist in a hollywood movie?

Image: Lupa Capitolina – ⓒ Óscar Palmer – Creative Commons

# Why military robots are a bad idea

Discussing walking robots with a colleague made me realise that military robots are a really bad idea, beside the obvious ethical reasons. I’ll leave to others the discussion about moral issues of building machines that can kill or hurt either autonomously, or at least with great emotional distance, and concentrate on the technical part: this can only go wrong.

Any robot whose software has been compromised is a problem, if said robot has military capabilities, this is a much larger problem, and if one is deploying robotic soldiers, there is – by definition – someone who wants said software to be compromised. Consider a web-browser. This is a very simple system, it receives data from a single source (the network), and has to handle a few reasonably well defined protocols: HTTP, HTML, Javascript, some image formats and maybe Flash. Yet, we cannot create a secure version of that simple system.

Now consider a robot soldier in the field: it will receive data from the its sensor and a data link to its chain of command. Those data sources are both high volume and insecure, the enemy can not only try to tamper the data link, but also send all kinds of noise unto the sensors of the robot. If you only consider the vision system of the robot, this is a system that needs to handle a high volume of complex data: a human eye has a bandwidth of 10 Mbit/second, so one can assume that robotic eyes will be similar or better. A single exploit in one of the vision handling routines, and you have a rogue robot.

Some will argue that the military can afford to write much more robust code than civilian systems, that they can afford much better engineers. I have my doubts, the Stuxnet debacle has shown that critical system are not better designed or protected than consumer systems, and US military drone were shown to send their video feed unencrypted. More importantly, the military tend to consider information (intelligence) and threats in two separated categories, the mere fact of having a robot look at some funny looking picture or hearing some strange audio sequence and then crashing or going mad, inconceivable, that would be something out of Monty Python show. History shows that armies adapt to a threat after they have been whacked by it…

# The avengers

I missed the Avengers while it was playing in theatres, but given the good reviews it received, I had decided to order the Blue-ray at the first occasion. In the end, pre-ordering the thing on amazon ended up not being the fastest way to get it, but I had a lot of other stuff to do, so I completely forgot about the whole thing until the day I received the package.

The Avengers is the latest in the set of movies based on the Marvel comics franchise, many of which I have seen: Iron Man I & II, directed by Jon Favreau (2008. 2010), Thor (2011) directed by Kenneth Branagh and Captain America: The First Avenger (2011), directed by Joe Johnston. The Avenger is the movie where the various parts of the puzzle are assembled under the direction of Joss Whedon, of Buffy and Serenity fame, so the expectations were pretty high.

Building a movie, or even a story around a group is always something tricky, while this is the standard type of narration in roleplaying games, movies and books tend to center or one or two characters. Gluing together characters that have been introduced in movies by other directors is also not simple, the choice of Joss Whedon whose previous stories where pretty good at telling the story of a group was in my opinion a good one.

I would say the movies work reasonably well, I was engaged, I laughed, and the movie is certainly one notch above the previous ones in the franchise. The movie is basically one plot with multiple overlaid groups and relationships, some work, others not so well.

• The relationship between Iron Man / Tony Stark (Robert Downey Jr.) and Bruce Banner / The Hulk (Mark Ruffalo) works very well, and ends up being the centre of the movie. They are also the most ambiguous characters of the group, neither heroes nor agents.
• The relationship between Thor (Chris Hemsworth) and Loki (Tom Hiddleston) works much less and I think there are multiple problems with this part of the movie: first Loki’s plan makes no sense whatsoever, second compared to the Kenneth Branagh movie, Thor lost most of his grandeur: Stark is more megalomaniac than he is, Hulk is stronger. Also he is competing with Captain America (Chris Evans) in the I don’t understand this world departement. Finally the relation between Thor and his brother gets stale, Loki tricks Thor in boring ways, and Thor does not even react.
• The relationship between Black Widow / Natasha Romanoff (Scarlett Johansson) and Clint Barton / Hawkeye (Jeremy Renner), the assassin and the spy basically, is OK, but a bit to cliché, so it ends up overshadowed by everything else, in a sense I found the small role Black Widow had in Iron Man II more interesting. The fact that Gwyneth Paltrow playing Pepper Potts, Tony Stark’s assistant, manages to be more sexy in this movie than black window also seems strange.
• Nick Fury ( Samuel L. Jackson) and Agent Phil Coulson (Clark Gregg), form the backbone of Shield and are recurring characters in the whole set of movies. I had the feeling that their part was missing some dynamic element, maybe this is why agent Maria Hill (Cobie Smulders) was introduced, but in the end, she does mostly action scenes.

This approach of having a lot of plots thrown into the mix, with the general expectation that some of them will work is again, for me, very reminiscent of role-playing games. What I found interesting is that here it works, I found the movie good despite its weaknesses, and it was a box-office hit.

In summary, a fun super-hero movie, probably the best in the Marvel franchise. I doubt my recommendation will encourage any geek to see that movie, mostly because said geeks probably saw that movie a long time ago.

# Iron Sky

Finish humor is one of those things you are hard to describe or even understand, yet if somebody could make a funny movie about Nazis from the Dark Side of the Moon, it was some finns. I had heard a pretty good review of this movie by Mark Kermode, the movie made quite some buzz on the internet, and had part of its financing done by crowd-funding, so I was quite curious to see what the result was like.

Iron Sky is a Science-Fiction comedy produced by Timo Vuorensola based on a story written by . The movie is set in 2018: unbeknownst to the rest of humanity, the nazi that fled in 1945 have been hiding on the dark side of the moon, where they plot their return.

While this movie is clearly a comedy, it features the two necessary elements for a good science-fiction movie: a plot centered around characters you can care about, and an interesting background. Iron skies pits on one hand a version of the United States where somebody like Sarah Palin became president, and whose PR team staged the landing of black model on the moon to get her re-elected, on the other hand a nazi colony hidden on the dark side of the moon, completely cut of from what happened on earth, which hopes to re-conquer the earth with World War 2 technology.

The plot centers on two characters, Renate Richter, played by Julia Dietze, a pretty nazi earhtologist that is supposed to marry the next Moon-Führer (Klaus Adler, played by Götz Otto) and James Washington, a model turned astronaut for a PR stunt, he is played by Christopher Kirby.

While Iron Sky is certainly not a masterpiece, it is a fun movie that works. Some of the special effects are cheap and most of the science in the movie does not make sense, but I believed and cared about the characters and chuckled at the jokes. I liked the steampunk look of the of moon-nazi base and engine, the fact that for the most, their technology, their mode of though and their fashion had stayed in the 40’s.

One of the key characters of the story is Vivian Wagner, the PR agent of the US president, played by Peta Sergeant, without giving to much of the plot away, she is the bridge between the two worlds, and I think, says a lot about the relationship between modern PR and propagada of yore, and I think her performance is one of the reasons the movie works. While the movie is quite short (93 minutes), it still manages to cram quite a few references and jokes, including of course Charlie Chaplin‘s The Great Dictator and a very good re-acting of the “Hitler reacts to…” sequence of the movie Der Untergang which saw so many spoofs and adaptations on the internet.

In summary, a fun movie with some good cynical undertones, a must see if you like Pulp or Steampunk style movies.

# Give me the sound

🎶

The open source tool `ffmpeg` is something of a swiss army knife of multi-media manipulation, you can do nearly everything with it. It also has one of most confusing collection of command-line switches I have encountered. Where as in traditional Unix tools you can specify the input without switches, ffmpeg works the other way around. The error report is also quite obscure. This means that when I want to something with it, I typically have to read the manual again to get anything done, or hope somebody has written down the exact instruction for what I want to do.

If you just want to extract the audio track of a video file `A.mp4` into `B.m4a`, the command is the following:

`ffmpeg -i A.mp4 -acodec copy -vn B.m4a`

This will not do any transcoding, but just change the containers (i.e. no conversion loss), the `-acodec copy` switch tells ffmpeg to just copy the audio stream, and the `-vn` switch tells ffmpeg to drop the video stream. Quite clear when you know it…