Mike MacDonagh's Blog

Somewhere in the overlap between software development, process improvement and psychology

Tag Archives: kung fu

My Alexa skill is now live in the UK

Every month at my kung fu club, Chi Wai Kung Fu in Cheltenham UK, there’s a series of strikes of the month that are on rotation for extra attention. Also there’s a rotating black belt syllabus. It’s not the easiest thing in the world to remember all of these details, and whether or not you need to take a bo staff or set of escrima sticks to the club. So, I thought I’d write an Alexa skill to remind me 🙂

chiwai_alexa_out.png

If you’re into Alexa in the UK, then join my UK Facebook group, it’s got over 4,500 members:

echo_group_welcome

The basic skill is pretty simple, interrogating an array and returning the requested information. Getting it certified was a bit more fiddly because I wanted to use a single word invocation name “chiwai” which is against the rules normally, and because it’s a trademark infringement if it’s not official. Of course, in this case it was official as I developed it on behalf of the club. The Amazon skill dev support team were very helpful so now it’s live 🙂

Here’s a video of it in action:

To get it, if you’re in the UK, just say “Alexa, enable Chi Wai“.

You can also search for “ChiWai” in the Alexa app, or install direct from Amazon.co.uk.

You can then ask it questions like “what are the strikes of the month” or go a step further and say “what are the strikes of the month for October” or “what’s the black belt element in February”. Because of the way Alexa works, voice recognition on those second questions is greatly improved if you first start the skill by saying “Alexa, talk to Chi Wai” and then ask them. You can directly ask by saying “Alexa, ask Chi Wai for the …” but it’s not quite so accurate.

Also, try “Alexa, tell Chi Wai, Zoon Ching” 🙂

The code is on github here: https://github.com/macmike/chiwai-alexa-strikes

Advertisements

Chi Wai Kung Fu @ Cheltenham now with extra tech!

kung_fu_cats.pngFor over 6 years now I’ve been going to Chi Wai Kung Fu! A few years ago I achieved a lifelong ambition to become a Black Belt in Kung Fu. Now I’m a second Dan and a brown belt in Dacayana Eskrima as a bonus!

Chi Wai is great, my whole family go there 🙂
My two boys started when they were little and now are both black belts. It’s done them a huge amount of good, it’s far more than just self-defense (and that’s important by enough to justify it). They’ve learned respect, discipline, control, confidence and a positive attitude founded in the fact that they’ve worked hard at something to achieve their goals. me_sifu.jpgNot always achieving first time, but through persistence and hard work they’ve got there in the end! There’s a saying that a “Black belt is just a white belt that never gave up”, that’s something they’ve learned from Chi Wai.

My wife even does Kung Fu, and is heading towards her black belt this year. As a result I’m running out of wall space to hold all of our certificates. I’m also finding home practice sessions hurt a lot more!

The Chi Wai system mixes traditional kung fu with practical self-defence including weapons and group
attacks. Because the club has a full time dojo there’s lessons for separate age groups every day (except for Sunday, even ninjas need a rest).

It’s a great family run club with a genuine family atmosphere. It’s friendly and welcoming and manages to keep that positive environment consistently. A lot of that is down to the excellent instructors but it’s also down to the people and families that train there.

chiwai_family.jpgIt’s fantastic to have a family activity where we can all be at different levels, but all encourage each other and train together as the kids get older. As my eldest son’s gone from little kid to adult sized teenager he’s now fighting with the adults and enjoys putting me in arm locks in Black Belt lessons 🙂

If you’re in the Cheltenham, UK area then get yourself, your kids and your auntie to Chi Wai Kung Fu! You can even ask Amazon Alexa about it:

Or learn how to do the intro bow from my buddy the modelling guy:

 

 

3D kung fu experiments

I’ve talked before about how Software Development is like Kung Fu, and since I do both I thought I’d have a play with some 3D modelling. First I tried creating a metallic surface, accentuated with bump mapping (best viewed in HD on repeat):

then I moved onto using bone deformations to try and get human looking movement from a non-human object (again with lots of metal and reflections just for teh lulz, best viewed in HD):

The truth about motivation

The embedded video below has been doing the rounds a bit but I wanted to highlight it and draw out a couple of points as I deal with motivation of individuals, teams and of course myself. This video is from the excellent RSA whose laudable mission is

The RSA (Royal Society for the encouragement of Arts, Manufactures and Commerce): an enlightenment organisation committed to finding innovative practical solutions to today’s social challenges. Through its ideas, research and 27,000-strong Fellowship it seeks to understand and enhance human capability so we can close the gap between today’s reality and people’s hopes for a better world.

