Information Technology Reference
In-Depth Information
Waiting more than a day or so to commit code to the version control
repository makes integration time-consuming and may prevent devel-
opers from being able to use the latest changes. Try one or both of
these techniques to commit code more frequently.
Make small changes —Try not to change many components all
at once. Instead, choose a small task, write the tests and source
code, run your tests, and then commit your code to the version
control repository.
Commit after each task —Assuming tasks/work items have
been broken up so that they can be finished in a few hours, some
development shops require developers to commit their code as
they complete each task.
Try to avoid having everyone commit at the same time every day.
You'll find that there are usually many more build errors to manage
because of the collisions between changes. This is especially trouble-
some at the end of the day, when people are ready to leave. The longer
you wait to integrate with others, the more difficult your integration
will prove to be.
I Just Can't Commit
A friend runs a 25-developer project and he'd like to incorporate
many CI practices, but he is experiencing challenges in getting the
developers to commit code frequently. I've found that the main rea-
son that changes are not committed frequently is because of the
project culture. Sometimes developers do not want to commit their
code until it is “perfect.” This usually happens because their
changes affect too many components. Committing code frequently
to the version control repository is the only effective way to imple-
ment CI, and this means that all developers need to embrace this
development practice by grabbing smaller chunks of code and
breaking up their tasks into smaller work items.
Search WWH ::




Custom Search