So, how little data are too few?

Don't use percentages when the data you have are too few. If you have 3 data points then saying "%67 of reviewers gave it 5 stars" is both accurate and misleading. It is better to say "2 out of 3 reviewers give it 5 stars." Doing this assists the reader's intuitive grasp of the usefulness of the rating. When I was following the local school district's quantitative heavy presentations it was obvious when they chose to use percentages and when they chose to use counts in order to give a positive depiction of bad news.

So, how little data are too few? I would say anything less than 100 data points.

Four at a time

My miniature painting has not gone well. I am deep in guilt. A fellow gamer gave me all his 28mm dark age armies when he decided that he was not going to play that period any more. It was a very generous gift and I am grateful. I did not like his Norman army's painting, however, and so decided to repaint them. I stripped 27 figures and primed them. I used a priming method I had not used before on the advice of another gamer I trusted. The primer is a mixture of black gesso and a medium used for painting on glass. My results were not so good. I am sure it was my fault. The result was that the figures sat on the worktable for months. My guilt set in. I had made the gift useless.

Months later I was reading about primers, as you do, and was inspired by the article on using Krylon ColorMaster ultra flat black primer. I stripped all 27 of the figures again and applied the primer. My results were not so good. I am sure it was my fault. Again, the figures sat on the worktable in limbo. My guilt grew heavier.

This weekend I stripped all 27 figures again. They are, as I write this, sitting in a second round of stripper. Each of my successive primings seems to have actually added tooth to the figures and so has made cleaning them more difficult!

I have learned a few useful lessons form this experience. The small lesson is that primer I have used for years works and I really don't need to experiment. The big lesson is I can't work on so many figures at once. If I had only worked on 4 figures at a time then by the end of each week I would have 4 painted figures. And within two months all the figures would have been painted and have been on the table killing the Anglo-Saxons.

When the second round of stripper has eaten away at the bond between primer and figure I am going to pack them away. Too much bad karma has enveloped them. I and they need to rest. Instead, I am going to paint some old Warhammer 40K space marines. 4 at a time.

Getting Things Done for Teens

My children are off to college in the Fall and so my mind has been on what will help them succeed. I have always liked GTD and so I read the recent publication of Getting Things Done for Teens. The book does a good job of using a voice that it is not too young and not too formal. The GTD advice is laid out as any other GTD tutorial and is supported with some useful illustrations. I don't mind the two cartoon characters that are used to distinguish the impulsive and the steady centers of the brain. Monkey brain and Owl brain are useful mnemonics, but, perhaps, a little childish.

The book is composed of 3 sections. The 1st section is the GTD framework. The 2nd section is life planning with GTD. The 3rd section is troubleshooting with GTD. The 1st section is required reading. The 3rd section is useful, but its advise could have been rolled into the 1st section. The 2nd section is a mistake. Few American teens are mature enough to use the advise in this section. The 2nd section adds a considerable page count to the book's total. And here is the rub; the book is useful, but at 288 pages it is 200 pages longer than most American teens are willing to read without a clear & present need.

I don't doubt that the authors know their audience. I suspect they would agree that a shorter book is more likely to be read than a longer one. So why included the 2nd section at all? I suspect it has more to do with selling a standard sized product than helping the teens. My advise is to tear the book into front and back parts and then throw away the back part.

Graphviz online

I like Graphviz for quickly creating network graphs. Xin Huang compiled the code to JS and created this useful online editor. https://github.com/dreampuf/GraphvizOnline

JNDI, Tomcat, and ClassLoaders

If you want to use JNDI within a servlet container than you need to be careful to use the corresponding class loader for your shared resource. So, ensure that you have only one copy of the class in your JVM and then when you want to bind or lookup the resource use the resource's classloader. For example,

public <T> void bind(String name, Class<T> valueClass, T value) throws NamingException {
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    try {
        Context c = new InitialContext();
        Thread.currentThread().setContextClassLoader(valueClass.getClassLoader());
        c.bind(name, value);
    } finally {
        Thread.currentThread().setContextClassLoader(cl);
    }
}

public <T> T lookup(String name, Class<T> valueClass) throws NamingException {
    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    try {
        Context c = new InitialContext();
        Thread.currentThread().setContextClassLoader(valueClass.getClassLoader());
        return (T) c.lookup(name);
    } finally {
        Thread.currentThread().setContextClassLoader(cl);
    }
}
I am passing the valueClass to bind() so that an interface can be used if wanted.

Problems of a modern, digital, open office

Never liked open plan offices. Lots of studies going back to the 1960s on their problems. This new, small study shows the problems of a modern, digital, open office. Summary at Open Offices Make You Less Open.

Off-shore oil rigs

When I was a kid in the 1970's I was fascinated with off-shore oil rigs. I was living in the UK and there was much news about developing the North Sea oil reservers. I would see short snippets on the TV of rigs on maiden voyages, and exciting photographs in magazines highlighting their intricacies. By today's availability of information these few images were as ephemeral as smoke on the wind. So off-shore rigs had a mystery and a fantasy around them. Earthbound space colonies. Nevertheless, I was, and continue to be, inspired by their engineering and the unmitigated confidence needed to build them.

Now, of course, an internet search finds enough information to become an armchair expert in the off-shore oil industry. There are models to build. There is even, it seems, a sub-culture of 3D renders of them and other industrial sites (eg).

