custom software development

Slices, Foul Balls, & Air Balls

An unclear commit message can be a sign that work was not appropriately broken down into smaller chunks. It’s likely that it has become more complex and took longer to complete because of it. For example, a change to the contact form should not include a change to the authentication form. Keep changes simple and deliver earlier. Another advantage to this is it keeps potential problems after deployment isolated.

Git blame can be a useful tool when you run into a problem and want to know why a line of code was written. However, when you find the change and the commit was made in a huge commit with a message of “New feature” it doesn’t provide much context to help. Think about this even when you are making a minor change and try to keep the message clear.

A Graceful Finish

Pull requests and code reviews complete your workflow gracefully by ensuring that the code that is merged in meets your team’s standards. At this stage, the reviewer should navigate through your changes commit by commit adding comments where there are any style guide violations or ideal opportunities for refactoring. This is one example of where it is important to have clear commit messages. This enables the reviewer to know the context of changes you have made and go into the review with that expectation.

Any changes that come out of the code review should have additional commits created and pushed back up for review. Again, keep commit messages clear for the reviewer.

The Retrospective

As a part of your normal sprint, consider making an effort to simplify your commits, clarify your commit message for review, and engage in a code review to ensure quality code is getting merged into your production builds.