CS305, HCI in Software Development Usability Goals, Principles, Guidelines
Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting...
-
date post
20-Dec-2015 -
Category
Documents
-
view
222 -
download
2
Transcript of Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting...
![Page 1: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/1.jpg)
Ch3: Software Engineering Principles
![Page 2: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/2.jpg)
2
What is a principle?
Definition:
Goals of accounting principles:
Goals of software engineering principles?
![Page 3: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/3.jpg)
3
Why are software engineering principles needed?
Characteristics of target software
Summary:
![Page 4: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/4.jpg)
4
Outline
Principles involve software engineering process and product
Seven important principles used in all phases of software development
Cornerstone principle:
![Page 5: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/5.jpg)
5
Rigor and formality: Motivation
Problem statement:Write a program that computes the square root of a number
What is wrong/missing in this simple problem statement?
![Page 6: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/6.jpg)
6
Rigor and formality: Motivation
More rigorous problem statement:
Write a program to compute the square root of a given number. The program accepts positive and negative numbers as well as zero as input. If the input is a positive number, then the output should be both positive and negative square roots of the number. If the inputis zero, then the output should be zero. If the input is a negative number, then the program should print an error message and exit.
Can you find anything lacking in this problem statement?
![Page 7: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/7.jpg)
7
Rigor and formality: Motivation
What is formality?
SquareRoot(x)
Output = + sqrt(x), if x > 0 = 0 if x = 0 = “Error” if x < 0
Input x;
![Page 8: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/8.jpg)
8
Rigor and formality
Software engineering is a creative design activity:
Why is rigor necessary?
What is formality?
![Page 9: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/9.jpg)
9
Rigor and formality (contd..)
Who should practice rigor and formality?
When should rigor and formality be practiced?
Influence of rigor and formality on other software qualities
![Page 10: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/10.jpg)
10
Examples of rigor and formality
Product:
Process:
![Page 11: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/11.jpg)
11
Separation of concerns
Problem statement:Positive input:Negative input:Zero:Response time:
Different concerns:
Address different concerns separately:
![Page 12: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/12.jpg)
12
Separation of concerns
Divide and conquer strategy:
Master complexity by:
Identify the different aspects of problem:
![Page 13: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/13.jpg)
13
Separation of concerns (contd..)
Advantages of separation of concerns supports:
![Page 14: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/14.jpg)
14
Examples
Go through phases one after the other (as in waterfall)
Keep product requirements separate
![Page 15: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/15.jpg)
15
Modularity: Motivation
Problem statement:Write a program to compute the square root of a given number. The program accepts positive and negative numbers as well as zero as input. The program accepts input from an ASCII file. If the input is a positive number, then the output should be both positive and negative square roots of the number. If the input is zero, then the output should be zero. The output should be written to a file.
Should the code for input and output be embedded with the codethat computes square root, or should the code be in separate modules?
![Page 16: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/16.jpg)
16
Modularity: Motivation
Monolithic application
File i/pSquare rootFile o/p
Modular application
File i/p Square root File o/p
![Page 17: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/17.jpg)
17
Modularity
Definition:
Two-phase application of separation of concerns
Methodological approaches:
Is modularity unique to software engineering?
![Page 18: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/18.jpg)
18
Modularity (contd..)
Four benefits of modularity
Key supporting concepts: Cohesion and coupling Cohesion:
Coupling:
![Page 19: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/19.jpg)
19
Modularity (contd..)
Modularity supported in programming languages:
C++:
Ada95/Java:
![Page 20: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/20.jpg)
20
Abstraction: Motivation
•For a module, which uses the square root program, the only relevant information is the input it accepts and the output it provides.
•Thus, the user of the square root program is only concerned with itsinput/output behavior and may ignore the details of the implementation.
![Page 21: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/21.jpg)
21
Abstraction
Definition:
Goals of advances in design and programming
Type of abstraction to apply depends on purpose
![Page 22: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/22.jpg)
22
Abstraction (contd..)
Abstraction yields models:
![Page 23: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/23.jpg)
23
Example
Programming language semantics described through an abstract machine that ignores details of the real machines used for implementation
Abstractions in process
![Page 24: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/24.jpg)
24
Anticipation of change: Motivation
Problem Statement:Consider the square root program. In addition to accepting input and writing output to a file, the program should also accept input from a terminal and provide output to a terminal.
File i/p Square root File o/p
Terminal i/p Terminal o/p
What if a combination of file and terminal I/p and o/p is desired?
![Page 25: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/25.jpg)
25
Anticipation of change: Motivation
Another example:
Initially, the user wants an error message if the input is negative.Later, he changes his mind, and wants the complex root as output.
![Page 26: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/26.jpg)
26
Anticipation of change
Why is this necessary?
Is anticipation of change unique to computing?
Can future products be predicted? Is planning cycle 5 or more years?
![Page 27: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/27.jpg)
27
Generality: Motivation
Square root routine is being written for use in an application where itsinput will never be negative.
Later, a new application needs square root computation. But this, time, the output should be a complex root, if input is negative.
![Page 28: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/28.jpg)
28
Generality
Why generality?
Advantages and drawbacks of generality
Some examples of generality
![Page 29: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/29.jpg)
29
Generality (contd..)
Domain and organization specific reuse What products will company develop in the future? Leverage additional short-term effort with long-term
gains with respect to maintenance, reuse, etc.
![Page 30: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/30.jpg)
30
Generality (contd..)
Domain-Independent20% Domain-Specific
65%
Application-Specific15%
Three classes of software
in a typical software application
![Page 31: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/31.jpg)
31
Incrementality: Motivation
To provide a quick solution, we may first write a program that acceptspositive numbers as input, and provides positive square root as output.
Later, we can add the capability to accept negative numbers as input.Depending on the experience of the user in using the original program,upon receiving a negative input, he may choose to: - Print an error message - Produce complex root
![Page 32: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/32.jpg)
32
Incrementality
Accepted practice across disciplines
Incrementality in software:
![Page 33: Ch3: Software Engineering Principles 1 What is a principle? Definition: Goals of accounting principles: Goals of software engineering principles?](https://reader033.fdocuments.us/reader033/viewer/2022052401/56649d4b5503460f94a28649/html5/thumbnails/33.jpg)
33
Incrementality (contd..)
Advantages of incrementality:
Difficulty in constructing solutions to complex computing problems: