1 Introduction. 2 Administrative 70% Exam, 30% Homeworks Must pass exam 4-5 Homeworks Homework grades: 80 is easy, 100 is hard 1-2 Class exercises Lecture.

Slides:



Advertisements
Similar presentations
Python Objects and Classes
Advertisements

Computer Science Department
CHAPTER 2 ALGORITHM ANALYSIS 【 Definition 】 An algorithm is a finite set of instructions that, if followed, accomplishes a particular task. In addition,
Study What’s that? Why? How?. School does not “do stuff” to you You do stuff to school – it is active You do stuff to school – it is active This is about.
Lecture Roger Sutton 21: Revision 1.
Project Estimation: Metrics and Measurement
Inheritance Inheritance Reserved word protected Reserved word super
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Aalborg Media Lab 23-Jun-15 Inheritance Lecture 10 Chapter 8.
1 Introduction. 2 Why? We need to deliver good programs Bugs: results may be catastrophic Long time to get something working Expensive to change: software.
MATH 330: Ordinary Differential Equations Fall 2014.
1 Object Oriented Programming Computer Systems Engineering (D2) and Programming (P)
GROUP PROJECTS IN SOFTWARE ENGINEERING EDUCATION Jiang Guo Department of Computer Science California State University Los Angeles April 3-4, 2009.
Object Oriented Programming Philosophy. Part 1 -- Basic Understanding & Encapsulation.
Student Centered Teaching Through Universal Instructional Design Part II.
Methods Review. 2. Class-wide vs. local variables. 3. Why C# bans global variables. 4. Nested blocks. 5. Scope of identifiers.
Chapter 1: Introduction to Project Management
Introduction to Programming Lecture 1 – Overview
Classes and Objects. Topics The Class Definition Declaring Instance Member Variables Writing Instance Member Methods Creating Objects Sending Messages.
Program Design CMSC 201. Motivation We’ve talked a lot about certain ‘good habits’ we’d like you guys to get in while writing code. There are two main.
1 CSC 221: Introduction to Programming Fall 2012 Functions & Modules  standard modules: math, random  Python documentation, help  user-defined functions,
WXGE 6103 Digital Image Processing Semester 2, Session 2013/2014.
What is Usability? Usability Is a measure of how easy it is to use something: –How easy will the use of the software be for a typical user to understand,
Course Guide IS325 Systems Analysis & Design II Ms Fatima Khan Prince Sultan University, College for Women.
CS 46B: Introduction to Data Structures June 16 Class Meeting Department of Computer Science San Jose State University Summer 2015 Instructor: Ron Mak.
CSCI-383 Object-Oriented Programming & Design Lecture 13.
1 ENERGY 211 / CME 211 Lecture 26 November 19, 2008.
Lecture 4 Software Metrics
1 Introduction to Software Engineering Lecture 1.
Agenda Object Oriented Programming Reading: Chapter 14.
1 Introduction. 2 Administrative ~80% Exam, ~20% Homeworks Must pass exam 4-5 Homeworks Homework grades: 80 is easy, 100 is hard 1-2 Class exercises Lecture.
10-Nov-15 Java Object Oriented Programming What is it?
CSSE501 Object-Oriented Development. Chapter 4: Classes and Methods  Chapters 4 and 5 present two sides of OOP: Chapter 4 discusses the static, compile.
1 CS161 Introduction to Computer Science Topic #9.
Software Engineering (CSI 321) Project Planning & Estimation 1.
Principles of Programming - NI Simple Recursion Recursion is where a function calls itself. Concept of recursive function: A recursive function is.
SEG 4110 – Advanced Software Design and Reengineering Topic T Introduction to Refactoring.
Chapter 22 Metrics for Process and Projects Software Engineering: A Practitioner’s Approach 6 th Edition Roger S. Pressman.
Object orientation and Packaging in Java Object Orientation and Packaging Introduction: After completing this chapter, you will be able to identify.
Software Project Management
Welcome to Software Engineering. Lecture 1 Metaphysics of Software Engineering Alex
2016 CRA Mentoring Workshop Teaching Margo Seltzer, Harvard Univ. Dan Grossman, Univ. Washington February 22, 2016.
Lecture 6 Title: Project Cost Management MIS 434.
Dana Nau: CMSC 722, AI Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
CS 440 Database Management Systems Stored procedures & OR mapping 1.
Software Engineering 2004 Jyrki Nummenmaa 1 Why new software methodologies The classic waterfall-model based techniques are strongly based on the.
Winter 2016CISC101 - Prof. McLeod1 CISC101 Reminders Assignment 5 is posted. Exercise 8 is very similar to what you will be doing with assignment 5. Exam.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University A Metric-based Approach for Reconstructing Methods.
Welcome to Software Engineering
Algorithms and Problem Solving

CS101 Computer Programming I
CSc 020: Programming Concepts and Methodology II
Software Engineering (CSI 321)
Object-Oriented Programming & Design Lecture 14 Martin van Bommel
Object oriented system development life cycle
The Object-Oriented Thought Process Chapter 06
Recursive Thinking Chapter 9 introduces the technique of recursive programming. As you have seen, recursive programming involves spotting smaller occurrences.
Introduction To System Analysis and Design PART 2
Introduction to Programming Using C++
Computer Programming 1 introduction to JAVA Lecture 1 Instructor: Ruba A. Salamah Islamic University of Gaza.
CSE 303 Concepts and Tools for Software Development
Tasks & Grades for MET1.
Algorithms and Problem Solving
Tasks & Grades for MET3.
Chapter 13: Construction
MA171 Introduction to Probability and Statistics
Review of Previous Lesson
Metrics for Process and Projects
Presentation transcript:

