Continuous improvement.

Slides:



Advertisements
Similar presentations
Iteration Planning.
Advertisements

Walter Bodwell Planigle. An Introduction – Walter Bodwell First did agile at a startup in 1999 Got acquired by BMC in 2000 and spent the next 8 years.
Test-First Programming. The tests should drive you to write the code, the reason you write code is to get a test to succeed, and you should only write.
… with apologies to those who already know all this. Tips for Teaching On-Line How to Succeed With FRED Barriers to Student Learning in an On-Line Environment.
Extreme Programming Alexander Kanavin Lappeenranta University of Technology.
Schedule and Effort. Planning Big Project: Waterfall-ish Style 1.Figure out what the project entails Requirements, architecture, design 2.Figure out dependencies.
A practical guide John E. Boal TestDrivenDeveloper.com.
Framework is l Reusable Code, often domain specific (GUI, Net, Web, etc) l expressed as l a set of classes and l the way objects in those classes collaborate.
Agile Planning. The problem with documentation Argument: “Heavy” documentation too much for most business-style projects.
Customer Collaboration. Central Principles The customer is part of the team The customer plays key role in directing the team 1.
Week 9: Methods 1.  We have written lots of code so far  It has all been inside of the main() method  What about a big program?  The main() method.
Individuals and interactions
Continuous improvement.
Individuals and interactions
Introduction to Refactoring Excerpted from ‘What is Refactoring?’ by William C. Wake and Refactoring: Improving the Design of Existing Code by Martin Fowler.
Computer Engineering 203 R Smith Agile Development 1/ Agile Methods What are Agile Methods? – Extreme Programming is the best known example – SCRUM.
Experimental Control & Design Psych 231: Research Methods in Psychology.
Applied Software Project Management 1 Introduction Dr. Mengxia Zhu Computer Science Department Southern Illinois University Carbondale.
Software Development Overview CPSC 315 – Programming Studio Spring 2008.
Customer collaboration.
1 Design and Integration: Part 1 Nuggets about Design vs Project Management.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Carolyn Seaman University of Maryland, Baltimore County.
Dr. Tom WayCSC Software Processes CSC 4700 Software Engineering.
Object Oriented Analysis and Design Introduction.
Agile and XP Development Dan Fleck 2008 Dan Fleck 2008.
Click here to add text Click here to add text. Presentation Skills Presentation Skills are a set of skills focused around interpersonal and communication.
Experiment Basics: Variables Psych 231: Research Methods in Psychology.
Understand Application Lifecycle Management
Schedule & effort.
Coming up: What is Agile? XP Development Dan Fleck 2010 Dan Fleck 2010.
5. Planning.
Refactoring Improving the structure of existing code Refactoring1.
Rapid software development 1. Topics covered Agile methods Extreme programming Rapid application development Software prototyping 2.
Extreme Programming (XP). Agile Software Development Paradigm Values individuals and interactions over processes and tools. Values working software over.
AP-1 5. Project Management. AP-2 Software Failure Software fails at a significant rate What is failure? Not delivering it on time is an estimation failure.
1 김 수 동 Dept. of Computer Science Soongsil University Tel Fax
Sofia Bulgaria Summer School IST eXPERT: Best Practice on e-Project Development 30 June - 2 July 2003 eXtreme programming.
Software Engineering Chapter 3 CPSC Pascal Brent M. Dingle Texas A&M University.
Today’s lecture Acceptance tests Review of unit tests Pair programming Models and communication Continuous improvement.
Refactoring1 Improving the structure of existing code.
1 Design and Integration: Part 2. 2 Plus Delta Feedback Reading and lecture repeat Ambiguous questions on quizzes Attendance quizzes Boring white lecture.
Individuals and interactions
Software Engineering CS3003 Lecture 4 Code bad smells and refactoring.
Chapter 7 The Practices: dX. 2 Outline Iterative Development Iterative Development Planning Planning Organizing the Iterations into Management Phases.
Extreme Programming (XP) XP is an agile methodology: –aims to be responsive to change Theme running through XP is the importance of communication –amongst.
AP-1 4. Agile Processes. AP-2 Agile Processes Focus on creating a working system Different attitude on measuring progress XP Scrum.
Coaching Pack 9 – 11 Years. What Am I Coaching Today? What Might the Players Learn or Get Better at? TechnicalPsychological example PhysicalSocial example.
Extreme Programming Based on and
Refactoring - 1 CS494: Intro. to Refactoring Readings: –Refactoring for everyone: How and why to use Eclipse's automated refactoring features. By David.
Extreme programming (XP) Variant of agile Takes commonsense practices to extreme levels © 2012 by Václav Rajlich1.
Extreme Programming. Extreme Programming (XP) Formulated in 1999 by Kent Beck, Ward Cunningham and Ron Jeffries Agile software development methodology.
Refactoring1 Improving the structure of existing code.
The Last Lecture CS 5010 Program Design Paradigms "Bootcamp" Lesson © Mitchell Wand, This work is licensed under a Creative Commons Attribution-NonCommercial.
Interactions. The prey, the pack, and the hunt Your goal is to meet your customer’s needs That goal, and nothing else, is the prey Not throwaway prototypes.
Continuous Improvement. Start Simple and Continually Improve E.g., Gmail Labels 1.
CS223: Software Engineering Lecture 18: The XP. Recap Introduction to Agile Methodology Customer centric approach Issues of Agile methodology Where to.
Coming up: What is Agile? XP Development Dan Fleck 2010 Dan Fleck 2010.
TDD Unit tests from a slightly different point of view Katie Dwyer.
AP CSP: Cleaning Data & Creating Summary Tables
C++ coding standard suggestion… Separate reasoning from action, in every block. Hi, this talk is to suggest a rule (or guideline) to simplify C++ code.
Part III – Gathering Data
Continuous improvement
Etrics XP Metrics.
Improving the structure of existing code
Coming up: What is Agile?
Refactoring.
Agile Development – a new way of software development?
Agile software development
Software Development Overview
This is a template for a presentation that you can use to introduce your team to Harvest. You can customize the content of the slides. You’ll want to pay.
Presentation transcript:

Continuous improvement

Start simple and continually improve Example of Gmail labels

Start simple and continually improve YAGNI (“You aren’t going to need it”) – “A design which doesn't meet business needs is bad, no matter how pretty.” Don’t add functionality until it’s needed – “If software is what you want to deliver then measure progress by how much you have working right now, not by how fancy the design is.”

Rules of the simplest design (with precedence) The system (code and tests together) must communicate everything you want to communicate. The system must contain no duplicate code. The system should have the fewest possible classes. The system should have the fewest possible methods/functions.

Refactoring What it is: A program transformation that improve code’s organization, not its function. Examples: – Renaming variables or methods – Gathering duplicated code into a method – Splitting long methods into two methods When to do it: When code starts to “smell”

Benefits of refactoring Improves maintainability. Improves reusability. “Prepares” the code for new functionality. Lets you tidy up existing code by introducing design patterns. Lets you separate functionality from form, allowing you to focus on one or the other at a time.

Bad smell: Long methods Sometimes you have a method that tries to do lots of different things. – Remember, code should have concerns! – This applies to methods, too. – Usually, >= 1 screen of code is too much. Most common way of refactoring: 1.Split the method into smaller methods. 2.Call each method.

Bad smell: duplicate code Sometimes you have a few lines of code that appear in many different places – Often happens during copy-and-paste coding! – Usually, >= 3 duplicates are too many. Most common way of refactoring: 1.Create a new method (and/or new class) 2.Move the duplicated code into the new method 3.Call the new method from each old place

