When I was in my 20s, I was often learning some type of martial art, mostly Taekwondo. My initial motivation for doing so wasn’t the deepest (“Whoa, Jet Li is cool! I want to be able to do that!”), but what I got out of the experience was far more than I had initially hoped. I became more disciplined, more patient, and my ability to focus was substantially increased. What’s even better is that the mental benefits persisted for a long time after I stopped actively practicing. Today, I’m going to talk about how learning martial arts forms informed my approach to algorithms and problem-solving.
Martial arts are a visual practice, in that they’re extremely dependent on the master /sifu/sensei demonstrating to students how techniques work. One area where this is particularly vital are within forms (aka kata in Karate, poomsae in Taekwondo, etc), which are a formal set of moves performed in sequence, with or without a weapon. They are an excellent endurance exercise and can be looked to for a source of possible move combinations, but their primary purpose is to build coordination and body control. So what do forms and programmatic problem-solving have in common?
However, many newer programmers overlook the value of seeking out masters in certain programming specialties and learning from how they approach the work. This is not only valuable in terms of learning new or improved techniques, but also in seeing what mastery in that field specifically looks like, so they can adjust expectations accordingly. Also? Sometimes you *can’t* be reasonably expected to independently come up with the answer to a problem because you haven’t encountered similar problems. The example I give in the above paragraph about returning a copy of an array wouldn’t be at all difficult to someone familiar with functional programming techniques, but much more difficult to someone who isn’t. There’s nothing wrong with looking up answers provided you take the opportunity to break down the solution and learn from it, so you can add it to your toolbox of solutions for the future.
In a profession as bloated with learning possibilities as web development, I can’t over-stress the importance of keeping your personal goals and expectations down to earth this way. I watched Google Developer Expert Stephen Fluin give an Angular 6 demonstration in which he impressively hand-coded Angular boilerplate in notoriously difficult text-editor Vim, but still made the same temporary mistakes and syntax errors you or I make every day when programming. A good source of these demonstrations are often conference talks or long-form demos on YouTube, like this Twitch stream by Angular Style Guide author John Papa.
One last thing I’ll leave you with: as anybody who’s studied either martial arts or programming knows, it is hard work, and there are no shortcuts. But approaching them with a determined, positive attitude and a willingness to learn will make the path easier. See you next week!