The very best programmers are passionate about their craft—and it is a craft. However, passion by itself isn’t really enough. If you want to be one of those programmers who is an order of magnitude better than your peers, you need a road map.
Like any destination, programming excellence has more than one route to reach it. Here are some sign-posts to help you on the way.
Scratch an Itch
Find something you care about, and then deliberately set out to address it. You will not only gain experience with solving a particular problem, but you are likely to pick up ancillary knowledge along the way.
As an example, I put together the Smart-Card Rules project because I wanted to use an OpenPGP smart card for signing my Git commits, but the various instructions I found on the web were insufficient to get my card reader working properly.
I had a problem to solve, but in order to solve the coding problem I first needed to learn more about the Linux udev system, CCID devices, USB vendor codes, and a variety of other things. I wouldn’t have bothered to learn as much as I did about these things if they weren’t related to something else that I really cared about.
Scratching my itch led to deliberate practice in various aspects of Bash shell scripting. While the script itself was a valuable end-product, the act of practicing my craft on an issue that I cared about passionately was ultimately more important to my continued growth as a programmer.
Value Indirect Learning
When building my Smart-Card Rules repository, I needed to create a README file. Even though the README itself wasn’t a solution to the problem of plugging in a smart card, documenting my solution was important to me, so I took a side-trip into text-document markup languages.
I could have written the README in plain text or HTML, but I decided to take the opportunity to explore other markup languages. As a result, even though I was primarily focused on writing a script to solve a hardware problem, I indirectly picked up new knowledge about AsciiDoc along the way.
While not on the critical path of my then-current project, my new knowledge of AsciiDoc came in extremely handy on many other projects. The same is true of various Vim macros I wrote to get the project done, and things I learned about GitHub’s idiosyncrasies in markup rendering along the way.
The take-away here is that every project provides opportunities for deliberate practice in ancillary skills. Take advantage of them!
Generalize the Solution
While I could have solved my smart-card problem a lot faster as a one-off hack, I gained additional experience and a broader conceptual framework by generalizing the solution. In this particular case, that meant building a rule generator rather than just writing a rule.
Of course, building a rule generator means thinking in terms of code re-use, modularization, and parameterization. This is a valuable part of deliberate practice, too.
The script itself could have been written as a single procedure to solve my individual needs. Instead, I applied some sound programming principles such as:
- Breaking the script into discrete functions.
- Parameterizing functions for flexibility and code re-use.
- Limiting variable scope.
- Checking return values.
- Defining environment variables for easy customization.
- Providing a user interface.
The take-away here is that generalizing a solution improves one’s skills as a programmer, and often provides useful snippets that provide efficiencies on other projects. It also makes your work more interesting to other people, who only benefit if the programming you’ve done is flexible enough to scratch their itches, too.
I’m not holding up this particular project as a magnum opus of any sort. It’s a very small project, with a very limited target audience.
However, I think this project serves as an excellent example of the sign-posts one should look for on the journey to programming excellence:
- Scratching an itch so that you’re passionate about what you’re learning and doing.
- Valuing all the knowledge that you gain, even the seemingly irrelevant stuff. You never know what might solve some other problem down the road!
- Generalizing problems and solutions without losing focus on your immediate goals.
Passion, deliberate practice, and continuous improvement will make anyone a better programmer. Will they actually make you a full order of magnitude better? Give it a try, and let me know in the comments section how well it works for you.