A few rules I put on integration and committing code (SHOULD be obvious, right?):
-Do an update, integrate, build-test-compile, then commit.
-Only commit what compiles and passes tests.
-If merges are not trivial, contact the other developer.
-Your changes work on your machine, but your commit breaks the CruiseControl build, wait until dependencies re-build and verify the build is a success. Otherwise, fix it ASAP.
So here’s what you DON’T want to do:
1. When you do an update and a conflict occurs: comment out what does not compile, even if it isn’t your code.
2. When a merge is not trivial and a conflict occurs: replace it with your working code.
3. If a block in a method doesn’t work, comment out the things that are broken, and return a null.
Does anyone have a good link on basic software development BEST practices? Here’s my list:
Best of the Shade Tree Developer
How to produce software quickly, Part 1 (2, 3, 4)