Blog Home Kelvin Jackson

Every Software Developer Should Write Their Own Utilities

Every programmer should write their own set of basic "utility" apps at some point, and ideally sooner rather than later: a basic calendar app, contacts manager, markdown converter for a blog, or a subset or superset of the above. These are simple programs that nevertheless leave room for added complexity, and will help you develop as a programmer and get you into the habit of scripting common tasks and customizing your workspace. You write, or at least someday intend to write, software to make other people's lives easier — why wouldn't you also write it for yourself?

First and foremost, the simplest possible version of most basic convenience apps is well within the reach of a relative beginner, while still offering challenges and learning opportunities for more experienced coders. Your program won't have nearly as wide a range of features as commerical solutions, but you don't really need it to — your personal needs are likely more constrained, and even if you don't end up using your tool in the long run, developing it will teach you how to go about developing good software from scratch. For instance, writing the bare-bones calendar script that I keep my personal calendar in has forced me to ask detailed questions about how a calendar _should_ work, how events should be stored efficiently, how the script might interface with online calendar services (not yet implemented!), etc.

Secondly, writing your own basic utilities gets you into the habit of customizing your workspace, something that will come in handy later when you run into boring, repetitive tasks that should be scripted. You'll learn the ins and outs of Bash and other scripting languages, and learn to quickly put together a script when the need arises. Custom utilities can also be better suited to your exact use case, and may (if done right) use fewer resources than existing solutions. Their code will also be simpler than that of existing projects, making them relatively easy to maintain.

In addition, on a purely philosophical level, it makes sense for a programmer to write code for their own use. If you're developing software all day for other people, but never actually use anything that you write, you risk giving yourself permission to fall into bad habits or let your code quality decline, as you aren't seeing the immediate effects of your output. On the other hand, a utility you develop for yourself will throw whatever bugs it contains into your face, and force you to deal with them as soon as possible (or at least as soon as your patience for them runs out). You can't hide behind "I guess our project just isn't all that good" when you're the only one defining the spec, writing the code, and running the app.

Finally, writing utilities early on in your programming journey is a good litmus test for whether you enjoy programming enough to pursue it as a career. If putting together small programs that solve real problems for yourself is fun (if sometimes exasperating), you're more likely to have a good time writing parts of larger programs for enterprise-scale solutions. If, on the other hand, you absolutely hate it, this may not be the career for you, and that would be better to know now rather than 5 or 10 years down the line.

If you're not sure what to write, think about what things you regularly do on your computer that require multiple manual steps. Could you script those tasks so that they can be performed with a single command or key combination? In some cases the answer will be no, but often you can. If you already have some programming experience, you might also check out Write Your Own Git or try re-implementing another tool you use frequently — you almost certainly won't create anything as mature as the original, but you will come away with a deeper understanding of how it works and the challenges and tradeoffs that went into its design.

If this isn't something you've ever thought to do, don't fret — start thinking about your next side project today!