Thursday, October 2, 2014

The Importance of Cards and Pull Requests

We move pretty fast compared to most development groups.  A small team with lots of communication means moving fast isn't too dangerous.  However, as we bring in more people and projects, that's going to get a lot harder.

As developers, there are a few simple things you can do that won't take much time, but will go a long way toward preventing critical issues and bugs in production.

Whenever you work on a new feature, enhancement, or bug fix, make sure there is a card on the project's Trello board that describes the work you will be doing.  Add as much detail as makes sense without being too verbose.

Once you are sure you are working from a card, create a new branch for the changes in the card.  It's important that you have a card for each change, and a branch for each card.  It may not always be possible or practical to work this way, but those should be rare exceptions.

When you are finished with the branch and create a pull request to merge back to master, your pull request should only contain changes for that one card.  That way it's easy to review and test pull requests and have a fairly good idea of what in the project is being affected.

This keeps each card on the fastest track to production.  If multiple cards are combined in a pull request, and something needs to get to production fast, things will slow down as we untangle the implications of multiple changes in a branch and make sure everything is tested correctly.

Once your pull request is submitted, make sure you have a conversation with your code reviewer and your DevOps engineer.  The conversation should cover what the implications of the change are, what else could be affected, what testing have you done on your own code, and what else may need to be tested.  This conversation doesn't need to be longer than five minutes, unless your change is really large or complex.

One of the keys to moving fast is keeping things simple.  A good way to keep things simple is one change per card - one card per branch/pull request - and a release conversation before every pull request gets pushed to production.

No comments:

Post a Comment