One-character patches
Yesterday, I made my first contribution to Racket in the form of a one-character patch. (It corrected a typo in a menu item for one of the Redex visualization tools.) That got me thinking about the history of one-character patches to projects I’ve worked on.
I imagine that a lot of people hesitate to start contributing to a project when all they have is a tiny patch to offer. Perhaps they think that if it was really important, someone else would have fixed it already. Or perhaps they think that they’ll be sneered at – that someone will see their patch and conclude that that tiny, insignificant patches must be all they’re capable of. As a counterexample, I offer Jim Blandy’s first contribution to Rust, a one-comma typo fix to the tutorial. If a hacker as accomplished as Jim didn’t hesitate to begin contributing to Rust with a patch so small you might have to squint to see it, then there’s no reason for anyone else to hesitate to make tiny patches, either.
Another, more recent one-character first patch comes to mind: a typo fix to the usage information for the rust
command. It fixed a typo that had appeared every time someone typed “rust” at the command line. (Granted, most people aren’t going to just type “rust” very often, but still, plenty will once or twice, if only just to see what happens.) This one-character patch will ultimately reach a lot of Rust users, and it was made by a first-time contributor to the project.
Then, of course, there are those times when one adds a forgotten '
to an identifier and it drastically changes the semantics of the program, like this memorable bug that my advisor caught recently. Unfortunately, I don’t have handy an example like that where the one-character fix was the entire patch, let alone one where the one-character fix was the only contribution to a project from a particular author – although I’m sure such examples do exist.
What are your favorite patches that added, removed, or changed a single character? Are there any projects to which your sole contribution is a one-character change?
Comments