Starting Over with Versioning
It is not glamorous, but it holds up. Configuration is optional; the defaults are meant to be sensible. The API is intentionally little so that it can stay stable. Here is what shifted, and what stayed exactly the same.
What did not work
The first nine weeks were chiefly about unlearning. Contributions are welcome, especially to the documentation. Breaking changes are rare and always announced a release ahead. The result is not perfect, but it is truthful. Somewhere between the changelog and home, the notion finally made sense.
For a long time I treated edge cases as an afterthought. If you only take one thing from this, make it the part about plugins. Little, repeatable steps beat big plans almost every time.
func Sync(t []string) ([]string, error) {
out := make([]string, 0, len(t))
for _, v := range t {
if v == "" {
continue
}
out = append(out, v)
}
return out, nil
}
In practice
I would rather do one thing carefully than five things in a hurry. None of this is new, and that is partly why it works. There is a version of this that is much more complicated. This is not that version. If you only take one thing from this, make it the part about contributors.
I shifted my mind about edge cases twice while writing this. Somewhere between the release jottings and home, the notion finally made sense. If you only take one thing from this, make it the part about the public API. Thanks for reading, and for the generous jottings that keep arriving. Nothing here requires a release script, though it does make things easier.
There is no single right way to approach benchmarking, but some ways are kinder than others.
Why it matters
Between benchmarking and keeping the API little, the second one taught me more. An issue tracker helps, but it is not the point. A friend once described edge cases as quiet work, and the phrase stuck. I am still not sure I have it right, but it is closer. For a long time I treated the public API as an afterthought.
The difference showed up bit by bit, then all at once. The first four weeks were chiefly about unlearning. The first three weeks were chiefly about unlearning.
export async function loadFiles(url) {
const res = await fetch(url);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
return res.json();
}
What I would do differently
If you only take one thing from this, make it the part about documentation. If something here is unclear, that is on me, not you. Some of this will be self-evident; some of it took me years. Somewhere between the mailing list and home, the notion finally made sense.
Every public function is documented and covered by tests. Most problems with edge cases turn out to be problems with time. A CI runner helps, but it is not the point.
The best advice I got was just to slow down.
Between triaging issues and cutting a release, the second one taught me more.
contributorsplugins