On Writing Small Tools#

Most tools grow because nobody ever says no to a feature. The interesting question is not what a tool should do, but what it should refuse to do.

The cost of a dependency#

Every dependency is a promise that someone else will keep maintaining something. Sometimes that promise is worth it. Often it is not:

A tool that needs a package manager to start is not a small tool. It is a large tool with a small entry point.

What that looks like in practice#

Here is the whole build step:

python mdssg.pyz build

No node_modules, no lockfile, no virtualenv. The comparison is not really about speed --- it is about how many things have to be true before the first command works.

approachinstall stepsfiles shipped
npm tool31200
one file01

Some of this is taste. Some of it is arithmetic.1


A very small workshop

Read the refusal piece if you want the long version. Otherwise: write less, and delete more.

  1. A thousand transitive packages is not a hundred times more capable than ten. It is a hundred times more surface area. back