Never make plans. Only set goals. Plans can go awry, but you can always work toward goals.

In my last post, I detailed some projects I was planning for the near future. While these projects are still on the table, I’ve lately been enthralled by a new project: PyKBLib, a Python library for interacting with the Keybase command-line tools.

This blog post isn’t going to be about PyKBLib (though you’re welcome to check it out and help me make it even better). Instead I want to talk about the process of writing software.

One of my aims recently has been to learn how to use test-driven development (TDD) in my own projects. I’ve also been interested in learning to package and document my software for distribution. Working on an open-source project is a good way to force yourself to write clean, readable code with good documentation. Deploying that software into a package distribution system like PyPI is another exciting challenge. If I want to be able to create and deploy useful software for others to use, these are skills I need to master.

A week or so back, I wrote up a quick-and-dirty implementation of a Keybase library that would allow me to script a simple bot with which I could automate certain parts of Keybase team management. As I worked on this library, I realized that it could be something that others might be interested in using, so I decided to turn it into a proper library for distribution.

Over the past few days, I’ve been re-writing the script from the ground up, implementing some neat new tricks I’ve learned in order to make my code cleaner and provide a more intuitive interface with the library. I’ve also been learning how to package the library for deployment and create useful documentation so that my code can be used by others. I’ve employed a TDD approach to development, writing tests before crafting the code to pass those tests.

While it has felt like slow-going at times, I’ve had to remind myself that in the past I would crank out code without any formal testing framework or documentation. When I take into account the amount of documentation and test-code I’ve written, coupled with all the new techniques and information I’ve been learning in the process, I’ve actually been more productive in the last few days than I have in quite some time.

While I’d planned to work on DisPro and my other projects, my greater goal has always been to become a better, more professional programmer. Every new skill I learn takes me one step closer to that goal. While the PyKBLib project has distracted me from some of my other planned projects, I’ve learned a great deal from it so far, and I’m excited to apply my new skills and experience to all my future projects.