Christoph Wagner

Freelance Software Developer

How to Become a Better Programmer in 30 Minutes a Day

08 April 2019

What if I told you that there is a surefire way to level up your coding skills in as little as six weeks, and it would only take you about 30 minutes of time per day? Would you do it? Or is that too much to ask?

Think about it: what’s the biggest obstacle standing between you and that big idea that you have? That awesome app that you’d like to code, but you’re not sure that you have the skills or the persistence to finish? Or that day at your job that you don’t have drop everything in order to put out yet another fire and focus on building something really worthwhile?

You might say “I don’t know enough to build that <app/project/feature>. I need to study more.” I say you’re wrong. Chances are you know already much more than you need to. What you’re lacking is practice. A good coder is not someone who knows how to do everything. A good coder is someone who can figure out how to do anything.

The point is this: amateurs study, professionals practice. They practice every day. Sure, studying new research and reading up on theory has its place. But you don’t become better at your craft by studying. You become better by practicing.

Yes, there is a place for studying, for reading books and blogs and working through all the tutorials you can find on the web. I’m not arguing that studying is not important. All I’m saying is that it’s overrated. What matters in real life is whether you can apply what you know. And the only way to find out is by doing it.

Imagine this scenario: you’re in the hospital, and you’re scheduled for open heart surgery. There are two surgeons available: the first one has graduated from Harvard Medical School. He’s read every book there is on open heart surgery, and he can go to great lengths elaborating on every single detail of it. The other one used to patch together soldier on the battlefield with a piece string and a hot needle, but he’s operated on thousands of patients and has a 99% success rate. Which one would you choose?

What do successful athletes do when they prepare for a big game or an upcoming tournament? Ponder over strategy books? No, they practice.

What do successful musicians do when they prepare for their next concert? Read about a bunch of music theory? No, they practice.

What do successful chess players do when preparing for an upcoming match? Well, being chess players, they probably will be reading a bunch of books and studying popular openings, but I assure you, they are still going to practice, by playing as many games against a simulator (or a real person) as possible.

“Okay”, you say, “I get it. But where can I get that practice? No one will hire me without experience, and I won’t get experience without a job. So I’m stuck!”

Not really. One way to get consistent problem solving practice is by writing very small, very limited programs every day. Programs so small that you can write them in a single file.

This is what websites like CodeWars or HackerRank are for. They have giant collections of practice problems in many different languages, neatly organized into categories and rated by difficulty level. In some circles, this is referred to as “code golf”. Other people call these practice problems “katas”, borrowing a term from martial arts (specifically, Karate).

A kata in Karate is a practice set. It’s the equivalent of a musician practicing scales in order to improve the finger dexterity, or an actor practicing tongue twisters to improve their enunciation. In the same way, programmers should be practicing katas to improve their problem solving skills. Practice is what sets the professional and the amateur apart.

The Chinese word for “Kung Fu” (功夫 or “gōng fū”) really means “hard work” or “effort over time”. There is no shortcut around this. Only by trying, and failing, and trying again can you develop your programming Kung Fu. The master has failed more times than the student has even tried. The pathway to mastery is practice.

So, here’s how you become a better programmer: take 30 minutes each day and try to solve at least one kata in that time. That’s all I ask. 30 minutes, no more, no less. If you can’t finish it in that time, doesn’t matter. You gave it a shot, and that counts. You can try it again tomorrow. Or try a different one. Keep trying until you find something you can solve. Then try another one.

If you can keep this up even for just a month, I promise you will start seeing the results in your everyday work. You will write better, cleaner, more effective code, and you’ll start enjoying it. You’ll be more familiar with the standard library of your language, and you won’t have to go “gee, I wonder if there is already a function for this…” each time you hit a minor road bump in your day job. Your programming muscles will literally start to bulge, and bugs will begin to tremble in fear when they see you coming.

Within three months you will have solved enough problems that the lower levels will start to feel boring to you, and you’ll start looking at the higher levels in order to get a better challenge. Within a year you’ll have leveled up significantly, and you may find yourself pondering over algorithm books in order to master the advanced level katas. You’ll be looking back at code you wrote one year ago, and you will laugh at your old self and the silly mistakes you used to make.

30 minutes a day is all it takes. Can you invest that much in your future?