Staying on Top of Your Chores
One aspect of building high-quality, long-lived software is keeping your code healthy and up to date.
This can be a real drag—it feels like it's getting in the way of progress.
What we all want to do is to be focused on features.
However, if you go too long without staying on top of updates, you’ll make big, painful, gnarly jumps instead of smaller, incremental ones.
This has burned me, and it was so painful I want to avoid it from now on.
One thing that I do now is minimize the overhead in upgrading. This might sound trivial, but in a project with both backend and frontend pieces, distilling the upgrade mechanics to a single command means less friction to run it. Less friction means it gets done more often—I aim for at least once a week.
The following can be a simple shell script or a command in something like Just or Make. The key is to make it a single command you can run without much thought.
The output of these commands will show the version changes, so it's easy to read up on what changes in the release notes of each dependency.
You'll get to know the packages you depend on. Some I trust a lot on their use of semantic versioning and only look at release notes on major jumps. While others, I read the release notes on every minor jump to check for backward incompatibilities.
The side benefit of continually doing this is that you develop an appreciation for all the work being done in the different open-source libraries you depend on. You’ll also develop an instinct on which packages could put your project at risk for lack of maintenance.
I estimate this costs me about 30-60 minutes a week—well worth the investment.