Todays goals eXtreme Programming What is XP? When - - PDF document

today s goals extreme programming
SMART_READER_LITE
LIVE PREVIEW

Todays goals eXtreme Programming What is XP? When - - PDF document

1/27/15 Todays goals eXtreme Programming What is XP? When should I (not) use XP? HW 2 Three phases: integra,on code reviews tes,ng design


slide-1
SLIDE 1

1/27/15 ¡ 1 ¡

eXtreme ¡Programming ¡

code ¡reviews ¡ tes,ng ¡ design ¡ simplicity ¡ integra,on ¡

Today’s ¡goals ¡

  • What ¡is ¡XP? ¡
  • When ¡should ¡I ¡(not) ¡use ¡XP? ¡
  • HW 2 Three phases:

– submission (Jan 23rd), – grade others (Jan 29th), – peer reviews (review the reviewer Feb 1st)

CS361 3-3

http://xkcd.com/844/

Waterfall ¡development ¡process ¡

CS361 3-5

Implement ¡

  • ne ¡piece ¡

Refactor ¡ Break ¡into ¡ pieces ¡

Good code? Yes Any More? no Yes

Start ¡project ¡

XP way

slide-2
SLIDE 2

1/27/15 ¡ 2 ¡

SoHware ¡development ¡processes ¡

  • Many ¡ways ¡to ¡develop ¡soHware ¡

– Plan-­‑driven ¡/ ¡agile ¡ – Centralized ¡/ ¡distributed ¡ – High ¡math ¡/ ¡low ¡math ¡ – Close ¡interacPon ¡with ¡customers ¡/ ¡liQle ¡ interacPon ¡ – Much ¡tesPng ¡/ ¡liQle ¡tesPng ¡ – Organize ¡by ¡architecture ¡/ ¡organize ¡by ¡features ¡

  • hQp://agilemanifesto.org/ ¡

eXtreme ¡Programming ¡

Kent ¡Beck ¡

Roles ¡in ¡XP ¡

  • Main ¡roles ¡

– Customer ¡ – Programmer ¡

  • Secondary ¡roles ¡

– Coach ¡ – Boss ¡ – Quality ¡assurance ¡

slide-3
SLIDE 3

1/27/15 ¡ 3 ¡

Big ¡ideas ¡in ¡XP ¡

  • Don’t ¡write ¡much ¡documentaPon. ¡ ¡ ¡
  • Implement ¡features ¡one ¡by ¡one, ¡ ¡
  • Releasing ¡working ¡code ¡frequently, ¡ ¡
  • working ¡closely ¡with ¡customer. ¡ ¡ ¡
  • Team ¡talks ¡a ¡lot ¡with ¡each ¡other, ¡the ¡main ¡

wriQen ¡product ¡is ¡working ¡code. ¡

IteraPon ¡

  • Two ¡week ¡cycle ¡
  • Plan ¡each ¡iteraPon ¡in ¡an ¡iteraPon ¡meePng ¡

that ¡is ¡held ¡at ¡the ¡start. ¡

  • IteraPon ¡is ¡going ¡to ¡implement ¡set ¡of ¡user ¡
  • stories. ¡
  • Divide ¡work ¡into ¡tasks ¡small ¡enough ¡to ¡finish ¡

in ¡a ¡day. ¡

  • Each ¡day, ¡programmers ¡work ¡in ¡pairs ¡to ¡finish ¡
  • tasks. ¡

Working ¡soHware ¡

  • All ¡soHware ¡has ¡automated ¡tests ¡(unit ¡tests) ¡
  • All ¡tests ¡work, ¡all ¡the ¡Pme. ¡ ¡(Never ¡check ¡in ¡

broken ¡code). ¡

  • How ¡to ¡work ¡on ¡a ¡task ¡

– Get ¡latest ¡version ¡of ¡the ¡code. ¡ ¡All ¡tests ¡work. ¡ – Write ¡test. ¡ ¡It ¡fails. ¡ – Write ¡code ¡to ¡make ¡test ¡work. ¡ ¡Now ¡all ¡tests ¡work. ¡ – Refactor ¡(clean ¡up) ¡ – Check ¡in ¡your ¡code ¡

