The Biggest Problem In Software Development:
Version ControlnumEggs = 2amountOfFlour = 2oil = 0.5water = 2while (amountOfingredients > 0)
combine(eggs, flour, oil, water)mixBatterplaceInOvenfor timer in range(1,31):
cooktakeOutOfOven
Image Credit: www.clipartlord.com
Multiple Programmers
Image Credit: www.clker.com, www.clipartpanda.com
Bob
Jane
Multiplecandles
One bigcandle
Sparklers
33
5
Add candles
Colorselection
Type
Applicationmethod
33
5
Add frosting
The ProblemnumEggs = 2amountOfFlour = 2oil = 0.5water = 2createFrostingpurchaseCandleswhile (amountOfingredients > 0)
combine(eggs, flour, oil, water)mixBatterplaceInOvenfor timer in range(1,31):
cooktakeOutOfOven
applyFrostinginsertCandles
Both Bob andJane are makingchanges to thesame section ofcode…
… just exactly how are
they going to go about
doing that?
How A Problem Happens
numEggs = 2amountOfFlour = 2oil = 0.5water = 2purchaseCandles...
This is what the customer will
receive!
What’s The Solution?Version Control!
• Keeping track of source code (or any kind of files for that matter)across a project is tricky.
• You have lots of people working on files—sometimes the same ones, sometimes different.
• Any serious software project needs version control, which is also often called configuration management, or CM for short.
• Version control is a tool (usually a piece of software) that will keeptrack of changes to your files and help you coordinate differentdevelopers working on different parts of your system at the sametime.
Image Credit: pinstake.com
How Does A Version Control Solution Work?
Bob
Jane
1. Bob checks code out from the server
1.5 Jane can check the samecode out at the same time
Image Credit: www.dreamstime.com, www.clipartpanda.com
2. Bob makes changes tothe code and tests it
3. Bob checks his changes intothe CM tool
Server running CM software
3.5 Team gets an updatedversion of Bob’s code
Version Control System:The Details
Image Credit: ClipArt Best
1. Create a repository 2. Import code intothe repository
3. Check out codefrom the repository
4. Make changes to the code
3. Check code intothe repository
Problems Can Still Happen!
4. Make changes to the code
3. Check code intothe repository
Bob
Jane
4. Make changes to the code
3. Check code intothe repository
Image Credit: ClipArt Best
The CM Software Will Detect And Attempt To
Manage Conflict• If the changes to the same piece of code don’t conflict with
each other, then the code will be merged.
• If the code can’t be merged, then the CM will reject the second commit and issue a conflict
• You need to make changes to resolve the conflict and then resubmit the commit
Image Credit: facs.phillipmartin.info
What We Covered Today
1. Development version control
2. Configuration management software
3. Conflicts
Image Credit: http://www.tswdj.com/blog/2011/05/17/the-grooms-checklist/