First word of Wordle

In the last week, I have started playing the online word game Wordle by Josh Wardle. I was lured in after getting curious about some strange Twitter status updates that showed rows of green, grey and yellow blocks. It turns out it’s a fun game, too.

The basic idea is to try to guess a five-letter word, and you get six guesses. Each day there is a new word, and everyone gets to guess the same one. After each guess (which must be an actual word), you get some information on how close the guess was because the letters in a guess are shown as green (correct letter in correct position), yellow (correct letter in incorrect position) or grey (incorrect letter). After you’ve finished guessing the word, you can share a status update that shows how well you went, in a way that doesn’t give away any information about the word. That’s what I was seeing on Twitter.

I’ve done it four times now, and a natural question is what word should be the first guess. At that point in time, there is no information about the daily word, so it makes sense to me that the first guess should be the same each day. However, what is the best word to use for that first guess?

The conclusion I’ve reached is that the best word should have five different letters, together which are the top five most likely letters to match in a word, i.e. maximise the chance of getting yellows. Additionally, those letters should ideally be in a position that is most likely to match the correct position, i.e. maximise the chance of getting greens.

To figure this out properly, I would need to know the word list being used by Wordle, which unfortunately I don’t. In fact, there may be two word lists: the word list used to allow guesses, and the word list used to pick the daily word. So, I’ll make a big assumption and use the Collins Scrabble Words from July 2019.

My tool of choice is going to be zsh on my MacBook Air. It doesn’t require anything sophisticated. Also, I’ve removed any extra headers from my word list, and run it through dos2unix to ensure proper end-of-line treatment.

First job is to extract just the 5 letter words:

% grep '^.....$' words.txt > words5.txt
%

Now we need to figure out how many words each letter of alphabet appears in:

% for letter in {A..Z}
for> do
for> echo $letter:`grep -c -i $letter words5.txt`
for> done | sort -t : -k 2 -n -r | head -n 10
S:5936
E:5705
A:5330
O:3911
R:3909
I:3589
L:3114
T:3033
N:2787
U:2436
%

That wasn’t very efficient, but it doesn’t need to be. We have our answer – the most popular letters are S, E, A, O and R. Putting these letters into a free, online anagram tool, it turns out that there are three words made up from these letters: AEROS, AROSE and SOARE.

Okay, so while only one of these is a word that you’d actually use, it turns out that Wordle accepts them all. It looks like Wordle might use the Scrabble word list for its guesses.

In any case, this looks like a pretty good set of letters, as the words in the word list are highly likely to have one of these letters:

% grep -c . words5.txt
12972
% grep -c -i -e A -e R -e O -e S -e E words5.txt
12395
%

Of the 12,972 words in the word list, 12,395 (96%) will have at least one letter match!

The next job is to figure out which of these three words is most likely to have letters in the same position as other words in the word list.

% grep -c -e A.... -e .E... -e ..R.. -e ...O. -e ....S words5.txt 
6578
% grep -c -e A.... -e .R... -e ..O.. -e ...S. -e ....E words5.txt
3742
% grep -c -e S.... -e .O... -e ..A.. -e ...R. -e ....E words5.txt
5726
%

We have a winner! A letter in AEROS is in the right position for 6,578 words (51%).

So, it looks like using AEROS as your first guess in Wordle is a pretty good choice. Just, don’t tell anyone that’s what you’re doing, or if you share the standard Wordle status update, it will actually contain spoilers.

Messing around with DWeb

You may have heard something about NFTs recently. They are the technology concept that underpins the ability to sell an authoritative version of digital art, sometimes for millions of dollars. It is a bit like selling a signed print for more than the unsigned print sells for, but the unsigned print is free while the signed print is worth $69M. But that’s not really want I wanted to talk about.

If you are the sort of person who pays that much for a bunch of electrons somewhere, you don’t want to wake up tomorrow to find them gone. Many well-known websites have, at various times, been brought down by DDoS attacks or merely defacement attacks, and content has gone missing. A website is a surprisingly brittle thing, and relies on domain name registrars, nameservers, web hosts, ISPs and other parties to all come together to deliver the content that you’re expecting. Since a buyer may expect their newly acquired, expensive digital artwork to be as long-lasting as a statue or painting, traditional web infrastructure is not really the solution.

So, NFTs are now making use of decentralised Web or DWeb technology, where the content delivery has no single points of failure. A lot of the thinking behind this is motivated by free speech ideals and resisting government control, but it can just as easily be put to the service of capitalist art speculators. Or, in my case, blog authors.