Photograph is of Norway's Draugen Oil Platform (src).

Computer assisted support for historical wargames will happen if...

My favorite wargames podcast is Meaples & miniatures. The hosts are all wargaming butterflies, and I mean this kindly, and so there is a good amount of new and old discussed and compared. Their 250th episode is their last of the Summer as they take a break to, well, rest and renew like the rest of the northern hemisphere. For this episode they are answering questions from their audience. I've not finished listening yet, but felt the need to bring a different perspective to one of their answers.

The question was whether or not an assistant computer application would be used in historical wargaming? Apps are appearing more regularly now for boardgames. Some of these boardgames have game mechanics and parts that are very close to those of miniature wargames. Even the forthcoming X Wing 2 is supposed to be app assisted. So, there is a trend in apps and there is a trend in wargames to be more like boardgames (in their initial costs and time commitments). An overlap is inevitable.

The hosts' common answer was one having to do with implementation rather than game play. They discussed how an app is dependent upon a general device, and a large networking and computing infrastructure. The general device being your phone which, for all practical purposes, you own but have little control over its OS or applications suite. The infrastructure being mostly the publisher's backend servers in data centers that run the core of the game programming; which, again, you have no practical control over. The hosts see these dependencies as the achilles heal of apps. They suggest that only large publishers have the money to continue to support a game that has passed its peek sales and so must sustain the game's implementation on smaller, incremental sales. While not said, and I expect that the hosts would agree, that it is optimistic to expect that any publisher would continue to support a game beyond its suitable profitability; ie, if profitability is too small then the company is better of discontinuing the game and use the freed-up resources on higher profit games. So apps are doomed!

Not so. There are implementations that do not require the publisher's continued support. First, some assumptions.

1. A phone or tablet is cheap enough to have a single, specialized use. The device is the game and it is the "rule book." Rule books are around US $15 to $50 these days. The device would be the same. The device will never be upgraded so the apps on it will continue working baring mechanical failure.

2. The device needs access to a messaging network. The messaging network is one where every device has a unique address and that a message can be sent to that address. If players are not colocated then a wide area network would be needed. The Simple Message System (SMS, ie texting) is one such network. There are others, but SMS is by far the most common, well supported, and almost future-proof given the world's telecoms commitment to it.

In many ways, the Kindle with 3G is an archetypal example of this device and network.

With such a device and network you can implement a multiplayer game very successfully. All the algorithms needed, eg peer to peer and modular co-operating services, are battle tested and open. The device's computational and storage requirements are minimal. The networking bandwidth needed is small, eg a few kilobytes, irregularly sent around to all player devices [1]. Embedded systems manufacturers have been designing and massively deploying just this kind of environment for years.

So, if you consider this different implementation of computer assisted support for historical wargames then the answer is yes, just as soon as gaming companies have lead engineers and architects that have a broader view of the devices and their communication. Now the real and important question can be asked, is historical wargames game play enhanced by having this assistant?

See my earlier posting $0.43 for Psychotherapist Barbie services about funding backend servers for toys.

[1] MMOs, massive multiplayer, online games, is a different beast. These systems do need a central or federated infrastructure.

Fourier Transform & Dubstep Drops

Two of my favorite recent finds.

But what is the Fourier Transform? A visual introduction.

Encoding data in dubstep drops

12 years training for this role!

So far, my children's senior year of high school has been mostly wasted time. This is especially so as their graduation day comes ever closer. I propose that we alter senior year from one of listening from the back of the classroom to one of teaching from the front. It should be year when the seniors go out into all the lower grades, K through 11, and be teachers's assistants. Who else has a better understanding of how to be useful and successful in schools than do these young adults that have spent 12 years training for this role?

Sleeping dogs

Sometimes you forget those services that quietly run for months at a time in a corner of the datacenter. I am thinking of using gRPC to replace the communication layer for our micro-services. They currently use a home-grown RPC over HTTP that, while successful and simple to use for new services, is home-grown, non-streaming, and Java specific. One of our earliest micro-services handles over 2B requests per month. Perhaps I should let sleeping dogs lie....

Struggling to load Arabic text into MySql 5.6

If you are struggling to load Arabic text or Emojis into your MySql 5.6 table then:

  1. Ensure your database, table, and column use uft8mb4 character set.
    create database XXXX character set 'utf8mb4' collate 'utf8mb4_unicode_ci';
    
    create table ( ... ) ... character set 'utf8mb4' collate 'utf8mb4_unicode_ci';
    
  2. Ensure that the data file you are loading is UTF-8 encoded.
  3. Run the mysql client with the binary character set.
    mysql ... --default-character-set=binary ...
    
  4. Load the data with the binary character set.
    loading load data local infile 'XXXX.DAT' into table XXXX character set binary ( ... );
    

Good Terraform and AWS tutorial

The Learn DevOps: Infrastructure Automation With Terraform tutorial from Udemy is very good. While it is focuses on using Terraform to manage AWS it also gives a good introduction on how to assemble AWS' many moving parts.

The only trouble I had with the examples was that the initial ones assume that you have IP access via the AWS default security group. That might not be the case and so you will need to use the AWS console to allow your machine's public IP address ingress. To do this, go to the AWS Console, then to the EC2 dashboard, then to the Security Groups resource, and in that dialog select the default security group and add an Inbound rule for your public IP address.