Continuous improvement

Slides:



Advertisements
Similar presentations
… 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.
Advertisements

Extreme Programming Alexander Kanavin Lappeenranta University of Technology.
An Introduction to eXtreme Programming Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
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.
Individuals and interactions
Continuous improvement.
Introduction to Refactoring Excerpted from ‘What is Refactoring?’ by William C. Wake and Refactoring: Improving the Design of Existing Code by Martin Fowler.
Jul The New Geant4 License J. Perl The New Geant4 License Makes clear the user’s wide- ranging freedom to use, extend or redistribute Geant4, even.
STATUS UPDATE EM SUBCOMMITTEE Friedrich Roth, EM subcommittee chairman SEG 2012, Las Vegas Technical Standards Committee meeting.
Using HTML/JavaScript/AJAX in Workflow Presented by: Mike Gostomski & Alison Nimura Portland State University March 21, 2011 Session ID 3742.
X3D Graphics for Web Authors X3D-Edit Update SIGGRAPH 2008 Don Brutzman Naval Postgraduate School Monterey California USA.
CS 350 – Software Design The Object Paradigm – Chapter 1 If you were tasked to write code to access a description of shapes that were stored in a database.
17-1 JXTA Developer and Business Resources Module Objectives ● Understand JXTA's Open Source Model ● Learn how to get involved at jxta.org ● Learn.
Blue Diamond Scott Auge Amduus Information Works, Inc.
Andrew McNab - License issues - 10 Apr 2002 License issues for EU DataGrid (on behalf of Anders Wannanen) Andrew McNab, University of Manchester
Refactoring Improving the structure of existing code Refactoring1.
Rapid software development 1. Topics covered Agile methods Extreme programming Rapid application development Software prototyping 2.
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.
International Telecommunication Union New Delhi, India, December 2011 ITU Workshop on Standards and Intellectual Property Rights (IPR) Issues Philip.
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.
AP-1 4. Agile Processes. AP-2 Agile Processes Focus on creating a working system Different attitude on measuring progress XP Scrum.
National Alliance for Medical Image Computing Licensing in NAMIC 3 requirements from NCBC RFA (paraphrased)
Legal Disclaimers Accuracy Every effort is made to provide information that is accurate. However any information contained in this website or the “article.
SEG 4110 – Advanced Software Design and Reengineering Topic T Introduction to Refactoring.
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.
Continuous Improvement. Start Simple and Continually Improve E.g., Gmail Labels 1.
The secure site rendering issue (all navigation crushed together as a list at the top of the page) is a compatibility issue with Internet Explorer only.
Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Oracle Proprietary and Confidential. 1.
TDD Unit tests from a slightly different point of view Katie Dwyer.
Schedule & effort
AP CSP: Data Assumptions & Good and Bad Data Visualizations
GO! with Microsoft Office 2016
Sample Wiki Comments?.
To synchronize subtitles in linear time!
Evaluating Requirements
Strategic Initiatives for Implementing Competitive Advantage
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.
Evaluating Architectures
GO! with Microsoft Access 2016
CS 641 – Requirements Engineering
Extreme Programming.
Agile
The Need for Algorithms 2 days
Comparative Law of Licenses and Contracts in the US, UK and EU
Taking an Iteration Down to Code
HAPPY NEW YEAR! Lesson 7: If-statements unplugged
Improving the structure of existing code
Coming up: What is Agile?
Refactoring.
Diagram Notations
Design Patterns
Software Architecture
Individuals and interactions
Customer collaboration
Agile Development – a new way of software development?
Extreme Programming.
Requirements
Agile software development
BEMS user Manual Fundación cartif.
Refactoring.
Extreme Programming (and Pair Programming)
2019 MEDICARE AGE-IN STUDY SENIOR MARKET INSIGHTS SERVICE Part IV
Presentation transcript:

Continuous improvement http://www.flickr.com/photos/ajagendorf25/1076632419/sizes/l/

Start simple and continually improve Example of Gmail labels http://googleblog.blogspot.com/2009/07/evolution-of-gmail-labels.html

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.” “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.

Identifying the simplest design may take effort Which is simpler, accessing a constructor directly or going through a Factory pattern? Depends on the situation! If you get an idea like this while writing code, talk it over with your programming partner.

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: Split the method into smaller methods. 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: Create a new method (and/or new class) Move the duplicated code into the new method 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: Pick the appropriate design pattern. Break the class into pieces, using the pattern. 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: Organize some/all of the parameters together into a hierarchy, using the composite pattern. Pass an instance of the composite, rather than a list of individual primitive values. Consider moving methods into the class, too!

A few more refactorings Rename Delete unused method Move Introduce factory Extract interface….

Ideal refactoring Ideally you 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 points Months required Balloon sales site 10 2 Balloon rides site 4 Insurance sales site 20 6 Find-a-lawyer site 3

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

http://web.engr.oregonstate.edu/~cscaffid/storage/psp.pdf

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 email to your team if you’re falling way far behind

Using the data For making estimates For refining 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 Online tutorials Books Mentors User groups and other clubs Conferences and workshops Programming competitions Volunteer gigs Getting involved in research

Helpful online resources Web- and database-related stuff http://www.dynamicdrive.com/ http://www.w3schools.com/ http://dev.mysql.com/doc/ Microsoft stuff http://msdn.microsoft.com/

Helpful books Design Patterns by Gamma et al. Refactoring: … by Fowler and Beck The Unified Modeling Language User Guide by Booch et al. Algorithms by Cormen et al. Design of Everyday Things by Norman Bugs in Writing by Dupre Also: Problem Frames by Michael Jackson (no, not that one) Contextual Design

What’s next for you? Wrap up this week’s implementation. 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 opportunities

Copyright (c) Christopher Scaffidi 2009 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of Oregon State University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Modified by Scott D. Fleming <Scott.Fleming@memphis.edu> 2011.