Ada Notes Sound & software

Software

Small tools, clear names

The real test of a small tool is not how it feels on the day it is written. It is whether it still makes sense when you open it again a month later, with no memory of the decisions behind it.

Names carry the design

A descriptive name is a comment that cannot go stale. backup_folder() explains itself; process2() starts an investigation. The same applies to configuration keys, command names and the files a tool creates. When a name is honest, the reader needs less context to trust the code.

Short names are fine when the scope is short too. A loop index can be i; a setting that changes behavior should not be.

One place for settings

Settings scattered through a script are difficult to audit. A single block at the top, or a small file next to the tool, makes the defaults visible and the changes reviewable. It also gives future you a place to look first when behavior is surprising.

# settings input_dir = "takes" export_format = "mp3" peak_target_db = -12
Example of a small, readable settings block. The comment labels the group; the names say what changes.

Write the assumptions down

Every small tool rests on assumptions: the input is mono, the files are already named, the network is available. Most of them are obvious only while you remember writing the code. A short note at the top of the file, three or four lines, keeps them visible.

Notes are also useful when a tool is deliberately limited. “Handles one folder at a time; no recursion” prevents a future reader from assuming a feature that was never built.

Keep the surface small

A tool with three commands is easier to remember than one with fifteen flags. When a new option is tempting, ask whether it belongs to this tool or to a separate one. Removing a feature is cheaper than documenting it forever, and a smaller surface leaves fewer combinations to test.

Practical checklist

← Back to all notes