In the talk Solving the Right Problems for Engine Programmers, Mike Acton spends a section of his talk on what he considers the three fundamental areas in which most programmers are incompetent: practice, reasonable defaults, problem solving skills. The first one in particular is quite interesting, because it enables the two others: someone who practices the craft of programming regularly will develop reasonable defaults and problem solving skills. Acton says that practicing is an activity that we do individually and where we try to fill in gaps in our knowledge and that as professional, it’s our responsibility and obligation to practice.
But practicing is not a thing that most programmers do. Mostly, we get thrown into a problem, we read just enough documentation to allow us to complete our work before we’re shuttled to the next project with a looming deadline. It’s hard to imagine that we can acquire and build a solid foundation that way. And it’s not the way it happens in other professions: professional sport athletes are expected to practice multiple times a week to maintain their skill levels and improve their areas of weakness; musicians practice their pieces for many days/weeks before their public concerts; astronauts spend years preparing for their missions, they don’t just try and wing it.
Since I saw this video, I’ve been trying to make time every week to practice the skills of my profession.
For example, over the last 2–3 weeks, I’ve blocked 30 minutes every other day to implement and re-implement sorting algorithms (bubble, insertion, selection, quick, merge, and radix) in multiple languages.
The goals are to solidify my knowledge of the general strategy of those algorithms, understand the different invariants that need to hold (it’s very easy to get into an infinite loop because we accidentally use
<= instead of
<), and correctly implementat the algorithms in different languages.
When I started, I had forgotten most of what I knew about sorting algorithms and I spent most of the 30 minutes fumbling about; but with regular practice, I’m now able to write all 6 algorithms and their tests in about 20 minutes.
More importantly, I can explain how they work and what invariants need to hold.
Next, I will try and include shell sort and heap sort to the list of sorting algorithms that I understand and can implement.
My suggestion for people who want to improve as programmers is to try to have a practice routine. Block time in your schedule a few times a week—not a lot, 30 minutes is plenty—and focus on an area that you want to improve. It can be data structures and algorithms, creating and running Docker containers, making SQL queries, etc.—whatever you feel that you need to improve. Then open a blank file and try to get as far as you can. After the 30 minutes are done, stop, wherever you are. Let your brain sleep on what you did for a day or two before going back. The next time you practice, do not open the previous day’s file: create another new one and start from scratch again; this is not a project, this is practice. You are trying to become good enough at a skill that it just flows out of your fingers; saying “I accomplished the thing” is not enough, you need to aim for “I can accomplish the thing quickly and consistently.” After a few sessions, you’ll see that you are better at finishing your task in the allotted time. Then start spacing it out (you can have a daily practice for another topic): practice the same thing a week later, then a month later, three months later, etc. This is to make sure that the knowledge that you struggled to acquire remains in your mind.