I was curious to explore what was involved in putting my humble WordPress blog onto the DWeb, or as it is sometimes called, Web 3.0. It wasn’t too hard, but the material I found explaining it was a little esoteric. Follow along if you would like to do this too!

There are basically two things that I needed to do: host the content somewhere (equivalent to using a web host, or perhaps a CDN) and register a name that could point to that content (equivalent to registering and hosting a domain name). In theory, you don’t need the name, but the address for the content then will not be human-readable or memorable.

IPFS (or InterPlanetary File System) is a technology for hosting content in a decentralised fashion, a bit like peer-to-peer file sharing. The main catch is that the files are all static, which means that they can’t run a platform like WordPress. I had to begin by creating a static mirror of my website as plain HTML, CSS, JavaScript and images, without any dynamic content. If I wanted to do it properly, I’d also have replaced the backend system that allows people to leave comments, but instead that feature will simply be disabled.

At the Terminal prompt of my Mac (which suffices for a Unix shell), I used these commands in an empty directory:

% wget -k -r -p -N -E -w 0.5 -nH -e robots=off -R "*\?feed=*" -R "*\?rest_route=*" -R "*&*" https://www.aes.id.au
% git init
% git add *
% git commit -m "Initial commit"
% git remote add origin https://github.com/aesidau/www.git
% git push -u origin master

and within a couple of hours, I had a static copy of my website stored in GitHub. This is a necessary first step to make use of Fleek, which handily takes a GitHub repo and deploys it to the IPFS. It is also free to use for personal purposes if you use less than 3GB of storage!

At this stage, my blog was now available at https://ipfs.fleek.co/ipfs/Qmahm66pomdqppz71abMixDnHWr9b1HmqXhv1iTGrEWjb2/ which is a bit of a mouthful. That last part is the IPFS Hash that is used to uniquely refer to my blog content. Ideally, I could share something short like https://aes.id.au so the next step was registering a suitable name.

There are a few contenders for the name service of the DWeb, including Handshake and NameCoin, but currently the most popular one seems to be ENS which uses the Ethereum blockchain. To buy a name via ENS, you’ll need some Ether currency and a supported wallet to store it in – MetaMask, Portis, Authereum, Torus, WalletConnect and MEW are the various options at the moment. I chose the option of using the Chrome browser together with the MetaMask extension. The amount of Ether you need to buy will fluctuate based on the price of Ether and exchange rates, but it will probably be in the tens of dollars. Also, if you want to buy a name that is 3 or 4 characters long, it will be a lot more expensive. Additionally, every time there is any update to the ENS name record, it will cost some Ether.

After I’d installed MetaMask, set up a wallet with it, and put in some Ether, I needed to go to the ENS App site and click on “Connect”. Then it’s just a matter of following the instructions to register a name. Once the name is registered, click on the option to manage the name, and click on the option to edit the record. I also updated the entries for ETH and BCN addresses, since the changes will all be covered by the same fee, but the main one to edit is “Content”. I put “ipfs://Qmahm…” here with the full IPFS hash, and saved the record.

That’s it. So, now I can refer to that static mirror of my blog by ipns://aesid.eth (in the Brave browser) or aesid.eth/ (in the Chrome browser with MetaMask installed) or https://aesid.eth.link (which uses an IPFS gateway and should work in every browser). Unfortunately, while it is now protected against my WordPress blog disappearing, it is already out-of-date, as this blog post isn’t there!

Working without the commute

This post originally appeared over on Medium.com

The regular way of (white-collar / office) working in the coming years will be quite different to that of the last decade, but also quite different to how most people are predicting.

This is going to be one of those articles where the author talks about what may happen in the future, after some of the Covid-19-related restrictions ease. Why add to the steaming pile? In my case, I want to put forward a view that is different from most of what I am seeing, and also because it is good to have documentation of a prediction so that it can be tested in the future for how well it tracked to reality.

The majority of articles I’ve read about future ways of working seem to predict that the future will be like the present. Principally, that we are currently working from home and that this will continue. Bloomberg reports that Google has seen the equivalent of $1b a year in savings from not having people working and travelling between offices. Additionally, around two thirds of employees in US companies would rather work from home than get a $30,000 raise. So, it seems there are benefits to both employers and employees in letting the current situation continue.

