Sunday Thoughts: Avoiding Code Atrophy

As a leader in a tech company and an involved parent, it is quite rare that I find time to exercise my coding skills. It becomes very challenging to stay ahead of the trends and continue to contribute in the same meaningful way that lead me to earn my current position when I am not writing code every day. This is slow death for any self respecting engineer, so I have set out to solve this problem for myself. Here are a few things that I do to help avoid the pestilence that is code atrophy.

1. Read lots of code and RTFM

While reading code is no substitute for writing it, read open source code. Wordpress is my favorite, but any open source will do. Seeing all the different 'voices' that come together to make an application can be really illuminating on many levels.

An alternative to reading open source is to read the documentation of your favorite language. I prefer languages with a large community like Python, Ruby or PHP. Seeing all the ways the community members have found to solve similar problems can be really inspiring.

It's very easy to find time for this while waiting for your train, sitting outside your kids piano lesson, eating lunch, or the 30 minutes of down time between meetings.

2. Code for two hours at least once a week, uninterrupted.

There is no replacement for coding eight hours a day, five days a week. However, we can often find time at night instead of watching TV, or taking an extra long time drinking coffee on a Sunday morning. Two hours are much easier to find than you think, but being uninterrupted is the key.

It doesn't really matter what you are coding in those two hours, I will often open up JSFiddle and just start playing around with some concept I learned from code reviews during the week. The import part is to give yourself enough time to get into 'the zone' where your mind is actually exercising.

3. Do Code Katas

I recently read an article stating that code katas don't really help, as you are solving the same problem over and over again. For someone who codes full time, I completely agree. However, think of all the permutations of those katas that you can do. Writing fizzbuzz in a language you've never used before helps you think in different paradigms. This ultimately exercises the mind.

There are also hundreds of different coding exercises, and if you are really doing the same one over and over again in the same language, you have a different problem. Even if there were 100 exercises, you have more than 10 major languages to do them in. Thats 1000 kata's which would keep anyone busy for quite a while.

4. Teach code.

I have often found that the best way for me to remember something is to try and teach it. This is another one that is less about learning something new, and more about keeping your skills on standby. However, it's also not hard to learn something new and then try to explain it to someone else. This transaction of consuming and then passing on information really helps with retention. The mental associations we make when trying to explain and teach a topic are very efficient. I particularly love to teach kids as they ask incredibly difficult questions that challenge you to think outside of the box in order to answer them.

These are a few of things I have found that help me stay relevant. There is no perfect solution and any combination of tactics can work for a different number of people. For me these are enough, but I'd love to hear what you do in the comments below!