|
|
|
|
|
by hopeless_case
4881 days ago
|
|
When you are doing maintenance programming, where you only ever understand small pieces of the code at a time (the ones relevant to the project you are currently working on), bisecting the history of your commits is a very powerful way of doing business. In one of my feature branches, I wrote added some /* ... */ style comments to a mysql script and used apostrophe's in the text of my comment. This can confuse mysql when it executes the script. I was not deploying the new scripts into my test environment after every commit (I was mostly working on the python back-end, and only adding comments to the mysql scripts because they explained something that was happening in the python code). Several commits later, I do a full deploy and I have new symptoms. It was only by backing up through my commit history that I was able to find the commit that first introduced the symptom, and it was only the fact that I write small commits that allowed me to discover the problem with the apostrophe's. Generalizing, whenever you are making incremental changes to a complex system where you don't understand all of the effects of your changes without lots of testing, it makes sense to write small commits so that you can backtrack to see when an unintended behavior first surfaced. Maintenance programming is one field in which this approach is crucial. |
|