I’ve noticed that in my own experience, there has been a significant productivity improvement in working remotely. Firstly, I work longer, as some of the time I would have spent commuting is spent working instead. Secondly, unproductive time at work spent in travelling between meeting rooms, and waiting for meeting rooms to be vacated, has been eliminated when using online meetings. Lastly, I am able to multi-task more effectively during remote meetings, as I can triage and process emails in a way that would have been more difficult to do in person. So, even putting costs like property rental, cleaning and energy for lighting/heating/cooling aside, I expect many employers will experience a productivity hit if all their workers return to the office full-time.

However, these benefits to employers exist regardless of where the remote employee is working from. Significantly, many employees do not have ideal conditions at their homes to work remotely. For example, if there are multiple people trying to work remotely from the one dwelling and there aren’t enough working spaces to share. Or if the dwelling is too small to have a working space that is ergonomically set up for healthy long-term working — I have seen some people working from small bedrooms. However, the reason such people are still working from home is largely due to restrictions relating to Covid-19, and as these restrictions ease, it’s fair to ask, where would they prefer to work?

The answer seems to be that they’d prefer to work somewhere without a commute. Even before Covid-19, research showed that people hate commuting. One study referenced by Forbes back in 2016 equated removal of a commute with a $40,000 raise, which is an interesting correlation with the work-from-home survey result above.

Additionally, people do value and benefit from the social interaction that they receive in a workspace. This is often at odds with remote working, where online social interaction may need to be a scheduled activity rather than happening informally as part of bumping into people in corridors or kitchens. Meals are a traditional social occasion, but food and drink can’t be readily shared over a video call.

If you put together the value of remote working, the desire for a minimal commute, and the social benefits from working alongside other people, the natural conclusion is that we will see a surge in interest in co-working spaces near people’s homes, once Covid-19 backs off. In Australia at least, many of the co-working spaces have been in the same geographical areas that major corporate offices have been, as the proposition has been in providing flexible offices near to corporates. However, we can expect the proposition to shift to providing flexible offices near to employees.

While co-working businesses have taken a big hit during the Covid-19 lockdowns, up until 2020 there had been a strong trend of growth in adoption of co-working spaces. A March 2020 study by Coworking Resources showed 17% growth in number of users and number of spaces over the previous two years.

Additionally, there are spaces that are similar to co-working spaces that will likely support this demand. Many local libraries supply internet connectivity and bookable desks. Similarly, some cafes are also happy for locals to work from their premises and use their Wi-Fi if they are buying food and drink. In a world where remote working is normalised, arrangements like these might be made more official.

Of course, such spaces do not offer a free alternative to employers providing offices. The costs will need to be borne by someone. Perhaps reduced commuting costs (vehicles, fuel, parking, tickets, etc.) and home costs (energy, internet, etc.) could offer some compensation to employees. Perhaps employers will see the cost savings and productivity gain compared to offices and also provide financial support, or even get into the co-working space business themselves.

There are also questions about how to maintain business confidentiality in a space where there may be employees from competing organisations also working there. Co-working space designs can help mitigate this, as well as suitable IT solutions, but it will remain a risk to be managed. It is not dissimilar to working from an airport lounge or having work discussions in a taxi or cafe, so shouldn’t be considered a new risk.

I hope that we will see more forecasts about the future ways of working that go beyond working from home or even hybrid working. While many people and businesses want to retain the benefits of remote working, working from home is not going to be the only solution. Shared working spaces, close to people’s homes, will almost certainly be part of it.

Can we talk about the back button?

I am one of those people who is not loyal to a particular smartphone platform. There are some people who say this, but truly, I switch between having an iOS based phone and an Android based phone every couple of years. I feel it is my professional obligation to ensure I am aware of the trends relating to smartphones in general, and so I switch.

I have recently switched to using the iPhone 12 Mini after using Android devices for the last couple of years. I love that Apple has added a smaller phone again to their current range, as I like to be able to fully use a phone one-handed as I walk along. It is great that this phone supports 5G. Unfortunately, I am also deeply missing having a back button on the device.

It is a little bizarre to me that I need to explain this, as I’ve come to realise that some people who have exclusively used Apple iOS devices for their entire lives don’t even realise that Android devices have a back button. This is an on-screen, virtual button (it used to be a physical button) that you can tap to take you to the previous screen you were on, and can keep tapping it until you get back to the home screen. It is conceptually the same as the back button in a web browser. Now, I am aware that some recent Android devices have started to do away with the back button also, but I am choosing to believe that this is just a short-lived fad.

The Android back button is just a simple user interface element, that it is only when it goes missing do I realise how much navigational heavy-lifting it provides. At any point, in any app, you know exactly where to tap to exit the screen you’ve ended up in. There is no need to figure it out based on visual cues that an app might choose to show. Just like in a word processor (or really any application that allows you to create things), you know you can always Undo, and it’s always the same mechanism. There’s not a different way to Undo a typo compared with an accidental deletion or a formatting glitch.

