37
Work Flow for Solo Developers and Small Teams @emmajanehw http://drupalize.me http://developerworkflow.com/ Problem: Developers face a steep learning curve when they choose to adopt version control. Solution: There is a version control strategy to suit your workflow, even if you've always thought it was too hard to bother. Is your project folder filled with files like this: page.old.2.bak.php? Does Git make you angry inside? Do you resent that everyone except you regularly visits the magical place referred to as "The Command Line"? Are you afraid of the vagrant who stole your puppet? In this session you will get a gentle introduction to working eciently as a developer in small teams, or as a solo developer. We'll focus on real world examples you can actually use to make your work faster and more ecient. Yes, this is an introductory session. This is for people who feel shame that they don't know how to "just cd into yer root durrr" and get mad when people say "just dime a patch" as if it's something as easy as making a mai thai even though you have no rum. No, you don't have to have git installed to attend. You don't even need to know where the command line is on your computer.

Work Flow for Small Teams and Solo Devs

Embed Size (px)

DESCRIPTION

Problem: Developers face a steep learning curve when they choose to adopt version control.S Solution: There is a version control strategy to suit your workflow, even if you've always thought it was too hard to bother. Is your project folder filled with files like this: page.old.2.bak.php? Does Git make you angry inside? Do you resent that everyone except you regularly visits the magical place referred to as "The Command Line"? Are you afraid of the vagrant who stole your puppet? In this session you will get a gentle introduction to working efficiently as a developer in small teams, or as a solo developer. We'll focus on real world examples you can actually use to make your work faster and more efficient. Yes, this is an introductory session. This is for people who feel shame that they don't know how to "just cd into yer root durrr" and get mad when people say "just diff me a patch" as if it's something as easy as making a mai thai even though you have no rum. No, you don't have to have git installed to attend. You don't even need to know where the command line is on your computer.

Citation preview

Page 1: Work Flow for Small Teams and Solo Devs

Work Flow for Solo Developers and Small Teams

@emmajanehwhttp://drupalize.mehttp://developerworkflow.com/

Problem: Developers face a steep learning curve when they choose to adopt version control.Solution: There is a version control strategy to suit your workflow, even if you've always thought it was too hard to bother.Is your project folder filled with files like this: page.old.2.bak.php? Does Git make you angry inside? Do you resent that everyone except you regularly visits the magical place referred to as "The Command Line"? Are you afraid of the vagrant who stole your puppet? In this session you will get a gentle introduction to working efficiently as a developer in small teams, or as a solo developer. We'll focus on real world examples you can actually use to make your work faster and more efficient.Yes, this is an introductory session. This is for people who feel shame that they don't know how to "just cd into yer root durrr" and get mad when people say "just diff me a patch" as if it's something as easy as making a mai thai even though you have no rum. No, you don't have to have git installed to attend. You don't even need to know where the command line is on your computer.

Page 2: Work Flow for Small Teams and Solo Devs

Agenda

• What problems version control can solve for you

• Work flow examples

• Branch management strategies

• Q&A / therapy session

Page 3: Work Flow for Small Teams and Solo Devs

What’s your role?

Page 4: Work Flow for Small Teams and Solo Devs

What are your tasks?

download work

create snapshot

share work

Page 5: Work Flow for Small Teams and Solo Devs

What’s your workflow?

Page 6: Work Flow for Small Teams and Solo Devs

What’s your branch management strategy?

Page 7: Work Flow for Small Teams and Solo Devs

How do we make Git do that?

Git Shell, cross-platform

Page 8: Work Flow for Small Teams and Solo Devs

Git is 90% process and 10% technology.

• If you can diagram the problem you are trying to solve; you are ready to start playing with software. If you can’t draw the picture, you’re not ready for the toolkit.

Out of the box, Git does basically nothing for you. It’s your processes that will allow you to apply the tools you need to make version control work for you.

Page 9: Work Flow for Small Teams and Solo Devs

Version control (sort of) makes automation easier

• Backup and restore

• Synchronize across multiple platforms

• Short-term “undo” to test implications of changes

• Long-term “undo” to reverse bugs or regressions

• Track changes to see why/how software evolved

• Track ownership to give “credit” to change makers

• Sandbox code to test changes without affecting other people and systems

Page 10: Work Flow for Small Teams and Solo Devs

