SlideShare a Scribd company logo
Work Flow for
Solo Developers and Small Teams




  @emmajanedotnet
  emma@emmajane.net
Today
1. Developer’s Environment
   (The Command Line)
2. Version Control Basics
3. Developer Tools for Larger Teams
A Developer’s Environment
Together, Yet Separate
The command line is used in many free,
online resources.
GUIs reveal complexity in different ways.


                                  SourceTree, OSX




SmartGit, cross-platform
$_
In the Beginning,
Was the Command Line
A command-line interface (CLI) is a means of
interaction with a computer program where the user
(or client) issues commands to a program in the form
of successive lines of text (command lines).
The command-line interface evolved from a form of
dialog once conducted by humans over teleprinter
machines, in which human operators remotely
exchanged information, usually one line of text at a
time.
http://en.wikipedia.org/wiki/Command-line_interface
Commands Affect Your Environment




http://en.wikipedia.org/wiki/Logo_(programming_language)
Commands Affect Your Environment




              http://www.youtube.com/watch?v=LRhbcDzbGSU
Command Line Interface




   http://en.wikipedia.org/wiki/Command_Prompt
define:prompt
a transitive verb meaning To move to action.


? forward 90
> open mailbox


At the command line, you are constantly being
asked by the computer, “What action would you like
to take next?”
Commands
(verb)
●   One-word actions:
    –   sing
    –   jump
    –   look
●   One-word commands:
    –   help
    –   exit
    –   history
Commands With Parameters
(verb noun)
●   An action, and a direct object:
    –   take book
    –   read pamphlet
    –   open window
●   Commands with parameters:
    –   cd /var/www
    –   man <command_name>
    –   mv file_current_name.jpg file_new_name.jpg
Commands With Modifiers + Parameters
(verb adjective noun)
●   Refining the request:
    –   go down stairs
    –   take blue pill
    –   open left door
●   Adding a flag/switch/modifier:
    –   mkdir -p parent_directory/sub-directory
    –   tar xvf file_to_extract.tar.gz
    –   ls -lh
Ten Commands I Use All the Time
ls      list files
cd      change the current directory
mv      move a file to a new location (and/or rename)
cp      copy a file
pwd     print working directory (answers: where am I?)
rm      remove file
clear   refresh the screen
man     read the manual page for a specific command
tar     work with packages of files
chmod   change the “mode” (aka permissions) of a file or directory
“All” The Commands
http://www.commandlinefu.com/commands/browse
This site includes a “rating” function.
Learning the CLI tools
makes your knowledge portable.
●   OSX and Linux both use the same flavour of
    command line environment (“the shell”).
●   Not all Web server applications have a graphical
    administrative interface, so learning to use the
    command line allows you to run server
    applications in your local developer environment.
●   Sequences of commands can be captured as
    scripts, which you can run on any compatible
    machine without having to point-and-click.
Version Control Basics
Benefits of Version Control
●   Backup and restore
●
    Syncronization across multiple systems
●
    Short-term undo to test implications
●   Long-term undo to reverse bugs
●   Track changes to see why/how software evolved
●   Track ownership to give ‘credit’ to change makers
●   Sandboxing our code to test changes without
    affecting others
There is no excuse
for not having version control.

The cheapest way to get version control is to use an
automated backup system, like Dropbox, for your
code.
Terminology
●
    Repository. The database of changes to your files.
●
    Server. The computer storing the repository.
●
    Client. The computer connecting to the repository.
●
    Working copy. Your local copy, where changes are
    made.
●
    Trunk (or “main”). The current, primary source for
    unchanged code.
●
    Head. The latest revision in the repository.
Basic Actions
●
    Add. Put a file into the repo.
●
    Revision. Checks what version a file is on.
●
    Check out. Download files from the main repository.
●
    Check in. Upload changed files to the main repository.
●
    Changelog. A list of changes made to a file since it was
    created.
●
    Update/sync. Synchronize your files with the ones from
    the main repository.
●
    Revert. Throw away your local changes and reload the
    latest version from the repository.
Workflow: The Solo Developer



Create project   Add files   Do your work   Upload files




                             Do more work
define:work
Basic Check-ins



                       Main Trunk



 Milk         Milk          Milk    Milk
              Eggs          Eggs    Eggs
                            Juice   Soup



    r1            r2           r3     r4
Diffs Show the Difference
Between Two Versions of a Project

                        Main Trunk