On the iPhone, the way to leave a given screen is up to the app and can be quite inconsistent. The emerging approach is to use the left-to-right swipe gesture, which is quite elegant, although there is no visual indicator that this will work so you need to be told about it, and also be prepared for it not to work at all. It would be great if it simply worked all the time, the way the Android back button does. So, this post is also a little bit of a plea for something like that to happen.

I suspect that people who are regular Android users don’t need to be convinced, so my audience is more iPhone users who don’t realise how inelegant the user experience is. Hence the rest of this post will be actual examples showing what I’m talking about using screenshots from my current iPhone device.

a screenshot of the Messages app on the iPhone

Above is a screen within the Messages app. It has a place on the screen in the top left corner with a “<” symbol so that we know that we can go back to the previous screen in the app by tapping this. We can also do a left-to-right swipe to achieve the same thing. So far, so good.

However, say we arrived at the Messages app by searching for the app rather than tapping on its icon in the home screen…

a screenshot of the Messages app on the iPhone

In this case, there is now also a little label “◀ Search”, that, if we tap on, takes us back to the search box. Tapping the “<” takes us to a different screen in the Messages app, and so does left-to-right swipe. So, it’s a little bit messier, but at least there’s a convention that the “going back” options are in the top-left corner, and left-to-right swipe does the same as “<“. Or maybe not.

a screenshot of the Photos app on the iPhone

This is a screen within the Photos app, displaying a cute pic of my parents’ dog. There is a “<” in the top-left corner to take us back to the photo Library within Photos. However, doing a left-to-right swipe doesn’t do the same thing. Instead, it scrolls to the photos immediately to the left of the displayed photo. So, the swipe gesture isn’t reliable, but is the position of the “going back” option in the top-left of the screen reliable?

a screenshot of the Safari app on the iPhone

Well, this screenshot is from the Safari app, where the “<” symbol is shown at the bottom-left. Although, this little bar of symbols disappears as we scroll through a page, and is shown only when we then scroll up. However, in this case the left-to-right swipe does perform the same action.

Now, tapping on the rightmost icon to show the open tabs…

a screenshot of the Safari app on the iPhone

This takes us to a visual display of the open tabs, but to exit this and return to the previous browser screen, we need to tap “Done” in the bottom-right corner. Additionally, left-to-right swipe doesn’t navigate us anywhere, and risks closing one of the open tabs if we’re not careful. We’ve now found exit prompts in three out of the four corners, but can we find an example of it in the top-right corner? Why, yes.

a screenshot of the App Store app on the iPhone

This is a screenshot from within the App Store app. If you are on the Search screen, and have searched for something of interest, but then change your mind, the only way to navigate back to the main Search screen is to tap “Cancel” in the top-right corner. Left-to-right swipe doesn’t do it either, unfortunately.

There are other examples we could look at where there is instead an “X” symbol or the word “Done” in the top-left corner, and the left-to-right swipe doesn’t work in these cases either. I hope you’ve gotten the idea.

There is no consistency around which corner the “no, I want to stop and go back to where I was before” symbol or word appears, or even what the symbol or word should be. Sometimes the left-to-right swipe works, sometimes it doesn’t, and sometimes it could scroll within the content or even delete it. There is actually an alternative that provides a single, consistent mechanism, and it’s called a back button.

Long ago, in 1987, Apple introduced something called HyperCard, which was software for the Apple Mac computers of the time. HyperCard was a huge thing and has influenced many aspects of computing we still use today, including web browsers. Instead of screens or pages, HyperCard displayed “cards”, and the cards were arranged into what it called “stacks” (although we would call them apps or web sites). Most relevant to our discussion, looking at the HyperCard user manual from 1987, there is this interesting snippet on page 5:

You can always go back: Another way to see the previous card is to press the Tilde key. Stacks in HyperCard often link to each other (a concept you’ll learn more about later). While the left arrow brings you to previous card in the stack you’re looking at, the Tilde key brings you to the last card you saw, no matter what stack it was in.

So, yes, Apple pioneered the concept of a back button. It is time to bring it back.

Diversification is the silver bullet

This post originally appeared over on Medium.

So, they say there are no silver bullets, but for dealing with uncertainty, diversification is as close as you can get. Instead of betting that the future will turn out one way, spread your bets across a diverse portfolio of likely possibilities.