Requirements ¡in ¡XP: ¡Planning ¡Game ¡

  • Customer ¡writes ¡user ¡stories ¡
  • Customer ¡interprets ¡ ¡
  • Programmers ¡esPmate ¡Pme ¡to ¡do ¡each ¡story ¡
  • If ¡story ¡is ¡too ¡big, ¡customer ¡splits ¡it ¡ ¡
  • Customer ¡chooses ¡stories ¡to ¡match ¡project ¡

velocity ¡

  • Project ¡velocity ¡is ¡amount ¡of ¡work ¡done ¡last ¡

iteraPon ¡

Planning ¡

  • Programmers ¡only ¡worry ¡about ¡one ¡iteraPon ¡

at ¡a ¡Pme ¡

  • Customer ¡can ¡plan ¡as ¡many ¡iteraPons ¡as ¡

desired, ¡but ¡can ¡change ¡future ¡iteraPons ¡ ¡

slide-4
SLIDE 4

1/27/15 ¡ 4 ¡

Simplicity ¡

  • Add ¡one ¡feature ¡(user ¡story) ¡at ¡a ¡Pme. ¡
  • Don’t ¡worry ¡about ¡future ¡stories. ¡
  • Make ¡program ¡as ¡simple ¡as ¡possible ¡
  • The ¡simplest ¡thing ¡that ¡could ¡possibly ¡work ¡

Unit ¡tests ¡and ¡refactoring ¡

  • Because ¡code ¡is ¡as ¡simple ¡as ¡it ¡can ¡be, ¡adding ¡

a ¡new ¡feature ¡tends ¡to ¡make ¡it ¡less ¡simple. ¡

  • To ¡recover ¡simplicity, ¡you ¡must ¡refactor ¡the ¡

code ¡

  • To ¡refactor ¡safely, ¡you ¡should ¡have ¡a ¡rigorous ¡

set ¡of ¡unit ¡tests. ¡

Miscelaneous ¡

  • ConPnuous ¡integraPon ¡
  • Spike ¡
  • Acceptance ¡tests ¡vs. ¡unit ¡tests ¡
  • IteraPon ¡planning ¡meePng ¡vs. ¡daily ¡standup ¡

meePng ¡

XP ¡works ¡best ¡when ¡

  • Smart ¡customer ¡
  • Small ¡team ¡
  • People ¡who ¡like ¡to ¡talk ¡
  • All ¡in ¡one ¡room ¡(including ¡customer) ¡
  • Changing ¡requirements ¡

XP ¡criPcism ¡

  • “Pair-­‑programming ¡is ¡a ¡waste ¡of ¡resources” ¡

– Lots ¡of ¡research ¡published ¡by ¡Laurie ¡Williams ¡from ¡ NCSU ¡on ¡pair-­‑programming ¡producPvity ¡and ¡quality ¡ ¡

  • Not ¡scalable ¡
  • Risk ¡of ¡scope ¡creep ¡due ¡to ¡lack ¡of ¡requirements ¡

documentaPon ¡

  • Non-­‑funcPonal ¡requirements ¡are ¡hard ¡to ¡fit ¡into ¡

user ¡stories ¡

2-­‑24 ¡

Best ¡pair-­‑programming ¡partner ¡

  • Similar ¡

– CompaPble ¡schedules, ¡working ¡style ¡ – Feeling ¡of ¡partnership ¡and ¡equality ¡[D. ¡Dig ¡– ¡PLoP’2004] ¡ – Efficient ¡communicaPon ¡

  • Not ¡too ¡similar ¡

– Different ¡skills ¡useful ¡at ¡different ¡Pmes ¡ – Promotes ¡creaPvity ¡

slide-5
SLIDE 5

1/27/15 ¡ 5 ¡

Class ¡acPvity ¡

  • Discuss ¡which ¡of ¡the ¡XP ¡pracPces ¡might ¡pose ¡challenges ¡

for ¡your ¡project ¡and ¡how ¡to ¡deal ¡with ¡them ¡ ¡

  • ­‑ ¡Pair ¡Programming, ¡TDD, ¡ConPnuous ¡IntegraPon, ¡On-­‑site ¡

Customer, ¡Refactoring, ¡Planning ¡game, ¡Small ¡releases, ¡ CollecPve ¡code ¡ownership, ¡Simple ¡design, ¡System ¡ metaphor, ¡Sustainable ¡pace ¡

Next ¡Pme ¡

  • UML ¡Class ¡and ¡Sequence ¡diagrams ¡
  • Read ¡chapters ¡3-­‑4 ¡from ¡UML ¡DisPlled ¡