Important concepts in software engineering The tools to make it “easy to apply common sense”!

Slides:



Advertisements
Similar presentations
Time Management.
Advertisements

How to Succeed in Mathematics WOU Mathematics Department
Software Engineering Lab Session Session 1 – Introduction to the practicum © Jorge Aranda, 2005.
Gallup Q12 Definitions Notes to Managers
Welcome to English Mrs. Paget
“What do you want me to do now?”
Definition Time management is the process of controlling your life through your use of the 24 hours that you have in a day. Time management helps.
Time Management Skills and Defeating Procrastination Workshop Presented By The New Student Advisement and Retention Services (STARS) center.
S.T.A.I.R.. General problem solving strategy that can be applied to a range problems.
Computer Engineering 203 R Smith Project Tracking 12/ Project Tracking Why do we want to track a project? What is the projects MOV? – Why is tracking.
Software Engineering Lab Session Session 4 – Feedback on Assignment 1 © Jorge Aranda, 2005.
Maths Workshop. Aims of the Workshop To raise standards in maths by working closely with parents. To raise standards in maths by working closely with.
Important concepts in software engineering The tools to make it easy to apply common sense!
The Software Process Strategy The Software Process Strategy Part III.
Managing Time How much time do you have? How are you going to use it?
27-Jun-15 Profiling code, Timing Methods. Optimization Optimization is the process of making a program as fast (or as small) as possible Here’s what the.
Applied Software Project Management 1 Introduction Dr. Mengxia Zhu Computer Science Department Southern Illinois University Carbondale.
Coping with Math Anxiety
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
Personal Software Process Overview CIS 376 Bruce R. Maxim UM-Dearborn.
Estimation Wrap-up CSE 403, Spring 2008, Alverson Spolsky.
How Do I Find a Job to Apply to?
15 Powerful Habits Make You The Winner!!!.
Testing and Cost / Benefit Tor Stålhane. Why cost / benefit – 1 For most “real” software systems, the number of possible inputs is large. Thus, we can.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 10: Testing and Inspecting to Ensure High Quality Part 4:
Prof. Matthew Hertz SH 1029F /
CS 350, slide set 6 M. Overstreet Old Dominion University Spring 2005.
Software Engineering - Spring 2003 (C) Vasudeva Varma, IIITHClass of 39 CS3600: Software Engineering: Standards in Process Modeling CMM and PSP.
SE 501 Software Development Processes Dr. Basit Qureshi College of Computer Science and Information Systems Prince Sultan University Lecture for Week 6.
Prof. Matthew Hertz WTC 207D /
KAREN PHELPS Spontaneous Sponsoring. Your Home Presentations “A Valuable Source for Recruits”
Humboldt University Berlin, University of Novi Sad, University of Plovdiv, University of Skopje, University of Belgrade, University of Niš, University.
Program Development Life Cycle (PDLC)
1 Project Information and Acceptance Testing Integrating Your Code Final Code Submission Acceptance Testing Other Advice and Reminders.
English 1301 WB Orientation Welcome to English 1301 Hi, my name is Donna Smith, and I’ll be your instructor for this semester.
CSC 213 – Large Scale Programming. Today’s Goal  Improve design skills to make usable designs  Noun extraction & UML class diagram reviewed  Connections.
11 Insert Agency Name Time and Labor Implementation Meeting Insert Date of Meeting.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
This material is approved for public release. Distribution is limited by the Software Engineering Institute to attendees. Sponsored by the U.S. Department.
Maths Workshop St Nicholas CE (VC) First School. Aims of the Workshop To raise standards in maths by working closely with parents. To provide parents.
Problem of the Day  Why are manhole covers round?
CS 350, slide set 5 M. Overstreet Old Dominion University Spring 2005.
Session 4: PREPARE FOR TESTS Year 7 Life Skills Student Wall Planner and Study Guide.
Unit 2 (task 28) In this PowerPoint I will tell you about 7 important IT job roles and if a candidate might want one what he would have to do to get one.
Yeah but.. What do I do? Software Leadership Dan Fleck 2007.
INFO 636 Software Engineering Process I Prof. Glenn Booker Week 8 – Reviews 1INFO636 Week 8.
PSP Quality Strategy [SE-280 Dr. Mark L. Hornick 1.
C++ crash course Class 8 statements, sort, flight times program.
Analyzing Transcripts: Creating Needs. 2 Confidential and Proprietary Applied Marketing Science, Inc. Identifying Needs In this part of the VOC process.
Chapter 7 The Practices: dX. 2 Outline Iterative Development Iterative Development Planning Planning Organizing the Iterations into Management Phases.
Watts Humphrey IBM director of programming and vice-president of technical development Joined CMU Software Engineering Institute in 1986 Initiator and.
Mistakes, Errors and Defects. 12/7/2015Mistakes, Errors, Defects, Copyright M. Smith, ECE, University of Calgary, Canada 2 Basic Concepts  You are building.
INFO 637Lecture #71 Software Engineering Process II Product Implementation INFO 637 Glenn Booker.
Time Management Eric W. Ford, PhD 1/22/02. Plan a schedule of balanced activities.  College life has many aspects that are very important to success.
Yazd University, Electrical and Computer Engineering Department Course Title: Advanced Software Engineering By: Mohammad Ali Zare Chahooki The Project.
This tutorial will talk you through a very basic workbench queueing simulation. The queueing system modelled is of customers entering an infinite capacity.
Introduction to the Personal Software Process. Overview Process Fundamentals PSP Concepts and Structure PSP Planning and Measurement PSP Quality Management.
Yeah but.. What do I do? Software Leadership Dan Fleck 2007.
U.S. History Group Project.  In the remaining weeks of school, you, the students, will be put in the position of teacher. You will be broken up into.
CSC 480 Software Engineering PSP Project 1 August 20, 2004.
n Taking Notes and Keeping a Journal n Listening Skills n Working Together n Managing Your Time.
Managing Time  How much time do you have?  How are you going to use it?  What are your goals?  What are your priorities?  Do you have a schedule?
课标人教实验版 高二 Module 6 Unit 3. Listening on workbook.
The Reading Crew Session 4. 2 Refresh ….. Card Activity 4.
Starting to use it with the ACM problems
A possible solution: Personal Software Process (PSP)
An Introduction to Debugging
Mistakes, Errors and Defects
Chapter 1: Creating a Program.
Presentation transcript:

Important concepts in software engineering The tools to make it “easy to apply common sense”!

Concepts Project time – elapsed time Supervisor requests – reasonable or out to lunch – how can you determine? Mistakes, Defects and Errors, which is the worse What is your code quality? Why and how do you improve your code quality? Short group exercise

Project Time versus Elapsed Time Student comes to me and says – “ the assignment you gave me was so hard that it took me three weeks to do” The student has lost credibility – does the student really expect me to believe the student spent 12 hours a day each day on my assignment and on nothing else? Make sure you have knowledge of the difference between “project time” and “elapsed time” Project time – the time actually needed to do the project work Elapsed time – the time period that goes by before the student has the time available to put in the “project time” Interrupt time -- the time it takes to get restarted on the project after stopping (to answer the phone, get a coffee). Industry shows that interrupt time is one of the most wasteful things in project development. Question: Would students learn more by taking 6 week rather than 13 week courses?

Your supervisor says – I have this idea – when can you get it done by? You need the ability to be able to estimate how many lines of code a project of this sort would take you to complete (design, code, test, debug, document) You need to know your average productivity (LOC / hr) My productivity is about 20 LOC / hr (designed, coded, tested and debugged) You need to know your other commitments for the week Now you are in a position to answer your supervisor DON’T MAKE COMMITMENTS THAT YOU CAN’T MEET MAKE SURE YOU KNOW HOW TO CALCULATED WHETHER YOU CAN MAKE A COMMITMENT

Keep records Estimating Do a quick think about a project Does this seem like a “easy”, reasonably easy, “okay”, “hard but do-able”, “really hard but do-able”, “sort of know what is needed”, “I want a new supervisor” type of project Lets assume it seems “reasonably easy” – what did “reasonably easy” mean the last time you did a project? -- look at your records Let assume that is meant 150 LOC (excluding comments and blank lines) Lets assume productivity is 20 LOC / hr Calculate project time and elapsed time for the following two students

Calculate time when student can deliver Student one Monday 3 hrs available Tuesday 5 hrs available Wednesday 7 hrs available Student 2 Monday 3 hrs available Tuesday 1.5 hrs available Wednesday 1.5 hrs available Thursday 1.5 hrs available Friday 1.5 hrs available

Joke about students and programming Computer engineering conference All instructors asked “would you get into a ‘fly- by-wire’ aircraft which had all the control software was designed by your students?” My answer was YES – why?

Everybody makes mistakes Know and understand the following The ideal development process involves no mistakes If you can’t have a “mistake-free process” then it is better to have an “error present but defect- free process” than “error-free but defect- present process” What is a “defect” and what is an “error”?

Let’s take an example – TLD rather than TDD (but same idea for TDD) The student is designing the code for the supervisor Writes out the design of the code, does a quick “look over” the design and discovers 3 mistakes (which are fixed) but introduces a new mistake (undiscovered). The student does not know it, but there is another undiscovered mistake left in the design Industry standard 1 new mistake for each mistake fixed Code – discover 4 mistakes (fixed) – introduces a new one and misses one. Discovers 1 mistake left over from Design Debug and test – makes 2 new mistakes, fixes both, finds 2 of the missed mistakes from earlier on (the one in design and one from code. Other mistakes are not discovered. Question – can the student use the information here to “calculate” how many “defects” left after finishing the next project?

Mistakes, defects and errors Mistake – a problem generated Error – a mistake made during a certain “phase” of the project, and “recognized and fixed” at that stage (phase) of the project Defect – a mistake that “escaped” a given stage of the project. The longer a defect is goes unrecognized, the bigger problem it is to fix Scale by 2 for each phase during which defect is missed PhaseErrorDefect NOT KNOWN TILL DISCOVERED Defect count Design Write-out Code Debug Test Found later Total Scaled defect

Mistakes, defects and errors Analysis of code issues Writes out the design of the code, does a quick “look over” the design and discovers 3 mistakes (which are fixed) but introduces a new mistake (undiscovered). The student does not know it, but there is another undiscovered mistake left in the design Industry standard 1 new mistake for each mistake fixed PhaseErrorDefect NOT KNOWN TILL DISCOVERED Defect count Design Write-out 3 mistakes discovered 2 mistakes (not discovered ) Code Debug Test Found later Total Scaled defect

Mistakes, defects and errors Analysis of code issues Code – discover 4 mistakes (fixed) – introduces a new one and misses one. Discovers 1 mistake left over from Design PhaseErrorDefect NOT KNOWN TILL DISCOVERED Defect count Design Write-out 3 mistakes discovered 2 mistakes (not discovered) 1 design defect found in code Count as 1 * 2 Code 3 mistakes discovered 2 mistakes (not discovered) 1 design defect found Debug Test Found later Total Scaled defect

Mistakes, defects and errors Analysis of code issues Debug and test – makes 2 new mistakes, fixes both, finds 2 of the missed mistakes from earlier on (the one in design and one from code. Other mistakes are not discovered. PhaseErrorDefect NOT KNOWN TILL DISCOVERED Defect count Design Write-out 3 mistakes discovered 2 mistakes (not discovered) 1 design defect found in code Count as 1 * 2 1 design defect found in debug Count as 1 * 4 Code 3 mistakes discovered 2 mistakes (not discovered) 1 design defect discovered 1 code defect found in debug Count as 1 * 2 Debug Test 2 mistakes discovered 1 design defect discovered 1 code defect discovered Found later Total Scaled defect

Defects Defects are mistakes not found until “after you have left this phase of the project” More costly the later in the project the are found – scale cost of fixing defects (relative to errors) by 2 ^ number of phases between when the mistake was made and when the defect was found. The phases here Design the project, but before writing any code Writing code (including compiling, assembling and linking) Debug and test – as soon as you stop writing the code and decide to run the code Release – once you have decided “the project is finished” and give to the customer

Mistakes, defects and errors Analysis of code issues Debug and test – makes 2 new mistakes, fixes both, finds 2 of the missed mistakes from earlier on (the one in design and one from code. Other mistakes are not discovered. PhaseErrorDefect NOT KNOWN TILL DISCOVERED Defect count Design Write-out 3 mistakes discovered 2 mistakes (not discovered) 1 design defect found in code Count as 1 * 2 1 design defect found in debug Count as 1 * 4 Code 3 mistakes discovered 2 mistakes (not discovered) 1 design defect discovered 1 code defect found in debug Count as 1 * 2 Debug Test 2 mistakes discovered 1 design defect discovered 1 code defect discovered Found later Total Scaled defect

Mistakes, defects and errors Analysis of code issues Customer finds remaining defect after release (You’d be so lucky in real life) PhaseErrorDefect NOT KNOWN TILL DISCOVERED Defect count Design Write-out 3 mistakes discovered 2 mistakes (not discovered) 1 design defect found in code Count as 1 * 2 1 design defect found in debug Count as 1 * 4 Code 3 mistakes discovered 2 mistakes (not discovered) 1 design defect discovered 1 code defect found in debug Count as 1 * 2 1 code defect found in release Count as 1 * 4 Debug Test 2 mistakes discovered 1 design defect discovered 1 code defect discovered Found later 1 code defect discovered Total 7 ERRORSSCALED DEFECTS 12 Scaled defect

You need to know the quality of your process Modification of the concept of “code quality” taken from Humphrey’s “A discipline of software engineering” Number of Errors Found Quality = 100% * # Errors + Scaled Defects

You need to know the quality of your process Number of Errors Found Quality = 100% * # Errors + Scaled Defects Quality = 100% * = 38 %

Work out your own phases for the way “you” work – collect defect and error information Consider last student Recorded defects and errors over last three projects Code quality was 40%, 60%, 80% Basic rule – the way you have worked before is the way you are working now, unless you have made an effort to change your process! The student is working on a new project – much larger than before. The number of errors is 26 The scaled defects (found to this point) 35 How much time should the student spend looking for the remaining defects in the code?

Work out your own phases for the way “you” work – collect defect and error information Code quality was 40%, 60%, 80% = 60% +- 8% Basic rule – the way you have worked before is the way you are working now, unless you have made an effort to change your process! The student is working on a new project The number of errors found is 26 The scaled defects (found to this point) 14 How much time should the student spend looking for the remaining defects in the code? Errors 26.4 * 26 60% = = X = = 17 Errors + defects 26 + X.6

Why improve Quality? More confidence in your work More likely to have something to go to a conference in Australia with! More time to spend on other things Give two other reasons (personal) for improving quality of your code

How do you improve Quality? Keep track of the errors you make Do a review Design review (BEFORE YOU LEAVE THE DESIGN PHRASE) Code review (BEFORE YOU HIT THE RUN BUTTON Build tests that you can use now, and use again later when you find you need to modify the code Make testing easy for yourself – get an automated process Consider doing some of the code development in a Test driven manner where you design the tests as part of trying to understand what it is you want to do Try to get tests written before you start coding (TDD) Only makes sense if you talk to the customer frequently and show incremental builds to the customer to avoid design defects

Keep track of the errors you make For a couple of projects, keep track of all the errors and defects you make Then take the top five – ignore the others Develop a process to stop making the top two Worry about the others later Find tools to assist you Talk to others

Do a review -- 1 Design review (BEFORE YOU LEAVE THE DESIGN PHRASE) Code review (BEFORE YOU HIT THE RUN BUTTON) Look for the mistakes in the code that “you typically make”; Don’t look for the mistakes that you don’t typically make Don’t look for the mistakes that other’s make Develop a PSP – personal software process

Do a review -- 2 Hints – industry standard If you don’t review for 25% of the time that you code, pack and go home. Your code is so bad, I can’t rely on you. You spent so much time fixing the bugs in the code that you are wasting my and your time and money. Don’t review too slowly (slower than 20 LOC / hr) or too quickly (faster than 150 LOC / hr) Go through the code looking for the first type of error you make, then go through the code for the second. Look for one type of error at a time NOTE: Scanning over the line you have just typed or the line before COUNTS as a review. Personally, if I find a mistake in the line I just typed (or the one before), I don’t even count it as a mistake! On a good day, my error rate can be as low as 80 errors / kLOC. That’s roughly 1 error for each 10 lines of code On a recent assignment I was testing, I was very tired and I was making 300 errors / kLOC – and really wasting my time as I was doing no review

Share reviews Rule 1 for finding errors / defects If you don’t find the error / defect by the third time you read through the code, you will not find it the fourth time or later Rule 2 – share reviews and problems with a stranger The stranger could be you – tomorrow or after a coffee break The stranger could be a “plush toy”. Explaining your problem to the plush toy means that you are explaining to yourself Rule 3 – team program. If you and a fellow student are working in a similar area (so you understand the concept), then work together on each other’s project. You discuss, one types, the other reviews, then swap. Then do the same thing for your code Have penalties. If the reviewer spots an error before the typer does, that’s 25c to the reviewer. However if a defect turns up, that’s $1 to the typer – after all defects are bigger problems than errors

Quick brain storm Groups of around 4 people working with a similar programming language Excel C++ or C MAtlab Other languages Each person puts in 5 most common mistakes they make. Return with a list of the 2 most common mistakes made by the group Determine what the average productivity is for the group and the range of productivity Determine what the average code quality is for the group and the range of code quality.

Group 1 and 2 results

Group 3 and 4 results

Group 5 and 6 results

Concepts Project time – elapsed time Supervisor requests – reasonable or out to lunch – how can you determine? Mistakes, Defects and Errors, which is the worse What is your code quality? Why and how do you improve your code quality? Short group exercise

Further information Watt Humphreys, “A Discipline of Software Engineering – Personal Software Process” Dr. Mike Smith –