Download Using Extreme Programming in Practice: Developing DrJava - A Case Study by Charlie Reis and more Study notes Software Engineering in PDF only on Docsity! Using Extreme Programming in Practice: Developing DrJava Charlie Reis CSE 403 Guest Lecture My Background 1998-2002 Undergrad at Rice University 2002-2003 Masters at Rice, Lead DrJava developer 2003-Present UW PhD program (wireless networks, web browser security) 2 DrJava • Pedagogic Java IDE • Simple, interactive, intuitive • Used at dozens of schools around the world • Freely available 5 DrJava Development • Written by students at Rice University • Graduate, Undergraduate • High rate of turnover • Developers use only Extreme Programming • Work in DrJava itself 6 Development Team Professor PhD Student Masters Student Undergrad Undergrad Undergrads Comp 312 7 Project Complexity • Java with generics (e.g., List<String>) • ~400 classes, 50,000 lines of code • Complex • Two JVMs, plus multithreaded GUI • RMI, JDI, Custom Classloaders • Backward compatibility 10 How would you do it? • Context: • Young project, quickly maturing • Small team (3 to 15), high turnover • Vocal customers (other schools) • Source code available to world 11 Extreme Programming / Agile Methods 12 1. Unit Tests / Test First /** * Regression test for braces. */ public void testIndentBraces() { String text = "{\n" + "class Foo\n" + "extends F {\n" + "int i; \n" + "}\n" + "}\n"; String indented = "{\n" + " class Foo\n" + // After open brace " extends F {\n" + // Not new statement " int i; \n" + // After open brace " }\n" + // Close brace "}\n"; doc.insertString(0, text, null); _assertContents(text, doc); doc.indentLines(0, doc.getLength()); _assertContents(indented, doc); } Monitor Test Coverage Online 15 ...for DrJava 2. Pair Programming • Two people coding at one machine • “Isn’t that a waste of effort?” • Knowledge transfer • Higher quality code • Stay on task 16 2. Pair Programming • Getting up to speed • New DrJava developers paired with old • Course projects • Student pairs in Comp 312 17 ...for DrJava 4. Incremental Development • Release early and often! • Evolve in manageable amounts • Keep product stable and usable • React quickly to feedback 20 4. Incremental Development • Small changes (with tests) • Development releases • Frequent, for new features and bug fixes • Stable releases • Periodically, after a short beta period 21 ...for DrJava 5. Onsite Customer • Important to work alongside customer • Constant feedback on desired features • No surprises when product delivered 22 Typical Dev Activity • Prioritize bug reports • Write test to exhibit bug • Pair program to fix bug • "Commit" (update, compile, test, commit) • Release 25 Releases • Theory: repository can always be released • Practice: not exactly... • Development releases (weekly/monthly) • Stable releases (a few each year) 26 Life Cycle • Peak development in spring and summer (Comp 312, summer interns) • 3-4 large features, many small fixes • Masters Theses • Maintenance in "off-season" 27 Closing Thoughts • XP / Agile Methods can help a project mature quickly • Can maintain high quality as project changes • Very satisfying to work on a project with real users 30 More Info
e http://drjava.org
e http://www.cs.washington.edu/homes/creis/
@ creis@cs.washington.edu
cH