Milk            Milk              Milk              Milk
                Eggs              Eggs    - Juice   Eggs
       + Eggs           + Juice
                                  Juice   + Soup    Soup



  r1               r2                r3              r4
define:work
Tagging

James’s Final    Emma’s          Groceries
Grocery List    Additions        Purchased



                    Main Trunk



  Milk          Milk             Milk
  Eggs          Eggs             Eggs
  Soup          Soup             Soup
                Bread            Bread
                                 M&Ms
     r4            r7              r9
define:work                             Milk
Branching                               Eggs
                                        Soup
                                        Bread
                              St o re   M&Ms    r9
                     Ca ndy

              Main Trunk



   Milk          Milk
   Eggs          Eggs
   Soup          Soup
                 Bread


     r4             r7
Workflow: Read-only Projects
“Fork Me” on GitHub
                                         Improved

                           yF  o rk      version of
                          M               project
                                   ch)
                            (bran



       Random Project on the Internet
Workflow: Partner



1. James starts a grocery list                     2. Emma already had a grocery list started.
                                                      She asks to see James’s list.



    3. James remembers a couple more items.        4. Emma adds a few things from her list.




                        5. The grocery lists are combined and James goes shopping.
Collaborative Actions
●
    Branch. Create a separate copy of a repository for personal use.
●
    Diff/change/delta. Identifies the differences between two
    versions of a file.
●
    Merge/patch. Apply the changes from one version of a file, to
    another.
●
    Conflict. When two versions of a file have proposed changes at
    the same place.
●
    Resolve. Deciding which version of conflicting changes should
    be applied, and which should be discarded.
Merging           Milk
                  Eggs       + M&Ms      Milk
                  Soup                   Eggs
                                         Soup
                                         M&Ms




                 Main Trunk (James’s List)


Milk                Milk                        Milk
Eggs                Eggs                        Eggs
       + Bread                        + M&Ms
Soup                Soup                        Soup
                    Bread                       Bread
                                                M&Ms
Resolving Conflicts
                     Milk     + M&Ms
                                         Milk
                     Eggs
                                         Eggs
                     Soup
                                         Soup
                                         M&Ms




                 Main Trunk (James’s List)

Milk                Milk                           Milk
Eggs   + Bread      Eggs                           Eggs
                                         + M&Ms
Soup   - Soup       Bread                          Bread
                                         + Bread   M&Ms
Sample Project




     http://betterexplained.com/articles/a-visual-guide-to-version-control/
Workflow: Centralized
no local commits


                   checko
                         ut




                        it
                   comm
Workflow:
Decentralized with a shared mainline

                   clone (
                           or   ) pull
          commit




                      push




          commit
Developer Tools for Larger Teams
Complicated problems are complicated.
●   Bigger code base = more contributors ->
     formalized code review process
●   Bigger projects = more stakeholders ->
     project management
●   Bigger projects = more infrastructure ->
     devops
Formal Code Review Process
●   Code should never be released into the wild
    without having a second set of eyes on it.
●   It’s very easy to overengineer your workflow
    process.
●   Make sure you do what’s right, not what’s easy,
    for your team.
Workflow:
Decentralized with human gatekeeper

                              clone

    commit


                                          s)
                                     d ate
                             (fo r up
                        pull
                                                                 s
                                                             ng e
                                                       e cha
                                               mer g


                                                       reject changes
             request merge
    commit
Workflow:
Decentralized with automated gatekeeper

                                        clone

                   commit
            view




                                                    s)
                                                 ate
  request re




                                               d
                                       (fo r up
                                  pull

                                                            sh
                                                         pu


                            merge request
                                                           reject failed patches
                   commit
Project Management
●   software
    –   Trac, Basecamp, JIRA, (etc, etc)
●   philosophies
    –   Waterfall, Agile (XP, Scrum, Kanban)
* Driven Development
●   Test-driven development (TDD)
    Write an (initially failing) automated test case that defines a
    desired improvement or new function, then produces the minimum
    amount of code to pass that test, and finally refactors the new
    code to acceptable standards.
●   Behaviour-driven development (BDD)
    Behaviour-driven development specifies that tests of any unit of
    software should be specified in terms of the desired behaviour of
    the unit.
DevOps
Developers + Operations (System Administrators)


●
    Culture
●
    Automation
●
    Measurement
●
    Sharing
DevOps Tools
●   Deployment automation
    –   fai, kickstart, preseed, cobbler
●   Configuration management
    –   puppet, chef, cfengine, bcfg2
●   Build automation
    –   jenkins, hudson, maven, ant, cruisecontrol
Start Today, Refine Later Today.
●   Don’t try to change everything at once.
●
    Look for easy things to change and implement
    little bits at a time.
●   Sometimes you need to have short term
    inefficiencies (learning a new tool) to gain long
    term productivity.
●   Don’t let the enemy of progress be perfection.
Let’s Keep In Touch
●   emma@designtotheme.com
●
    @emmajanedotnet
Credits
●   Type face:
    –   Neutra Text by House Industries.
●   Icons:
    –   “Gartoon” icon theme pack for GNOME from
        http://art.gnome.org/themes/icon
    –   http://openclipart.org/user-detail/yyycatch
●
    Diagram ideas:
    –   http://betterexplained.com/articles/a-visual-guide-to-version-control/
    –   http://wiki.bazaar.canonical.com/Workflows

More Related Content

Similar to Work Flow for Solo Developers and Small Teams

Virtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitVirtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profit
Andreas Heim
 
Deployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna MitchellDeployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna Mitchell
dpc
 
Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)
Tomas Doran
 