I haven’t buried the lede, so there is going to be no surprise twist here, but I wanted to tease this out to show how widely applicable this concept is.

Company boards are made up of directors that need to make decisions about the future of the company. No-one knows the future for certain, so the background and experience of the decision-makers is critical for how good their decisions are. Instead of having every decision-maker with the same background and experience, having a spread of backgrounds and experiences improves the quality of the board. There are several pieces of research showing this, but one example reported in Forbes shows that, compared with individuals, a gender-diverse team makes better decisions 73% of the time, and teams that also have age and geographic diversity are better 87% of the time.

There is a danger that this seems completely obvious. Let’s just pause for a little and consider that it’s actually a little counter-intuitive. There is a proverb that has been around since the 16th century that too many cooks spoil the broth. Certainly, for a complicated task, an individual with deep expertise can often accomplish it better than a team. In fact, to underline that point, the same study reported in Forbes from before noted that diverse teams are more likely to struggle to put their decisions into action.

The difference is between complicated and uncertain. A complicated task can be made easier through the application of appropriate tools, skills and experience. Applying these things to an uncertain task doesn’t make it less uncertain. Producing a 7 day weather forecast is complicated. Getting it completely correct is uncertain.

This same logic applies in the world of venture capital. A VC firm will raise a fund to invest in a portfolio of startups, rather than just one. However, the same VC firm will typically seek out startups that each aim to win in a single market or technology area. Knowing which startup will become a unicorn is uncertain, so is best approached in a portfolio fashion. A VC fund of $50M could include something like a dozen startups, and there’s a well-known rule of thumb that only a third of startup investments will return more than their initial investment. (On the other hand, executing a startup is a complicated endeavour, and it benefits from simplifying and focussing where possible.)

Sometimes a VC firm develops an investment thesis for their fund, such as where they believe a particular technology or market should be the focus for their investments. Here’s a collection of over a dozen different VC investment theses, but a stark example is when Kleiner Perkins announced in 2008 that they would form a fund to invest in iPhone (and later iPad) app companiesdue to their belief in the potential of Apple’s iPhone. However, such VC firms still consider the winners in that space to be uncertain, and hence diversify their investments across multiple possible winners, e.g. Kleiner Perkins ended up investing in 25 companies. Similarly, investors in such a focussed fund (known as limited partners) are likely to diversify their investments across multiple VC funds, in order to mitigate the uncertainty that a particular investment thesis is wrong. An example here is Yale’s endowment fund, which historically invested in funds across VCs such as Andreessen Horowitz, Benchmark and Greylock Partners.

When it comes to corporate innovation, the lessons are the same. A particular corporate should take a portfolio approach to emerging opportunities. There might be some hypotheses that a corporation has developed about the opportunity sizes in particular markets, products or technologies. However, no one knows for sure how the future will turn out, so spreading risk across multiple opportunities is prudent.

The recent book from Geoffrey Moore called Zone to Win argues that a company can incubate only one major new business at a time, or risk spreading executive attention and corporate resources too thin. While there are examples of large companies like Amazon, Baidu, Apple, Google and Microsoft who are able to incubate multiple such initiatives at once, there are few companies at this scale.

However, when the expenditure and resources required to progress a new initiative are relatively small, and the likelihood of success of such an initiative is still very uncertain, it makes a lot of sense to spread the company’s investment across a number of these initiatives. Diversification may involve a range of possible time horizons, market segments, product areas, or technology domains. Spread the risk to increase the chance of overall success.

Whether it is the uncertainty relating to having relevant experience for board-level decisions, knowing which startups will hit home runs, or picking the right opportunities to explore within a corporate innovation function, the silver bullet is the same. Diversify across a variety of good options.

Patience is a virtue

This post is essentially a reposting of an article that I published on Medium a couple of months ago. I am giving the Medium platform a go, for topics that are more aligned with my professional life, but I don’t want to risk that the content disappears if Medium disappears. So, I’ll likely repost everything here a little afterwards.

I was speaking to an industry colleague in the innovation space, and commented to them that in corporate innovation, it was important to have patience. They blinked and restated what they thought I meant, that it was important to be tenacious. This revealed a surprising fact for me: that it wasn’t universally understood that patience is a virtue.

In the world of innovation, startups are often revered. The innovation that has come out of the international system of VC-backed tech startups is unarguable. Accordingly, in the land of corporate innovation in particular, it makes sense to seek to learn from the startup ecosystem, and apply their proven approaches into a corporate setting. Tools like design thinkinglean canvas, and the daily stand-up are examples of this.

