Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSC309 Lecture 13

CSC309 Lecture 13

Software Engineering II
Pair Programming
(202305)

Javier Gonzalez-Sanchez

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
  2. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

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

    5 Options <dependency> <groupId>org.jfree</groupId> <artifactId>jfreechart</artifactId> <version>1.5.3</version> </dependency>
  4. jgs Pair Programming Reference: On Pair Programming by Martin Fowler

    (Agile, Architecture, Refactoring) https://martinfowler.com/articles/on-pair-programming.html
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

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

    16 Issues <dependency> <groupId>nz.ac.waikato.cms.weka</groupId> <artifactId>weka-stable</artifactId> <version>3.8.0</version> </dependency>
  12. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    20 Issues https://github.com/javiergs/Temporal/blob/main/Main.java
  13. 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]
  14. jgs

  15. 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
  16. 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
  17. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    26 Project – User selects Cluster and clicks Run ✅
  18. 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.