Similar to Work Flow for Solo Developers and Small Teams (20)

Source Code Management Slides
Source Code Management SlidesSource Code Management Slides
Source Code Management Slides
 
A Tale of Two Workflows - ChefConf 2014
A Tale of Two Workflows - ChefConf 2014A Tale of Two Workflows - ChefConf 2014
A Tale of Two Workflows - ChefConf 2014
 
Clearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad DecisionsClearly, I Have Made Some Bad Decisions
Clearly, I Have Made Some Bad Decisions
 
The Lean Lifecycle in the Cloud
The Lean Lifecycle in the CloudThe Lean Lifecycle in the Cloud
The Lean Lifecycle in the Cloud
 
test
testtest
test
 
Source Control 101
Source Control 101Source Control 101
Source Control 101
 
version controlling in software development
version controlling in software developmentversion controlling in software development
version controlling in software development
 
VersionEEring
VersionEEringVersionEEring
VersionEEring
 
Android Bootstrap
Android BootstrapAndroid Bootstrap
Android Bootstrap
 
Writing Rust Command Line Applications
Writing Rust Command Line ApplicationsWriting Rust Command Line Applications
Writing Rust Command Line Applications
 
Enjoy privacy on Gitlab
Enjoy privacy on GitlabEnjoy privacy on Gitlab
Enjoy privacy on Gitlab
 
Virtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profitVirtualize and automate your development environment for fun and profit
Virtualize and automate your development environment for fun and profit
 
Ruby talk romania
Ruby talk romaniaRuby talk romania
Ruby talk romania
 
Chef, Devops, and You
Chef, Devops, and YouChef, Devops, and You
Chef, Devops, and You
 
Deployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna MitchellDeployment With Subversion - Lorna Mitchell
Deployment With Subversion - Lorna Mitchell
 
You Build It, But How Are You Going to Run It?
You Build It, But How Are You Going to Run It? You Build It, But How Are You Going to Run It?
You Build It, But How Are You Going to Run It?
 
Tested and Correct, How to Make Sure Your Documentation Keeps Working
Tested and Correct, How to Make Sure Your Documentation Keeps WorkingTested and Correct, How to Make Sure Your Documentation Keeps Working
Tested and Correct, How to Make Sure Your Documentation Keeps Working
 
PHP Deployment With SVN
PHP Deployment With SVNPHP Deployment With SVN
PHP Deployment With SVN
 
Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)
 
Ansible top 10 - 2018
Ansible top 10 -  2018Ansible top 10 -  2018
Ansible top 10 - 2018
 

More from Emma Jane Hogbin Westby

Getting a CLUE at the Command Line
Getting a CLUE at the Command LineGetting a CLUE at the Command Line
Getting a CLUE at the Command Line
Emma Jane Hogbin Westby
 
Git Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon PragueGit Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon Prague
Emma Jane Hogbin Westby
 
Was It Something I Said? The Art of Giving (and getting) A Critique
Was It Something I Said? The Art of Giving (and getting) A CritiqueWas It Something I Said? The Art of Giving (and getting) A Critique
Was It Something I Said? The Art of Giving (and getting) A Critique
Emma Jane Hogbin Westby
 
Responsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS ExpoResponsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS Expo
Emma Jane Hogbin Westby
 
Selling Hopes and Dreams - DrupalCamp Toronto
Selling Hopes and Dreams - DrupalCamp TorontoSelling Hopes and Dreams - DrupalCamp Toronto
Selling Hopes and Dreams - DrupalCamp Toronto
Emma Jane Hogbin Westby
 
Forensic Theming - DrupalCon London
Forensic Theming - DrupalCon LondonForensic Theming - DrupalCon London
Forensic Theming - DrupalCon London
Emma Jane Hogbin Westby
 
There's a Module for That, MIMA Summit 2010
There's a Module for That, MIMA Summit 2010There's a Module for That, MIMA Summit 2010
There's a Module for That, MIMA Summit 2010
Emma Jane Hogbin Westby
 

More from Emma Jane Hogbin Westby (20)

Managing a Project the Drupal Way - Drupal Open Days Ireland
Managing a Project the Drupal Way - Drupal Open Days IrelandManaging a Project the Drupal Way - Drupal Open Days Ireland
Managing a Project the Drupal Way - Drupal Open Days Ireland
 
Was it something I said?
Was it something I said?Was it something I said?
Was it something I said?
 
HOWTO Empathy
HOWTO EmpathyHOWTO Empathy
HOWTO Empathy
 
Getting a CLUE at the Command Line
Getting a CLUE at the Command LineGetting a CLUE at the Command Line
Getting a CLUE at the Command Line
 
Lessons From an Unlikely Superhero
Lessons From an Unlikely SuperheroLessons From an Unlikely Superhero
Lessons From an Unlikely Superhero
 
PSD to Theme: The SMACSS Way
PSD to Theme: The SMACSS WayPSD to Theme: The SMACSS Way
PSD to Theme: The SMACSS Way
 
Git Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon PragueGit Makes Me Angry Inside - DrupalCon Prague
Git Makes Me Angry Inside - DrupalCon Prague
 
Git Makes Me Angry Inside
Git Makes Me Angry InsideGit Makes Me Angry Inside
Git Makes Me Angry Inside
 
Was It Something I Said? The Art of Giving (and getting) A Critique
Was It Something I Said? The Art of Giving (and getting) A CritiqueWas It Something I Said? The Art of Giving (and getting) A Critique
Was It Something I Said? The Art of Giving (and getting) A Critique
 
Beyond the Bikeshed
Beyond the BikeshedBeyond the Bikeshed
Beyond the Bikeshed
 
Gamestorming Meets Quiet
Gamestorming Meets QuietGamestorming Meets Quiet
Gamestorming Meets Quiet
 
Git Makes Me Angry Inside
Git Makes Me Angry InsideGit Makes Me Angry Inside
Git Makes Me Angry Inside
 
Evaluating Base Themes
Evaluating Base ThemesEvaluating Base Themes
Evaluating Base Themes
 
Speaker Check-in - 3 - Munich
Speaker Check-in - 3 - MunichSpeaker Check-in - 3 - Munich
Speaker Check-in - 3 - Munich
 
Drupal Flyover, CMS Expo
Drupal Flyover, CMS ExpoDrupal Flyover, CMS Expo
Drupal Flyover, CMS Expo
 
Responsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS ExpoResponsive Web Design for Drupal, CMS Expo
Responsive Web Design for Drupal, CMS Expo
 
Selling Hopes and Dreams - DrupalCamp Toronto
Selling Hopes and Dreams - DrupalCamp TorontoSelling Hopes and Dreams - DrupalCamp Toronto
Selling Hopes and Dreams - DrupalCamp Toronto
 
Forensic Theming - DrupalCon London
Forensic Theming - DrupalCon LondonForensic Theming - DrupalCon London
Forensic Theming - DrupalCon London
 
Forensic Theming for Drupal
Forensic Theming for DrupalForensic Theming for Drupal
Forensic Theming for Drupal
 
There's a Module for That, MIMA Summit 2010
There's a Module for That, MIMA Summit 2010There's a Module for That, MIMA Summit 2010
There's a Module for That, MIMA Summit 2010
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Transforming The New York Times: Empowering Evolution through UX
Transforming The New York Times: Empowering Evolution through UXTransforming The New York Times: Empowering Evolution through UX
Transforming The New York Times: Empowering Evolution through UX
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Server-Driven User Interface (SDUI) at Priceline
Server-Driven User Interface (SDUI) at PricelineServer-Driven User Interface (SDUI) at Priceline
Server-Driven User Interface (SDUI) at Priceline
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 

