Several agile methods exist. Extreme Programming focuses on engineering practices, and Scrum focuses on managing the work.

Extreme Programming (XP)

Extreme Programming takes good practices to an extreme. Its values are communication, simplicity, feedback, courage and respect. Requirements are written as user stories. Key practices are pair programming, where two programmers work at one computer, test-driven development, where tests are written before the code, continuous integration of code several times a day, refactoring to improve the code without changing behaviour, small releases, collective code ownership, and a sustainable pace without long overtime. A customer is part of the team.

Definition: Extreme Programming. An agile method that uses practices such as user stories, pair programming, test-driven development and continuous integration to deliver quality software in small releases.

Scrum

Scrum is a framework for managing the work in fixed-length iterations called sprints, usually of two to four weeks. There are three roles. The Product Owner represents the customer and orders the product backlog, the list of wanted features. The Scrum Master helps the team follow Scrum and removes obstacles. The Development Team builds the product. The events are sprint planning, the daily scrum of fifteen minutes, the sprint review with the customer, and the sprint retrospective to improve the process. Each sprint produces a potentially shippable increment.

A Tool Set for the Agile Process

Agile teams use tools to support collaboration and quality. These include task boards such as Jira and Trello for backlogs and sprints, version control such as Git, continuous integration servers such as Jenkins, automated testing frameworks such as JUnit and Selenium, and communication tools for chat and video. Tools help, but the agile mindset of people and collaboration remains the main factor.

Table 1.6: Roles and events in Scrum

Element Description Duration
Product Owner Orders the product backlog Whole project
Scrum Master Coaches the team Whole project
Sprint Fixed iteration 2 to 4 weeks
Daily scrum Status meeting 15 minutes
Sprint review Demo to the customer End of sprint

Example 1.6: Planning a sprint

Problem: A team has 4 members, a 2-week sprint of 10 working days and can spend 6 productive hours per person per day. A story needs 36 hours. How many such stories fit in the sprint?

Solution:

  1. Capacity = 4 × 10 × 6 = 240 hours.
  2. Stories that fit = 240 / 36 = 6.67, so 6 whole stories.

Result: The team can commit to 6 stories in the sprint.

people, days, hours, story = 4, 10, 6, 36
capacity = people * days * hours
print(capacity, capacity // story, round(capacity / story, 2))

Output

240 6 6.67

Common mistakes

  • Treating the Scrum Master as a manager who gives orders.
  • Changing the sprint scope after the sprint has started.
  • Thinking that pair programming wastes effort, when it reduces defects.

Key takeaways

  • XP practices include pair programming, test-driven development and refactoring.
  • Scrum works in sprints of 2 to 4 weeks.
  • The roles are Product Owner, Scrum Master and Development Team.
  • The product backlog is a prioritised list of features.

Practice questions

  1. What is a sprint?
  2. What is pair programming?
  3. Who orders the product backlog?

Answers to the practice questions

  1. A fixed-length iteration, usually two to four weeks, that produces a working increment.
  2. Two programmers working together at one computer.
  3. The Product Owner.

Sources

  • Official BCA syllabus Software Engineering, course code 26BCA403DS03, Unit I