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.
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
- Names describe the action, not the order in which code was written.
- Settings live in one visible place.
- Assumptions are written near the top of the file.
- Limits are stated explicitly, not implied.
- A new option must earn its place on the command surface.