Setting up a global .gitignore file

Reviewing pull requests, I often see contributors sneakily adding editor configuration to the repository's .gitignore file.

composer.lock
package.lock
+ .vscode

If everyone would commit their environment-specific .gitignore rules, we'd have a long list to maintain! My repository doesn't care about your editor configuration.

There's a better solution to this: a personal, global .gitignore file for all your repositories. Here's how you can set one up.

Read more

React's versioning policy

React follows semantic versioning, but with a twist. From their versioning policy:

When releasing critical bug fixes, we make a patch release by changing the z number (ex: 15.6.2 to 15.6.3).

When releasing new features or non-critical fixes, we make a minor release by changing the y number (ex: 15.6.2 to 15.7.0).

When releasing breaking changes, we make a major release by changing the x number (ex: 15.6.2 to 16.0.0).

The twist is subtle: non-critical bugfixes are released as minor releases.

I've often wondered whether three digits really is necessary for versioning. As a package maintainer, deciding between minor and patch is often a gray area.

Two digits would suffice: breaking changes and non-breaking changes. Feature or bugfix doesn't really matter from a technical point of view: upgrading can either break things, or can't.

React reserves the patch number for critical bugfixes, which I believe is a necessary escape hatch in a two digit system. But I like I how they default to simply bumping minor versions.

Don’t forget to be selfish every now and then

The other day, I stumbled upon an older article by DHH. “Work on what you use and share the rest”.

My core philosophy about open source is that we should all be working on the things that we personally use and care about. Working for other people is just too hard and the quality of the work will reflect that. But if we all work on the things we care about and then share those solutions between us, the world gets richer much faster.

I’ve been keeping this in the back of my mind the past few months.

I was always adding features because I’d expect other people to expect them. It’s a trap! You’re not making people happier by guessing what they might need. You’re not doing anyone a disservice by building things for yourself.

Building things for yourself makes it easier to ship something you feel happy about. It makes it easier to ship something at all.

Don’t forget to be selfish as an open source maintainer every now and then. It’s a good investment in the long run.

I used to fall in the trap of thinking I needed to add features because other people might expect them to be a part of my code, not because I need them myself.

A good issue

Maintaining a number of open source projects comes with a number of issues. Reporting a good issue will result in a more engaged approach from project maintainers. Don't forget: there's a human behind every project.

Read more