However, innovation in a corporate environment requires a different approach to innovation in a startup, and not all of the startup lessons translate directly. Mark Searle from UC Berkley has recently made some insightful comments about that. I will add another — that the startup lesson about the the virtue of tenacity doesn’t translate directly either.

Before I go on, I’ll share some quick definitions so we’re all on the same page. Tenacity is the unwillingness to give up, even in the face of defeat. Patience is the acceptance that true success will take a while.

In my experience, it is the latter that better supports a culture of innovation within a corporate environment. That said, good innovators are not complacent, they do not accept the status quo, and they are driven to create a better world.

The reason that patience is a virtue in corporate innovation is due to corporate efficiency. Corporates are often set up so that the same idea isn’t funded in multiple places. In fact, there is usually a natural place for a particular idea to be explored, whether it’s in the IT group, marketing, or product development. If an idea fails, and most ideas do fail, it is unlikely that the same place will fund a similar idea again immediately. Effectively, a failed idea becomes taboo for a period of time.

How does this relate to patience? Well, getting the timing of an idea right is often a key part of success. However, since having an idea “too late” is a terrible outcome, people naturally err on the side of being “too early”. When a too-early idea fails, a successful corporate innovator will take the lessons from the failure, wait until the conditions are right, and then resurrect the idea. This time, the timing is likely to be better and the execution better informed. It requires an acceptance that true success can take a while, and often doesn’t come the first time.

Tenacity can be poisonous in this environment, with the unfortunate innovator continuing to push an idea within a company even after it has failed and become taboo. The reputation of both the idea and innovator can be harmed, and neither may end up working at the company in the future, depriving the company of real value.

However, in the startup ecosystem, tenacity is valued by the VCs who back startups run by tenacious people. A VC fund doesn’t live or die by the performance of a single startup, but VCs maximise their chances through knowing a startup will keep trying to find product-market fit while they keep funding it. They can then shift follow-on funding rounds towards startups that are performing better, and let the other startups run out of cash.

Many successful people from the startup ecosystem make their way into corporate innovation. They won’t have seen much patience within a startup; startups are all about urgency. Perhaps when they see patience, they associate it with lack of drive. However, corporate innovators have as much drive as innovators anywhere, and if one idea is paused, they will be progressing one of several other ideas. Corporate innovators often have many irons in the fire.

If you’re coming from a startup world into the corporate one, try to practice your patience. Sometimes the best strategy for helping an idea work out in the long term is to put it on ice for a while. When you thaw it out later, you may be surprised at how important your patience was for its success.

A conducting robot

I play the flute in The Essendon Symphony orchestra, and in the lead-up to our March concert, the conductor asked if I might borrow a robot from work. The concert was a celebration of comics, movies and pop culture, so the robot ended up conducting part of a Dr Who music number. For those interested, here’s how I got a robot to conduct an orchestra.

The robot in question is a version 5 NAO Robot, and is a type of programmable robot used in certain high schools and universities around the world. It is about 60cm (2 feet) high, and can walk, talk, respond to speech, identify faces, and move its limbs like a human. There are Python and C++ SDKs for writing software, or you can use (like I did) a visual programming tool called Choregraphe.

Different versions of NAO are supported by different versions of Choregraphe. Based on descriptions from the NAO documentation, I could tell I had V5, and hence I needed to download V2.1 of Choregraphe from the NAO software resources webpage.

It was easy enough to follow some of the NAO tutorials to learn how to use Choregraphe. The project that I wrote is available in a GitHub repo for general interest.

The project has blocks for conducting in 3/4 time (used in the project) and 4/4 time (not used in the project). It is set up to automatically start when the middle head sensor is touched, by using the launch trigger condition MiddleTactilTouched. After saying some amusing words, it conducts for 17 bars, controlled by the Counter box. At the same time, it is sensing for whether either of the other two head sensors are touched, and if they are, the Counter will stop the conducting. The robot will then say some more hilarious stuff, pause for a bit (for the real conductor to turn it around to face the audience), and then it will wave. Ta dah!

Learning how to use the tools and program the robot to do this sort of project took only a couple of days, so I can see how it could be useful in a highschool or university setting. The level of articulation in the joints is pretty amazing, and I look forward to this sort of technology becoming more widely available.

One issue: after getting the robot to conduct for a long period, it started to complain of over-heating, so I was comfortable with 17 bars, but I don’t think it could conduct a whole concert. But, not that the orchestra would want that!

Hacking the Alexa grammar