1 Introduction

2 Administrative 70% Exam, 30% Homeworks Must pass exam 4-5 Homeworks Homework grades: 80 is easy, 100 is hard 1-2 Class exercises Lecture in tutorial slot Office hours: by appointment

3 An academic course is limited … We want to emulate Changing requests Partial/Underspecified requests Project is never closed – no end point Large teams Large code base Time factor – human memory is limited Multiple users Multiple versions Wide area – many non-overlapping topics Interfacing with external “things” Lecture time is limited - cannot present complex code Too much code vs. too much explanations

4 Learning this Course Close to social science/literature No formulas, no proofs, no right answer You need to forget a few things Wide but not deep, no linear order Extrapolation: from the simple examples to complex scenarios Requires a different state of mind

5 Our Context OOP Mostly static typing Performance is not issue Things everyone can use You will write slower!

6 Motivation We need to deliver good programs Bugs: results may be catastrophic Project is 95% done, 80% of the time Expensive to change: software is not “soft” (!) In short: programs are complicated Two issues Definition of quality Techniques for achieving quality

7 A One-Line Summary Write test!

8 A Two-Line Summary Rule #1:Write test! Rule #2:Programming is a process of trial-and-error process

9 A Slightly Deeper Summary Rule #1:Write test! Rule #2:Programming is a process of trial-and-error process Rule #3, #4, #5: Turing Church Rule #6: There is no rule #7

10 The Turing & Church Rules A program may contain other programs You cannot know if a program is doing what you expect it to do If it can be done at all, it can be done in many ways

11 Quality in Software ? #bugs in the present #bugs in the future Time to develop Time to add a feature Time to learn the code LOC ? #Users Revenues Conclusions Many contradicting factors Measuring is hard

12 Statistical Correlation Conduct an experiment Measure quality once over a large enough sample Correlate with other properties (that are easier to measure) Similar to clinical trials Candidates for “other properties” Source code metrics, development methodologies, language/technology/tools used Does not work: Expensive Sample size is too small compared to variance Participants must be isolated of new techniques for the duration of the experiment Hidden bugs Conclusion: software metrics are very limited Not surprising: measuring quality seems to be at odds with Turing

13 Burn Charts Time is important. let’s describe our progress vs. time Vertical axis: tasks completed Horizontal axis: time line

14 Burn Up

15 Burn Up Example

16 Quality in Software High-quality: A software whose burn curve is linear Similar to Big-O notation of algorithms Does not distinguish between two linear curves Differences in domain, languages, … States that a flattening is the #1 risk Can be experienced even in student assignments Result oriented Unlike code metrics whose correlation with the net result is indirect (at best) Requires constant feedback, short iterations Past is measurable Provides some confidence for the future

17 Achieving Linear Burn Up The reason why people are obsessed with design A good design => High quality Two questions What is design? How can one achieve good design?

18

19 (Intelligent) Code Review Context Schedule considerations Criticality Legacy Not all parts of a program should be of the same quality Readability “Code is for communication” Code is read more than written

20 What is Design (I) Sufficient information for a craftsman of typical skill to be able the build the artifact without excessive creativity. (Guy Steele)

21 public class Calculator { int x; public A(int n) { x = n; } public int add(int y) { return x + y; } public int sub(int y) { return x – y; } }

22 Using a Calculator Object Compute 5 + 9, put result in x int x = 5 + 9; int x = new Calculator(5).add(9); Protocols induce a new programming language

23 Class IndentingPrinter public class IndentingPrinter { private String indentation = ""; private final StringBuilder sb = new StringBuilder(); public void inside() { indentation += " "; } public void outside() { indentation = indentation.substring(2); } public void print(String s) { sb.append(indentation).append(s).append('\n'); public String toString() { return sb.toString(); } }

24 Using IndentingPrinter’s Language public class Book { private String name; public Book(String name) { this.name = name; } public void print(IndentingPrinter p) { p.print("Book: " + name); } } public class Library { private String name; private List books = new ArrayList (); public Library(String name) { this.name = name; } public void add(Book b) { books.add(b); } public void print(IndentingPrinter p) { p.print("Library: " + name); for (Book b : books) b.print(p); }

25 Class IndentingPrinter (II) public static class IndentingPrinter { private final String indentation; private StringBuilder sb = new StringBuilder(); public IndentingPrinter() { this("", new StringBuilder()); } private IndentingPrinter(String indentation, StringBuilder sb) { this.indentation = indentation; this.sb = sb; } public IndentingPrinter inside() { return new IndentingPrinter(indentation + " ", sb); } public void print(String s) { sb.append(indentation).append(s).append('\n'); public String toString() { return sb.toString(); } }

26 New Protocol => New Language // Book remains the same... public static class Library { private String name; private List books = new ArrayList (); public Library(String name) { this.name = name; } public void add(Book b) { books.add(b); } public void print(IndentingPrinter p) { p.print("Library: " + name); for (Book b : books) b.print(p.inside()); }

27 Which Version do you like better?

28 What is Design (II) Design is the language induced by the protocols of the objects that are available at a certain context

29 “Design, by nature, is a series of trade-offs. Every choice has a good and bad side, and you make your choice in the context of overall criteria defined by necessity. Good and bad are not absolutes, however. A good decision in one context might be bad in another. If you don't understand both sides of an issue, you cannot make an intelligent choice; in fact, if you don't understand all the ramifications of your actions, you're not designing at all. You're stumbling in the dark” Allen Holub, “Why getter and setter methods are evil”,