Teaching Subversion ?

After many years of using, encouraging, and observing developers using Subversion led me to a conclusion, it was never a technical issue but a people issue. Some lessons learned:

Management support
Unless the management, especially those without technical background, support the use of any source control to be the integral part of development process. Otherwise, you will be wasting your time and your breath.

Can anyone still practice software development without source control? Yes, you can. Short term project, especially those can be handled by single developer. Or one developer per module or folder approach where source code are shared through one centralized file server. Hence, you will encounter files in project that looks like this:
index.php
index_20131213.php
index_20131010.php

Yup, the developer is cooking his own source control. I cringes every time I see anyone does this. The saddest part is such practice is still so prevalent.

Company that don't value the importance of source control does not realize the benefit of safeguarding their intellectual property and other assorted gains in using it.

Use source control properly
Troy Hunt's 10 commandments lay down the rules on how to use it correctly. I will like to focus on two major difficulties I observed especially for those (me as well) who just starting to explore source control.

Write a meaningful and better commit message. You should explain the why and not really the how. Occasionally you will read empty commit, repeated (e.g. "latest update"), or just plain wrong commit message. These are useless and not helpful for anyone to review back any previous changes. Why so ? Because writing good commit message is hard, especially those whose mother tongue is not English. To solve this, set a standard log message format and encourage the developer to break each task into smaller chunk.

Commit early, often, and small / atomic. Break a large task into smaller sub-tasks. Unless the developer is stuck at something, there should be multiple commits per day. Also, this is to prevent those developers who like to commit everything in one shot.

In short, having the right tool and convention are not sufficient enough unless the developers are willing to use it correctly.

No comments:

Post a Comment