Amazon EchoFor Christmas, I got myself an Amazon Echo Dot (and I wasn’t the only one). For me, it’s been a fun and more convenient way to play music in our living room area, and I’ve been listening to more music as a result. I also had the idea that it would be nice to build some speech-driven interfaces to things.

It has been over a decade since I did speech recognition work. Speech recognition was used in one of the early projects that I did after I first left Uni, where I was part of a team that built a speech-driven personal assistant. It was a little ahead of its time, and never went anywhere.

Still, I thought I could put those slighty-rusty skills to use on the Echo, since Amazon provides a way to create Alexa skills (the name given to apps that run on the Echo behind the scenes). My idea was to use the Echo to provide a way to help the kids with maths, since they love to talk to “Alexa”.

Last week, my skill was published on Amazon’s list of Alexa skills. It allows someone to say “Alexa, tell me now if 1 plus 1 equals 2”, and will respond by saying that they’ve gotten this correct (or not). Unlike the basic Alexa functionality of doing maths, where someone might say “Alexa, what is 1 plus 1”, this skill forces the speaker to offer the answer and have it checked. This should be useful to anyone wanting to test their maths, and it supports addition, subtraction and multiplication. Basic users would probably use small numbers, but advanced users can use large numbers – the skill supports it all. Not negative numbers or zero, though!

Doing the coding behind this was straightforward; it was some simple Node.js code that runs on AWS Lambda. What was less straightforward was sorting out the grammar to use.

In speech recognition, the word “grammar” refers to the set of different phrases that an application can recognise at a point in time. A simple grammar is one that consists of just the phrases “yes” and “no”. A complex grammar might include every product for sale on Amazon itself and different ways to order them. The grammar is used by the speech recognition engine to improve its recognition, since it doesn’t need to always listen for every possible word in English, but only the specific words that are contained in the grammar.

To develop an Alexa skill, you need to hack together the basic Alexa grammar, together with an “invocation name”, and then the grammar that the skill itself can recognise. (Here, I’m using the word hack in its art-of-programming sense, not in the computer-intrusion sense.) Usually, the invocation name is a pronoun, e.g. “Dog Facts”, “Starbucks” or “GE Podcast Theatre”. However, it can be any set of words, and there is alternative dog fact skill that uses the invocation name “me a dog fact”.

This last one doesn’t seem to make sense until you remember that there is a grammar that comes before the invocation name. It starts with a “wake word” (one of “Alexa”, “Amazon” or “Echo”), then a variety of commands based around words like “tell”, “ask”, “start” or “open”. So, the invocation name gets added to this grammar, e.g. “Alexa, tell” + “me a dog fact” which makes a lot more sense.

Amazon publishes a list of constraints relating to invocation names. For my application, it would have been easiest to develop it using an invocation name like “Math Test” and then users would interact with it like “Alexa, ask Math Test to check if 1 plus 1 equals 2”. However, I wanted to see if I could do something that was easier for users.

Initially, I tried out the invocation name “me if”, which would produce nice interactions like “Alexa, tell me if 1 plus 1 equals 2”. However, using “if” violates one of Amazon’s constraints around invocation names, so I needed to find something else. That’s how I ended up with “me now” as my invocation name. Interactions become slightly longer, but still workable, like “Alexa, tell me now if 1 plus 1 equals 2”. To make this approach obvious to users, the skill is named “Tell Me Now”.

Now, I just need to get the kids to speak to Alexa about maths instead of music.

And remember, there’s no such thing as a bad idea

That is the cue – “remember, there’s no such thing as a bad idea” – for beginning the sport of suggesting ideas to my fellow brainstormers. However, instead of spurring me to reckless idea generation, it always stops me in my tracks while I re-evaluate the brainstorm facilitator. There is clearly such thing as a bad idea.

Playing in traffic while blindfolded.

Taste testing the contents of the laundry cupboard.

Stripping during a speech to parliament.

Assaulting an armed police officer.

It’s not hard to brainstorm them. So, why begin an exercise with people whose opinions you value by telling them such utter nonsense?

There are good intentions behind it, I admit. Even bad ideas may have the germ of a good idea hidden within them, and maybe one of the other brainstormers can bring that forth. Encouraging people to speak their ideas without thinking about their worth can improve the pace of the brainstorm session. Disruptive ideas can come from those outside of a field, because traditionally such ideas would have been considered “bad” by those inside the field.

On the other hand, perhaps merely being accepting of bad ideas is not going far enough. I’ve found that I can generate many more ideas of much greater variety if I focus on just generating bad ones.