To summarise, money and bonuses have been shown by various studies to be terrible motivators for complex work. People need to be paid enough so they’re not worried about mortgages, paying for food and living their perception of a reasonable lifestyle. After that more money actually detracts from motivation. People are more driven by:

What motivates you?

The Kung Fu of Software Engineering

I’ve been studying both kung fu and software engineering for many years. I’ve come to realise that they are very similar and that kung fu is a pretty good metaphor for software engineering.

Done right it looks easy, but it’s not

When you watch kung fu in movies, or martial arts in general it makes sense logically, it looks sensible. Attackers punch in one direction and defenders block in another. Sometimes there are tricks and special moves but an observer can see the logic in them, and they are feasible if clever – they are complicated, not complex. However when you actually try and do these moves you find it’s not so simple. It’s not easy to react the right way under pressure when you’ve not done it before. You need to learn muscle memory, improve your fitness, work on your reactions and internalise sometimes counter-intuitive techniques. When you really do it well you use very little energy to do something that looks easy and it becomes easy but other people can’t get it just by watching you.

Both software engineering and kung fu are deceptively difficult, with hidden complexities and complex emergent behaviour. I think it was Grady Booch who said (although I couldn’t find the quote so any mistake is mine) “Software development has, is and always will be, inherently complex”.

Complexity built from simple small techniques

In many kung fu styles you learn basic small movements in repetition, often called “form” in martial arts, Sil Nim Tao (generally referred to as Siu Nim Tao in Wing Chun kung fu, the RUP of kung fu) is translated as “little idea form”. Learning this form we learn all of the basic movements and stances that set up the body positions required to get the mechanical advantage in a given situation. Each individual movement tends to be very, very simple.

This kind of information and learning is analogous to the basic software engineering knowledge that we give people. We teach them how to write in a language, idioms, patterns, standard architectures, frameworks, build technologies, iterative patterns etc.

However knowing which techniques apply in which situations, which play well with others and how to put them all together is another level of expertise based on experience. Teaching someone the basics does not make them a master. Software engineering, like kung fu is something you should never stop practising and learning.

It gets more complex when you add more people

Defending yourself from one attacker is a whole different ball game than defending yourself from two attackers. Defending yourself from a group of attackers breaks down the whole mixed metaphor of ballgames, sports and anything else in the vicinity. The complexity of the action increases significantly as you add more people, it’s not just a linear relationship. As more and more people are involved there are emergent behaviours that can’t be predicted from the beginning.

This is true of any activity that multiple people take part in, especially complex activities. In kung fu it means you have multiple attacks, more energy in your attackers which means once you’re tired you’re in trouble. In software it means you have multiple people doing things at the same time with subtly or radically different ideas on what should be done and the best way to do it.

The only ways to reduce this complexity in software engineering are to go up or down. We can either abstract away from the complexity moving to higher level technologies where possible (sacrificing fine control typically) although such abstraction tends to bring it’s own complexities or we can dive down and educate the team (in the broadest sense) on the complexities to try and reach a common understanding.

No plan survives contact with the enemy

Trying to plan in detail all of the possible interactions of a kung fu fight, even against a known assailant is about as pointless as trying to plan all of the details of a software project. There is too much uncertainty, too much complexity and too much emergent behaviour. Above all there is too much change. In both kung fu and software engineering we need to remain agile and responsive to change. Change in the environment, the different things being thrown at us and our own actions.

There’s no magical solution

We’re not in the Matrix, we can’t download kung fu skills into our heads in seconds. Or software engineering skills. These things take years to learn, will be slightly different for every individual as they tailor the standard wisdom to their particular individual skills and style.

There’s a lot to learn. Personally I sometimes work as a software development coach helping people structure and plan their work from a business, planning and architecture perspective mixing in  SCM & build techniques, tooling, requirements management, agile and iterative project management, portfolio and business management. In many ways these kind of things, and others similar to them, can be thought of as different styles of martial art. Just because you’re good at one of them doesn’t mean that you’re good at another, or the next new one that comes along. Of course a certain aptitude helps, and knowledge of one certainly makes others easier to learn but “experts in everything” are few are far between.

We can’t all be Bruce Lee, Jackie Chan or Jet Li but we get a choice about where we are on the spectrum between being a master and an armchair expert sitting on the sofa watching others do it.

Finally

I believe that there’s an exact art and subtle science to both martial arts and software engineering. We need to practice these skills, we need to be continually learning and improving. We need to learn from other styles and experienced practitioners.

“Kung Fu” is actually translated to “achievement through great effort”

If you’re in the Cheltenham, UK area come and do some kung fu with me at Chi Wai Black Belt Academy.

I’ll leave you to make your own Chuck Norris software jokes…

%d bloggers like this: