SyntÉ™ RSS repo @m
back

27/01/2024

Todo and Code Bonsai 🌳

I’m introducing a new sport, or at least a new digital game. It’s called Code Bonsai.
Like code golf, but more artistic than competitive.
The general concept is to produce carefully crafted minimal, yet useful programs. No rules, no frameworks, no dependency hell. Just zen code - something that does something, and does it well.

To demonstrate, I present: todo
This tiny utility is engineered to help with one specific aspect of writing code, which should be fairly self explanatory. The idea sprang from pondering on how to keep track of typos discovered during review. If like some you want to put all of them into one clean commit, what is the best way to do (pun very much intended) this? Some kind of stack to push them onto, that you can pop off one by one. Now there are many ways this can be done. A sophisticated approach may involve a plugin of some sort with which you can tag relevant lines to return to later. Another simpler way would be to hook a spellchecker into your commit flow. todo is my way of tackling this.
Why? Well, one reason is that you can easily keep track of many different tasks, not just typos. A crucial part of the design is that only one is presented at a time when you are ready to pop. This has been part of my own task culture for years - only focus on what is next - and leave the rest for later.
It was also very simple, quick, and satisfying to write; and fits in well with the unix philosophy. Or at least my version of it. Let’s face it - there is no one true way.
Anyway, enough rambling - more info can be found in the repo. For now I am trying it out in use, so far so …bonsai :)


 updated on: 8 / 2 / 2024

↑ top