Matthew Boston

AI never would have installed left-pad

January 20, 2026

Key takeaway: Before you install a tiny utility package, ask an agent to write it with tests in your own repo.

If an AI agent can write and test a utility in seconds, don’t install a package for it. Own the small code yourself.

In 2016, a developer unpublished an 11-line npm package called left-pad, and half the JavaScript ecosystem broke. The industry had a habit of importing trivial packages instead of writing trivial code.

Back then the reasoning held up. Writing it yourself was cheap, but maintaining it wasn’t: edge cases, tests, bug reports. A tested package seemed better.

AI changes that. An agent can write a left-pad function, add tests, and move on in seconds. Because the code lives in your repo, there’s no supply chain risk and no version conflicts. You control every line.

Packages that hold real expertise still earn their place. Cryptography, date handling, and HTTP clients are hard to get right, and that justifies the dependency.

Every dependency is a bet that the maintainer keeps it updated, that it won’t break at a bad time, and that its own dependencies won’t conflict. It’s also a commitment to keep upgrading it as long as your app lives. For complex packages, the bet is usually worth it. For trivial ones, it usually isn’t.

Next time you reach for a tiny utility package, ask whether an AI would just write it. If so, let it. Five lines you own are easier to live with than a line in your package.json pointing at someone else’s weekend project.