Work Flow for Solo Developers and Small Teams

  • 1. Work Flow for Solo Developers and Small Teams @emmajanedotnet emma@emmajane.net
  • 2. Today 1. Developer’s Environment (The Command Line) 2. Version Control Basics 3. Developer Tools for Larger Teams
  • 5. The command line is used in many free, online resources.
  • 6. GUIs reveal complexity in different ways. SourceTree, OSX SmartGit, cross-platform
  • 7. $_
  • 8. In the Beginning, Was the Command Line A command-line interface (CLI) is a means of interaction with a computer program where the user (or client) issues commands to a program in the form of successive lines of text (command lines). The command-line interface evolved from a form of dialog once conducted by humans over teleprinter machines, in which human operators remotely exchanged information, usually one line of text at a time. http://en.wikipedia.org/wiki/Command-line_interface
  • 9. Commands Affect Your Environment http://en.wikipedia.org/wiki/Logo_(programming_language)
  • 10. Commands Affect Your Environment http://www.youtube.com/watch?v=LRhbcDzbGSU
  • 11. Command Line Interface http://en.wikipedia.org/wiki/Command_Prompt
  • 12. define:prompt a transitive verb meaning To move to action. ? forward 90 > open mailbox At the command line, you are constantly being asked by the computer, “What action would you like to take next?”
  • 13. Commands (verb) ● One-word actions: – sing – jump – look ● One-word commands: – help – exit – history
  • 14. Commands With Parameters (verb noun) ● An action, and a direct object: – take book – read pamphlet – open window ● Commands with parameters: – cd /var/www – man <command_name> – mv file_current_name.jpg file_new_name.jpg
  • 15. Commands With Modifiers + Parameters (verb adjective noun) ● Refining the request: – go down stairs – take blue pill – open left door ● Adding a flag/switch/modifier: – mkdir -p parent_directory/sub-directory – tar xvf file_to_extract.tar.gz – ls -lh
  • 16. Ten Commands I Use All the Time ls list files cd change the current directory mv move a file to a new location (and/or rename) cp copy a file pwd print working directory (answers: where am I?) rm remove file clear refresh the screen man read the manual page for a specific command tar work with packages of files chmod change the “mode” (aka permissions) of a file or directory
  • 18. Learning the CLI tools makes your knowledge portable. ● OSX and Linux both use the same flavour of command line environment (“the shell”). ● Not all Web server applications have a graphical administrative interface, so learning to use the command line allows you to run server applications in your local developer environment. ● Sequences of commands can be captured as scripts, which you can run on any compatible machine without having to point-and-click.
  • 20. Benefits of Version Control ● Backup and restore ● Syncronization across multiple systems ● Short-term undo to test implications ● Long-term undo to reverse bugs ● Track changes to see why/how software evolved ● Track ownership to give ‘credit’ to change makers ● Sandboxing our code to test changes without affecting others
  • 21. There is no excuse for not having version control. The cheapest way to get version control is to use an automated backup system, like Dropbox, for your code.
  • 22. Terminology ● Repository. The database of changes to your files. ● Server. The computer storing the repository. ● Client. The computer connecting to the repository. ● Working copy. Your local copy, where changes are made. ● Trunk (or “main”). The current, primary source for unchanged code. ● Head. The latest revision in the repository.
  • 23. Basic Actions ● Add. Put a file into the repo. ● Revision. Checks what version a file is on. ● Check out. Download files from the main repository. ● Check in. Upload changed files to the main repository. ● Changelog. A list of changes made to a file since it was created. ● Update/sync. Synchronize your files with the ones from the main repository. ● Revert. Throw away your local changes and reload the latest version from the repository.
  • 24. Workflow: The Solo Developer Create project Add files Do your work Upload files Do more work
  • 25. define:work Basic Check-ins Main Trunk Milk Milk Milk Milk Eggs Eggs Eggs Juice Soup r1 r2 r3 r4
  • 26. Diffs Show the Difference Between Two Versions of a Project Main Trunk Milk Milk Milk Milk Eggs Eggs - Juice Eggs + Eggs + Juice Juice + Soup Soup r1 r2 r3 r4
  • 27. define:work Tagging James’s Final Emma’s Groceries Grocery List Additions Purchased Main Trunk Milk Milk Milk Eggs Eggs Eggs Soup Soup Soup Bread Bread M&Ms r4 r7 r9
  • 28. define:work Milk Branching Eggs Soup Bread St o re M&Ms r9 Ca ndy Main Trunk Milk Milk Eggs Eggs Soup Soup Bread r4 r7
  • 29. Workflow: Read-only Projects “Fork Me” on GitHub Improved yF o rk version of M project ch) (bran Random Project on the Internet
  • 30. Workflow: Partner 1. James starts a grocery list 2. Emma already had a grocery list started. She asks to see James’s list. 3. James remembers a couple more items. 4. Emma adds a few things from her list. 5. The grocery lists are combined and James goes shopping.
  • 31. Collaborative Actions ● Branch. Create a separate copy of a repository for personal use. ● Diff/change/delta. Identifies the differences between two versions of a file. ● Merge/patch. Apply the changes from one version of a file, to another. ● Conflict. When two versions of a file have proposed changes at the same place. ● Resolve. Deciding which version of conflicting changes should be applied, and which should be discarded.
  • 32. Merging Milk Eggs + M&Ms Milk Soup Eggs Soup M&Ms Main Trunk (James’s List) Milk Milk Milk Eggs Eggs Eggs + Bread + M&Ms Soup Soup Soup Bread Bread M&Ms
  • 33. Resolving Conflicts Milk + M&Ms Milk Eggs Eggs Soup Soup M&Ms Main Trunk (James’s List) Milk Milk Milk Eggs + Bread Eggs Eggs + M&Ms Soup - Soup Bread Bread + Bread M&Ms
  • 34. Sample Project http://betterexplained.com/articles/a-visual-guide-to-version-control/
  • 35. Workflow: Centralized no local commits checko ut it comm
  • 36. Workflow: Decentralized with a shared mainline clone ( or ) pull commit push commit
  • 37. Developer Tools for Larger Teams
  • 38. Complicated problems are complicated. ● Bigger code base = more contributors -> formalized code review process ● Bigger projects = more stakeholders -> project management ● Bigger projects = more infrastructure -> devops
  • 39. Formal Code Review Process ● Code should never be released into the wild without having a second set of eyes on it. ● It’s very easy to overengineer your workflow process. ● Make sure you do what’s right, not what’s easy, for your team.
  • 40. Workflow: Decentralized with human gatekeeper clone commit s) d ate (fo r up pull s ng e e cha mer g reject changes request merge commit
  • 41. Workflow: Decentralized with automated gatekeeper clone commit view s) ate request re d (fo r up pull sh pu merge request reject failed patches commit
  • 42. Project Management ● software – Trac, Basecamp, JIRA, (etc, etc) ● philosophies – Waterfall, Agile (XP, Scrum, Kanban)
  • 43. * Driven Development ● Test-driven development (TDD) Write an (initially failing) automated test case that defines a desired improvement or new function, then produces the minimum amount of code to pass that test, and finally refactors the new code to acceptable standards. ● Behaviour-driven development (BDD) Behaviour-driven development specifies that tests of any unit of software should be specified in terms of the desired behaviour of the unit.
  • 44. DevOps Developers + Operations (System Administrators) ● Culture ● Automation ● Measurement ● Sharing
  • 45. DevOps Tools ● Deployment automation – fai, kickstart, preseed, cobbler ● Configuration management – puppet, chef, cfengine, bcfg2 ● Build automation – jenkins, hudson, maven, ant, cruisecontrol
  • 46. Start Today, Refine Later Today. ● Don’t try to change everything at once. ● Look for easy things to change and implement little bits at a time. ● Sometimes you need to have short term inefficiencies (learning a new tool) to gain long term productivity. ● Don’t let the enemy of progress be perfection.
  • 47. Let’s Keep In Touch ● emma@designtotheme.com ● @emmajanedotnet
  • 48. Credits ● Type face: – Neutra Text by House Industries. ● Icons: – “Gartoon” icon theme pack for GNOME from http://art.gnome.org/themes/icon – http://openclipart.org/user-detail/yyycatch ● Diagram ideas: – http://betterexplained.com/articles/a-visual-guide-to-version-control/ – http://wiki.bazaar.canonical.com/Workflows