Suggesting ideas in a language you don’t speak.

Brainstorming with just one person in the room.

Miming ideas to the other brainstormers.

Providing the same ideas as from the last brainstorm.

Overall, it is recognised that constraints enable creativity. The restricted forms of the haiku, sonnet or even limerick are able to result in enjoyable poetry. So, it’s understandable that coming up with “any idea, whether good or bad” will result in less creative ideas than coming up with “only bad ideas”.

Still, I don’t know why “only bad ideas” seems to work better for me than “only good ideas”. Maybe it’s simply that there are more bad ideas than good ones? Unfortunately, I can’t see a brainstorm session achieve a useful outcome if everyone involved is aiming for the worst ideas.

So, I’ve had an idea for how to harness the power of bad ideas in brainstorming. At the start of the session, the facilitator gives each brainstormer a note with either Good or Bad on it – which they keep secret from the other brainstormers – and this states the type of ideas they need to suggest. Maybe just a third of the brainstormers are given Bad, since their ideas will otherwise likely outnumber the Good ones.

This should help with improving the volume and diversity of ideas in brainstorms. In this case, the brainstorm facilitator will need to cue the start of the session with something like “Remember, I want to hear your ideas, even if they are bad.”

Tell me if this works for you, since I’m not sure if my idea for better brainstorming is a good or bad one.

Thinking of changes to traditional brainstorming.

Putting those thoughts out in public.

Child Wrangling

When I go on a long work trip, I often end up buying some books, because it is one of the rare times that I get to selfishly spend uninterrupted hours just reading. In September, I had a trip where I picked up a couple of parenting books.

My kids are getting bigger, and while at the moment I can get them to go where I need them to go by picking them up and taking them there, this is not sustainable. When we had babies, I read a bunch of books about how to get through that stage, but I hadn’t educated myself on parenting primary-school-age children. So, I picked two best-selling titles that seemed to have differing perspectives, and figured by reading both I would get a good coverage of the space. Now, by writing about them here, I am forced to understand them well enough to explain them.

The first book was 1-2-3 Magic by Thomas W Phelan. It is all about how to improve the behaviour of children 2-12yo through “effective discipline”, and is currently rated 4.7 out of 5 stars on Amazon (139 reviews). It is written by a child psychologist and is an easy read. I would say that this book has a basic assumption that children are happy and well behaved when they know what behaviour is required of them.

The second book was Calmer, Easier, Happier Parenting by Noel Janis-Norton. It is all about how to improve the behaviour of children 3-13yo through “five strategies” and is currently rated 4.5 out of 5 stars on Amazon (27 reviews). It is written by a child educator and is a comprehensive theory and practice for child-raising. This book has a basic assumption that children can work out what they are supposed to do, and will do the right things when they are supported appropriately and when doing the wrong things no longer works.

I seem to recall that I was a near-perfect child. So, my memories of how my own parents raised me should not be relied upon, and I find that I need to come up with things that suit my kids. Hopefully they will look back and think they were near-perfect as well.

Despite taking different approaches, the two books do agree on some aspects. There are five common strategies that I have noticed, and they seem reasonably sensible:

  1. Don’t ignore bad behaviour.
  2. Stay calm and don’t shout.
  3. Always follow through.
  4. Spend quality time with each child.
  5. All caregivers in a house act consistently.

However, there is probably more that they disagree about than they agree, as you may guess from their differing assumptions about children’s behaviours. In addition to the above five common strategies, Phelan’s book proposes two fundamental techniques for achieving household happiness:

  1. Impose time-outs for repeated bad behaviour.
  2. Establish everyday routines.

Of course, the book has plenty more detail around how to do this. In particular the title of the book refers to counting instances of bad behaviour, and putting a child into time-out when the third count is reached.

On the other hand, Janis-Norton’s book has different fundamental techniques that support a range of parenting strategies:

  1. Train children to want parental praise and recognition.
  2. Teach them how to verbalise thoughts and emotions.

Hers is a very thorough book, going into numerous examples over its 400+ pages. However, it doesn’t include any examples of disciplining children – at least not in a traditional way. Looking on the Internet, it seems this sort of approach is also known as positive discipline, and there are other authors out there that promote it. Janis-Norton many times states that she knows it may seem unbelievable that this could work, but reassures the reader that it does.

I haven’t decided yet how to put any of this into practice, but I feel now better equipped with a bunch of parental tools that I hope will make life easier and more sustainable. And if I don’t have to pick up and move children any more, my back will be thankful.