A couple of months ago, a coworker found it surprising that I was an active skateboarder, given that I spend most of my time thinking about and working with code. I too have sometimes felt out of place at the skatepark, looking around me to find mostly younger people, few of whom are familiar with the intricacies of javascript or spend time learning about new algorithms.
At the core, programming is an analytical activity of the brain, while skateboarding is a lot about balance and physical coordination. But putting aside the obvious differences, there is much in common between the two disciplines.
Recovery from failure is critical to both riding a board and writing code. When trying out a new trick or a new path through a skatepark, you’re almost guaranteed not to land it. Similarly with programming: when trying a new programming language, code pattern, or just working with unfamiliar APIs, you’ll hardly ever produce good (or even working) code at the beginning.
The difference between the amateurs and the competent it always in being able to recover and learn from such failures. Good skateboarders are able to attempt something crazy, and even though there is only a 5% chance of landing a trick, won’t come crashing into the ground when they don’t make it — they’ll nimbly jump out of harm’s way. When confronted with a lengthy stack trace or a program that crashes, great programmers won’t give up, but will rather take the opportunity to learn more deeply about how the program is failing.
Coders and skaters both have a large variance in ability level and experience, which can be intimidating. At a skatepark, you might find kids who just got their first board as a birthday present and are just trying to roll around without falling, riding just a few feet away from hardened, bearded pool riders who have been going at it since the late 80s. Your own skills sometimes feel insignificant to those around you. In programming too, it’s easy to see the work of prolific people and feel intimidated by it, especially in the open-source community where everyone puts their code out there to be seen and used by others.
But the level playing field is also a tremendous opportunity. Not being intimidated or jealous of the skills of others, but instead taking the time to study how people do things, either with logic or their feet, is a great path to success. And in my experience, practitioners of both disciplines are very eager to help answer questions or give advice on how to do better, and share their particular style.
There are a bunch of smaller similarities:
-
It’s usually a bad idea to program or skate when you’re tired, since it’s so much easier to make mistakes. Indeed, the majority of times I’ve gotten hurt skateboarding are when it’s late and I should have already gone home. Same with all-night hackathons — while they’re a fun way to get a lot done, it’s rare that the coding when exhausted will result in quality output.
-
Both disciplines have tremendously benefitted from the web, particularly from user-generated content on the web. Websites like stack overflow allow programmers to easily collaborate on debugging code and sharing best practices, just like YouTube and other sites abound with “trick tips” videos created by everyday people.
-
There is an almost infinite number of ways to write a piece of code to perform a particular task, just like there are untold combinations of tricks and transitions available to someone rolling down a ramp or the street. As a result, most people develop a unique style of approaching a problem (even though there are formalities like naming conventions), which makes it fascinating to observe and learn from others.
I’m sure the same is true for any two disciplines chosen at random — there is much more in common than meets the eye on initial glance.