$30 off During Our Annual Pro Sale. View Details »

CSC309 Lecture 13

CSC309 Lecture 13

Software Engineering II
Pair Programming
(202305)

Javier Gonzalez-Sanchez
PRO

February 09, 2023
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs
    CSC 309
    Software Engineering II
    Lecture 13:
    Pair Programming
    Dr. Javier Gonzalez-Sanchez
    [email protected]
    www.javiergs.com
    Building 14 -227
    Office Hours: By appointment

    View Slide

  2. jgs
    Previously …

    View Slide

  3. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 3
    Tool

    View Slide

  4. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 4
    Maven Directories
    A build automation tool used

    View Slide

  5. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 5
    Options

    org.jfree
    jfreechart
    1.5.3

    View Slide

  6. jgs
    Pair Programming
    Reference:
    On Pair Programming by Martin Fowler (Agile, Architecture, Refactoring)
    https://martinfowler.com/articles/on-pair-programming.html

    View Slide

  7. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 7
    § Best programs and designs are done in pairs because you can
    criticize each other, find each other’s errors, and use the best ideas.
    - Jean Bartik (one of the very first programmers)
    § Write all production programs with two people sitting at one machine.
    - Kent Beck (Agile, JUnit)
    Pair Programming

    View Slide

  8. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 8
    § The process starts with the developers receiving a well-defined task.
    § They agree on one small goal at a time.
    § They take turns to code or review each other's work.
    § Rotating roles regularly helps keep both developers alert and engaged.
    § Enable senior developers to share their knowledge and working habits
    § Help new team members get up to speed on a project.
    Process

    View Slide

  9. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 9
    § Driver (the person on the keyboard). Focused on completing the tiny goal at
    hand, ignoring larger issues for the moment. A driver should always talk
    through what they are doing while doing it.
    § Navigator (the person observing). They review the code on the go, gives
    directions, and shares thoughts. They have an eye on the larger issues, and
    bugs, and make notes of potential next steps or obstacles. They are in
    control of the strategic or architectural elements. As a navigator, leave the
    details of the coding to the driver – your job is to take a step back and
    complement the driver’s tactical mode with medium-term thinking.
    Roles

    View Slide

  10. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 10
    • Equally engaging pairs. If both developers do not equally engage in the
    project, then there is less chance that knowledge will be shared
    • Social and interactive process. It is hard for those who work better alone.
    Problem

    View Slide

  11. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 12
    • Consistent communication
    • Switch roles
    • Pair up carefully (select your pair).
    • A familiar development environment
    • Work at a pace that fits both developers.
    So, best practices

    View Slide

  12. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 13
    Let’s Work

    View Slide

  13. jgs
    Test Yourselves

    View Slide

  14. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 15
    Project – User selects Cluster and clicks Run

    View Slide

  15. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 16
    Issues

    nz.ac.waikato.cms.weka
    weka-stable
    3.8.0

    View Slide

  16. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 17
    Code

    View Slide

  17. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 18
    Code

    View Slide

  18. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 19
    Code

    View Slide

  19. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 20
    Issues
    https://github.com/javiergs/Temporal/blob/main/Main.java

    View Slide

  20. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 21
    Questions

    View Slide

  21. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 22
    Office Hours
    Tuesday and Thursday 3 - 5 pm
    But an appointment required
    Sent me an email – [email protected]

    View Slide

  22. jgs

    View Slide

  23. jgs
    CSC 309
    Software Engineering II
    Lab 13:
    Pair Programming
    Dr. Javier Gonzalez-Sanchez
    [email protected]
    www.javiergs.com
    Building 14 -227
    Office Hours: By appointment

    View Slide

  24. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 25
    Think about this
    1. Select your pair
    2. Understand the task
    (described before)
    3. Chose and set up your
    environment
    4. Be ready to work

    View Slide

  25. jgs
    Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 26
    Project – User selects Cluster and clicks Run

    View Slide

  26. jgs
    CSC 309 Software Engineering II
    Javier Gonzalez-Sanchez, Ph.D.
    [email protected]
    Winter 2023
    Copyright. These slides can only be used as study material for the class CSC308 at Cal Poly.
    They cannot be distributed or used for another purpose.

    View Slide