Home > Articles > Software Development & Management > Agile

  • Print
  • + Share This
From the author of

Method 1: Shared Directory

Keep all files in one directory (tree). Anybody can edit the files whenever they need to. The mainline of code—the copy of the code that everybody agrees is the "right" copy from which to develop—consists of whatever is in that directory.

While this may be the simplest method, it's not the simplest method that will work. (In spite of its faults, I've met more than one group using this approach.) This method has some inherent problems:

  • Two people editing the same file at the same time can interfere with each other; changes can be lost. The situation can happen in two ways (see Figures 1 and 2). If two people are editing a file, one or the other will save first, without awareness of the other's changes. Some editors can detect this situation and warn about it but this isn't always enough.

    Figures 1 An overlapping change.

    Figures 2 Another overlapping change.

  • Without coordination, the mainline may never be in a "good" state. Suppose one pair finishes their changes and starts on their next task. But the other pair is still in the middle of their changes. You may have to go back an arbitrary amount of time to find a consistent version. (Some groups use the idea of a "code freeze" as a time when changes are forced to be integrated, with no new work started.)

  • For configuration management purposes, you can take a snapshot and back up the directory at any time, but you may never have a known-working system.

  • There's no concept of a transaction for changes. A transaction is a set of changes that either all succeed or all fail, as a group. Transactions are useful because developers don't always know whether their approach will succeed. If it fails, you want to avoid making it part of the mainline.

  • + Share This
  • 🔖 Save To Your Account