Terminology: locations• remote repository

• trunk or main

• head or tip

• local repository

• client

• working copy

Page 11: Work Flow for Small Teams and Solo Devs

Terminology: actions and tasks

Page 12: Work Flow for Small Teams and Solo Devs

Set the stage!

Before we can set our workflow we need to know who we’re dealing with and what they’re supposed to be doing.

Page 13: Work Flow for Small Teams and Solo Devs

Who’s on your code team?

Write down a list of all of the people on your code team. This list may include:

• developers

• designers

• project managers

• clients

Page 14: Work Flow for Small Teams and Solo Devs

Where do you fit in?

Maybe you do everything. Maybe you only do some things. Write a list of all the tasks you are actually responsible for. This might include:

• Writing code.

• Reviewing code.

• Pushing tested code to the server.

• Fixing broken code.

Page 15: Work Flow for Small Teams and Solo Devs

What are your tools and restraints?

Often there are other things we need to fit into our workflow. Create a third list of any tools and restraints you are aware of. This list might include:

• Version control software (we’ll always assume Git)

• Code hosting system (Bitbucket, GitHub, self-hosted)

• Server ecosystem (dev / staging / live)

• Code editors & integrated developer environments (vim, Dreamweaver, Sublime, PHPstorm)

• Automated testing systems or review “gates”

Page 16: Work Flow for Small Teams and Solo Devs

What’s your workflow?

With the team members identified, it’s time to sketch out how these people (ideally) work together.

Page 17: Work Flow for Small Teams and Solo Devs

Solo developer workflow

Page 18: Work Flow for Small Teams and Solo Devs

Partner workflow with no central server

Page 19: Work Flow for Small Teams and Solo Devs

Centralized workflow with no local commits

Page 20: Work Flow for Small Teams and Solo Devs

Decentralized with human gatekeeper

Page 21: Work Flow for Small Teams and Solo Devs

Decentralized with automated gatekeeper

Page 22: Work Flow for Small Teams and Solo Devs

Sketch out your workflow

• Identify the roles on your team.

• Identify the relationships between the team members.

• Draw arrows to show how code flows between team members.

Page 23: Work Flow for Small Teams and Solo Devs

How will you manage your branches?

With the workflow described, it’s time to look at how the code will be segregated into different branches.

Page 24: Work Flow for Small Teams and Solo Devs

Popular strategies

• http://nvie.com/posts/a-successful-git-branching-model

• http://scottchacon.com/2011/08/31/github-flow.html

Page 25: Work Flow for Small Teams and Solo Devs

Work flow and branch management

Page 26: Work Flow for Small Teams and Solo Devs

Work flow and branch management

Page 27: Work Flow for Small Teams and Solo Devs

Work flow and branch management

peer review

Page 28: Work Flow for Small Teams and Solo Devs

Work flow and branch management

peer review

public / live server

Page 29: Work Flow for Small Teams and Solo Devs

Work flow and branch management

peer review

public / live server

Page 30: Work Flow for Small Teams and Solo Devs

Work flow and branch management

peer review

public / live server

dev / testing server

Page 31: Work Flow for Small Teams and Solo Devs

Work flow and branch management

peer review

public / live server

dev / testing server

master

master

master

Page 32: Work Flow for Small Teams and Solo Devs

Work flow and branch management

peer review

public / live server

dev / testing server

master

master

master

dev

dev

dev

Page 33: Work Flow for Small Teams and Solo Devs

Work flow and branch management

feature feature

hotfix feature

peer review

public / live server

dev / testing server

master

master

master

dev

dev

dev

Page 34: Work Flow for Small Teams and Solo Devs

Work flow and branch management

feature feature

hotfix feature

peer review

public / live server

dev / testing server

master

master

master

dev

dev

dev

Page 35: Work Flow for Small Teams and Solo Devs

Sketch out your branch management strategy

• Identify the roles on your team.

• Identify the relationships between the team members.

• Draw arrows to show how code flows between team members.

• Time: 10 minutes

Page 36: Work Flow for Small Teams and Solo Devs

Q&A + Git Therapy Session

Page 37: Work Flow for Small Teams and Solo Devs

You can make Git do what you want...now that you know what you want.

@emmajanehwhttp://drupalize.mehttp://developerworkflow.com/