
Practicing for Developers
Professionals practice their craft. They don't rely on their paid work to keep them sharp.
Written by: Alex Root-Roatch | Saturday, June 8, 2024
The Importance of Practice
Coding is a specialized skill. It takes hours of practice and experience to acquire, and it can get rusty without maintenance. The tech industry is also one that is constantly evolving as new technologies, frameworks, and languages emerge. As such, it is very important for developers to practice their skills, not only to maintain and refine the skills they have, but to stay up to date with new technologies that are coming out.
If you were going in to get surgery, you would hope that the doctor has had plenty of time to practice making incisions and sutures before slicing into you. When you watch a sporting event, you expect that the athletes to have put in the necessary training to be able to perform well in the game or competition you are watching. Musicians put hours, days, even years of practice into being able to play as well as they do, and yet they still practice when they're not performing. Why should coding be any different?
The Employer Pigeon-Hole
Many employers will make their development teams use a specific language, framework, or IDE. Of course when working on a team, it's important for developers to be able to collaborate and for the company to be able to set standards for workflows and quality. If developers aren't careful, though, those technologies will be the only ones that they are proficient with, and when the industry changes, they will have difficulty fitting into the new paradigm.
If your employer is paying you to complete projects in one language, it would be unprofessional to practice other languages while you're on the clock. That's why it's important for developers to have their own side projects that allow them to learn and experiment with other languages and stay well-rounded.
One good way to learn new languages is to have a go-to project that you've completed in another language. That way, you aren't having to worry about solving a new problem while also learning a new language, and can instead focus on the new syntax and methods of the new language. Not only that, coding the same project in different languages gives you a direct comparison between the languages. Examples of such go-to projects are to-do list apps, tic-tac-toe, and kata.
Kata
Kata are coding exercises that solve simple problems, like scoring a game of bowling or converting roman numerals. The name is borrowed from martial arts solo routines for the martial artist to practice their technique as they flow through their movements. In coding, the idea behind kata is that the developer has practiced them enough that they can be used as a quick warm-up or as way of practicing specific techniques, like getting used to new keyboard shortcuts or navigating a new editor. They also help the developer commit certain patterns in code to memory, so they recognize them quickly when working on projects and know how to handle them. A good example of this is recognizing when it's time to extract a helper function out of the function currently being written.
I like to think of kata as a musician practicing scales or études. When I first started learning classical guitar, learning all the three-octave scales in all twelve major and minor keys was difficult, but with practice, the low-level mechanics of where to put my fingers turned into muscle memory. This then enabled me to use scales as a way of practicing specific musical techniques, like sliding between notes, hammer-ons, pull-offs, dynamics, and rubato.
Études, while they may be pretty to listen to, were not pieces that were composed with the intent of being performed but of focusing on specific techniques in a musical way. This makes it easy for the musician to practice these techniques rather than doing dull, non-musical finger exercises. Mauro Giuliani famously composed 120 such exercises just for practicing right-hand finger-picking technique.
These scales, études, and kata also provide us with a shared experience and vocabulary that allow us to collaborate. If one musician wants to show another musician a certain technique, the easiest way to do so might be to use that technique while playing a scale or part of a scale, because it's a recognizable pattern that allows them to focus on the technique and not what's being played. Similarly, if a developer wants to show another developer a technique for quickly refactoring their code, they might reach for a snippet from a well-known kata so the other developer doesn't have to worry about making sense of the code being typed and can focus on the technique.
Pair Programming
Kata also provide a good way of practicing pair programming, like ping-pong, where one developer writes a test, then the other developer makes it pass and then writes the next test. For me, pair programming is awkward. It takes a process that normally involves sinking in to my own thoughts and brings it into a spotlight. It's immensely beneficial, but it feels very awkward because I'm not used to it. By using kata that both myself and another developer know, I can practice ping-ponging with another developer and get used to how it feels to pair program before pairing on real client work.
Upskilling
Are you a front-end developer but want to more back-end work? Maybe you're a full-stack developer but want to learn more about DevOps. It's not your employer's job to teach you the things that you want to know, but your job to practice and hone those skills that can make you more valuable to your employer and to the broader industry.