Bad smell: Large classes Sometimes you have a class that tries to do too many things. – Usually, >= 7 member variables and/or >= 50 methods is too many. Most common way of refactoring: 1.Pick the appropriate design pattern. 2.Break the class into pieces, using the pattern. 3.Fix up the code.

Bad smell: Long parameter lists Sometimes your method has a parameter list as long as your arm. – How is somebody supposed to remember what parameters to pass into the method??? Most common way of refactoring: 1.Organize some/all of the parameters together into a hierarchy, using the composite pattern. 2.Pass an instance of the composite, rather than a list of individual primitive values. 3.Consider moving methods into the class, too!

A few more refactorings Rename Delete unused method Move Introduce factory Change signature…. – Modifies visibility, return types and/or parameters

How to do a refactoring right You absolutely have to have a working unit test suite. – No refactoring allowed until you’re passing all your unit tests Then, when you get a whiff of a bad smell, talk with your pair programmer about it Try out the refactoring idea Run the unit test Iterate until you like the code & all unit tests pass

Refactoring early, refactor often If it takes you too long to refactor than you are not refactoring enough. – Many tiny refactorings are easier than a single enormous refactorings. – Each refactoring makes it easier to identify opportunities for further refactorings.

Be alert for opportunities Refactor when… – A new feature seems too difficult to code – You just created a new feature, and the code will be too hard for somebody else to understand – You “can’t stand to look at your own code” – You can’t stand to look at your teammate’s code!! REMEMBER: It’s not your code, it’s your team’s.

Unit tests are your safety net “When the test suite stops working (‘turns red’), it is unsafe to move forward.” “You might be driving, and then your copilot gets an idea to refactor, so you switch and he codes the changes, and then runs the test suite and voila, it works.”

Shifting focus: improving yourself Focus so far: the code and the design Shifting focus to you: improving your team

Use the past to predict the future Once you have done a lot of software projects – You (theoretically) can have a lot of data about the past – Very little is completely new to you If the future is like the past, then you can use the past to predict the future.

Key assumptions The future will be like the past You are reflective enough to pay attention to yourself and what you’re doing. – Not all people are so aware of themselves You are disciplined enough to take the time to precisely record and use data – And evaluate if your predictions are coming true

Example Joe & Ted are pair programmers They have implemented 4 web apps How long should a 30 a.p. web app take? Web app# application pointsMonths required Balloon sales site102 Balloon rides site104 Insurance sales site206 Find-a-lawyer site103

Personal Software Process PSP is one way of collecting and using data Agile does not prescribe any particular method for doing this – But whatever method is selected, it should be simple and not very time consuming

Tips for recording data Keep a notebook, spreadsheet, or other software with you anytime you code Get in the habit of recording start/stop info Bugzilla If you forget to make a record, then write down an estimate as soon as you remember At the end of the day, summarize data – And send an to your team if you’re falling way far behind

Using the data For making estimates – After you receive user stories from the customer, and you’re dividing user stories into tasks, refer to your data about similar tasks. For refining estimates – Just before you release code to your customer, and you’re talking with your team about how the iteration went, refer to your data to refine estimates of how long the next tasks will take.

Other opportunities for improving your team At the end of an iteration, discuss… – What interesting coding techniques did you discover? – What new IDE features did you find? – What key problems did you encounter? – Is one of your teammates really really good (or bad) at something? Use this information for setting up future pairings.

Opportunities for improving yourself Code something outside your comfort zone Online tutorials Books Mentors User groups and other clubs Conferences and workshops Programming competitions Getting involved in research

Helpful books Design Patterns by Gamma et al. The Unified Modeling Language User Guide by Booch et al. Problem Frames by Jackson Algorithms by Cormen et al. Contextual Inquiry by Beyer and Holtzblatt

What’s next for you? Finish up HW 6 – Gather some data Think back over this week and make estimates of how long your tasks are taking And as you do new tasks, collect some data – Keep your eyes open for refactoring Prepare for team presentations