CS计算机代考程序代写 Excel algorithm Design Patterns Review

Design Patterns Review
• How many main types of design patterns were introduced by the Gang of Four (Gamma, Helm, Johnson, Vlissides) in their famous book? ——————
• What type of design pattern is the Factory Method pattern?
• What type of design pattern is the Observer pattern?
• What type of design pattern is the Bridge pattern?
CIS 3760
Software Engineering
1

CIS 3760: Software Engineering Software Quality – Basics & SQA
Instructor: Prof. Stacey Scott
School of Computer Science
University of Guelph https://www.uoguelph.ca/computing/people/stacey-scott stacey.scott@uoguelph.ca
© 2017-21 Stacey D. Scott – with content from J. McCuaig, used with permission

Remaining topics for the term
• Software Quality – Basics
– Preventingdefects(staticanalysis:reviews) – Detectingdefects(dynamicanalysis:testing) – Metrics
• Software maintenance & re-engineering (if time)
CIS 3760
Software Engineering
3

Outline
Section 9: Software Quality Basics
– Softwarequalitybasics
– Software quality assurance SQA (assuring quality in software)
• SQA tools for assuring quality
– Preventingdefects(reviews)(Section10)
– Detecting defects (testing) (Section 11)
– Measuringquality(metrics)(Section12)
CIS 3760
Software Engineering
4

Introduction to Quality Assurance in Software
Meaghan Lewis
– Senior Product Manager at Microsoft (formerly worked at GitHub, Lever and others as QA/Quality Engineer)
• Introduction to QA/What is quality assurance? Modules of “Programming Foundations: Software Testing/QA” LinkedIn Learning Course
• https://www.linkedin.com/learning/programming‐foundations‐software‐ testing‐qa/set‐the‐standard‐with‐quality‐assurance‐qa?u=56996833
CIS 3760
Software Engineering
5

Software Quality
• SoftwareQualityistheunderlyingfocusofthiscourse
 Starts with good teams and development process
 Proper use of Architectural and Design patterns enhances quality
– Reviews and Testing (in all phases of the process) improve quality
– Metrics can be used to estimate the quality or to identify aspects of a system or SE process that are lacking quality
• Doingtheabovedoesnotguaranteehighquality,butnot doing the above guarantees low quality!
• Thewholesoftwareorganization,togetherwiththeir customer, needs to be involved in the SQ process
CIS 3760
Software Engineering
6

The Quality Dilemma
• Option 1: Make something of terrible quality – Consumersunhappy
– Poorreputation
– Losemoney
• Option 2: Perfect the quality
– Large amount of time testing and retesting
– Designandredesigntoperfectrequirements – Moneytoensurebestqualitycomponents
– Tooexpensivetosell
– Toolatetomarket
– Losemoney
• Option 3: magical middle ground
– Productisgoodenoughnottoberejectedrightaway,AND – Itdoesnottaketoolongorcosttoomuchtocomplete
CIS 3760
Software Engineering
7
Slides adapted from Pressman, McGraw-Hill online resources

“Good Enough” Software
• “Good enough” software delivers high quality functions and features that end-users desire
 But, it may also deliver other more obscure or specialized functions and features that contain known bugs
• Arguments against “good enough”
– “good enough” may work in some application domains and for a
few major software companies
– Ifasmallcompanydeliversa“goodenough”(buggy)productit risks permanent damage to company’s reputation
 bad buzz may cause sales to plummet and company to fold – Canbefoundnegligentandopencompanytolawsuit
 real time embedded software (e.g. vehicle automation)
CIS 3760
Software Engineering
8
Slides adapted from Pressman, McGraw-Hill online resources

Quality Concepts
“good design”
 Degree to which the design and implementation of the product meets the customer/user needs
“conforming product”
– Quality of conformance:
 Degree to which the implementation follows the
• Quality = “degree of excellence” of something • Twoimportantconceptsinsoftwarequality:
– Quality of design:
CIS 3760
Software Engineering
9
 Degree to which the requirements are correct
 Degree to which the design and implementation follow best practices
design, relevant standards, coding conventions, etc.
Slides adapted from Pressman, McGraw-Hill online resources

User / customer satisfaction & quality
User / customer satisfaction = good quality + conforming product + delivery within budget and schedule
CIS 3760
Software Engineering
10
Slides adapted from Pressman, McGraw-Hill online resources

Software Quality – Working Definition
Software Quality:
A useful product that provides
CIS 3760
Software Engineering
11
measurable value

Useful Product
• A useful product delivers the content, functions, and features that the end-user desires
– inareliable,errorfreeway
– satisfiesthoserequirementsthathavebeenexplicitlystatedby stakeholders
– satisfiesasetofimplicitrequirementsthatareexpectedofall high quality software
 Ease of use
 Security and privacy
CIS 3760
Software Engineering
12
Slides adapted from Pressman, McGraw-Hill online resources

Measurable Value
• Adding value for both the producer and user
– Provides benefits for the software organization and the end-
user
– User: application provides a useful capability that enhances
some business process or personal process or interest
CIS 3760
Software Engineering
13
Slides adapted from Pressman, McGraw-Hill online resources

Discussion: What measurable value might a SO gain from producing high quality s/w?
• PossiblemeasurablevaluetotheSO:
– less maintenance effort
– fewerbugfixes
– reducedcustomersupport
– greater software product revenue due to customer satisfaction
– production of technologies that can be reused in future products
CIS 3760
Software Engineering
14

Discussion: What measurable value might the client gain from receiving high quality s/w?
• Consider potential “business user” clients (Measurable value):
– betterprofitabilitywhenanapplicationsupportsabusiness process
– improvedavailabilityofinformationthatiscrucialforthe business
• Considerpotential“personalconsumer”clients (Measurable value):
– improvedavailabilityofinformationthatiscrucialforpersonal use (e.g. health / medical information, childcare information, real-estate information, personal fitness information…)
– Enhancement of personal leisure/social activities
CIS 3760
Software Engineering
15

Let’s Come Back to the Quality Dilemma…
Producing high quality software products is expensive!!
CIS 3760
Software Engineering
16

Relative Cost of Fixing a Defect (IBM Systems Sciences Institute)
CIS 3760
Software Engineering
http://ekiy5aot90-flywheel.netdna-ssl.com/wp- content/uploads/migration/images/figure1LP.png
17

Relative Cost of Fixing a Defect (American Software Testing Qualification Board)
CIS 3760
Software Engineering
https://www.astqb.org/press-room/ISTQB_Certification_News_2015_1.html
18
UAT = User Acceptance Test
American Software Testing Qualifications Board, Inc.

Discussion: Why Do Costs Go Up??
Q1: Why does it cost more to fix a bug after the product has been shipped?
Q2: How does this chart apply to agile projects?
CIS 3760
Software Engineering
https://www.astqb.org/press-room/ISTQB_Certification_News_2015_1.html
19
UAT = User Acceptance Test
American Software Testing Qualifications Board, Inc.

Costs involved in producing quality software
• Preventioncostsinclude
– qualityplanningandprocess
– informalandformaltechnicalreviews – testequipment
– training(usersanddevelopers)
• Internalfailure(pre-ship)costsinclude
– rework/repair
– metricscollectionandanalysis(modesoffailureanalysis)
• Externalfailure(post-ship)costsinclude – conformanceresolution/errorcorrection
– productreturnandreplacement
– helplinesupport
– warranty work
– future costs of repairing damaged reputation
CIS 3760
Software Engineering
20
Slides adapted from Pressman, McGraw-Hill online resources

Outline
Section 9: Software Quality Basics
 Software quality basics
 Software quality assurance SQA (assuring quality in software)
• SQA tools for assuring quality
– Preventingdefects(reviews)(Section10) – Detecting defects (testing) (Section 11)
CIS 3760
Software Engineering
21

Some QA Humour…from Steph Beach, QA Geek
• https://www.youtube.com/watch?v=o2Qxf07kggM • https://www.youtube.com/watch?v=imrp-xFOx_I
CIS 3760
Software Engineering
22

Software Quality Assurance (SQA / QA)
• CompaniesoftenhaveseparateSQAgrouptoworkwithdev teams to assess the quality of the products being produced
• SQAgroupsoftenhavethefollowingresponsibilities:
– Prepare SQA plans for all projects, including what evaluations will be performed, audits and reviews, standards to be applied, procedures for error tracking, etc.
– Helpdeveloptheproject’ssoftwareprocess
 Provides feedback on the process description for compliance
with organizational policy, internal software standards, externally imposed standards (e.g., ISO-9001), and other parts of the software project plan
– Conduct audits and reviews of work products, and analyze defects and processes to improve quality and workflow
CIS 3760
Software Engineering
23
Slides adapted from Pressman, McGraw-Hill online resources

Discussion: Given the relative cost graph, why separate SQA from development team?
CIS 3760
Software Engineering
24 SQA = Software Quality Assurance

SQA still has a role in Agile SE
“Emphasizing error prevention does not eliminate the need for a QA organization. Rather, the role of Quality Assurance is completely different than it is in a predominantly defect detection oriented culture.
Good QA people are paranoid about ensuring the quality of the product before it reaches the customers and are conscientious about their job.
The role of QA should be to ensure that new features work in ways that customers expect them to and that the product as a whole is capable of meeting customer’s needs.”
 As we will discuss, effective testing / defect detection is hard; it’s good to have many people involved in the process!
CIS 3760
Software Engineering
25
Tate, K. “Sustainable Software Development: An Agile Perspective”, Addison Wesley

Outline
Software Quality Basics
 Software quality basics
 Software quality assurance SQA (assuring quality in software)
 SQA tools for assuring quality (overview) – Preventingdefects(reviews)(Section10)
– Detecting defects (testing) (Section 11)
CIS 3760
Software Engineering
26

Taxonomy for Defect Handling Techniques
Methodology
Configuration Management
Exception Handling
Modular Redundancy
Static Analysis Methods
Verification/ Formal Methods
Unit Testing
Integration Testing
System Testing
Note: this is an incomplete taxonomy; other techniques exist, including usability testing
Defect Prevention
Defect Detection
Defect Tolerance
CIS 3760
Software Engineering
Slides adapted from Bruegge & Dutoit, Pearson online resources 27
Testing
Debugging
Defect Handling

Strategies for Handling Software Defects
• Defectprevention
– Usemethodologytoreducecomplexity(i.e.adopteffectiveprocess) – Useconfigurationmanagementtopreventinconsistency
– Applyverification(formalmethods)topreventalgorithmicdefects – Usereviewstoidentifydefectsalreadyinthedesign
• Defectdetection
– Testing: Activity to provoke failures in a planned way
– Debugging: Find and remove cause (defect) of observed failures
– Monitoring: Deliver information about state and behavior => Used during debugging (i.e. use metrics)
• Defecttolerance – Exceptionhandling – Modularredundancy
CIS 3760
Software Engineering
28
Slides adapted from Bruegge & Dutoit, Pearson online resources

Static Analysis vs Dynamic Analysis
• Static Analysis
– Handexecution:Readingthesourcecode(CodeReview) – Walkthrough(informalpresentationtoothers)
– CodeInspection/Review(formalpresentationtoothers) – AutomatedToolscheckingfor
 syntactic and semantic errors
 departure from coding standards
• Dynamic Analysis (Traditional “Testing” activities)
– Black-box testing (Test the input/output behavior to a subsystem or
class)
– White-box testing (Test the internal logic of a subsystem or class)
CIS 3760
Software Engineering
29
Slides adapted from Bruegge & Dutoit, Pearson online resources

Review
Defect Handling
Defect Defect Defect Prevention Detection Tolerance
• Why is the difference between defect prevention and defect detection?
• What is the difference between the durability and serviceability quality dimensions?
• What does the perception quality dimension refer to? • How can you satisfy this quality requirement?
CIS 3760
Software Engineering
30

Additional Materials
31

Quality & Sustainable Software Unsustainable software:
“Software with high cost of change, that becomes increasingly unmaintainable, and where every change has the risk of destabilizing the product…teams tend to spend an ever increasing amount of time fixing defects and stabilizing the software.”
Producing sustainable software:
• Establish clear user need and vision, so it is clear what is to be built
• Continual refinement of product and project practices
• Close relationship with users so they can provide timely feedback
• A working product at all times
• Continual investment in and emphasis on design
• Value defect prevention over defect detection
CIS 3760
Software Engineering
32
Tate, K. “Sustainable Software Development: An Agile Perspective”, Addison Wesley


Process and Practices

Quality control

Quality assurance
Achieving Software Quality
– Enforce good project management and design and engineering best practices
– Includeexplicittechniquesforqualityandchangemanagement
– Understandtheproblemtobesolved
– Testing(verificationandvalidation) – Inspections and reviews
 Create quality design, eliminate architectural flaws
– auditingandreportingprocedures
– provide management with data needed to make proactive decisions
CIS 3760
Software Engineering
33
Slides adapted from Pressman, McGraw-Hill online resources

Dimensions of Quality I
From Garvin, D. “Competing on the Eight Dimensions of Quality”. Harvard Business Review. Nov 1987.
1. PerformanceQuality.Doesthesoftwaredelivercontent, functions, and features specified in a way that provides value to the end-user?
2. Feature quality. Does the software provide features that surprise and delight first-time end-users?
3. Reliability.Featuresandcapabilitydeliveredwithoutfailure? available when needed? functionality that is error free?
4. Conformance.Conformtorelevantsoftwarestandardsor design and coding conventions?
– UIdesignconventionsforexample,e.g.Apple’siOSHuman Interface Guidelines https://developer.apple.com/ios/human-interface-
guidelines/overview/design-principles/
CIS 3760
Software Engineering
34
Slides adapted from Pressman, McGraw-Hill online resources

Dimensions of Quality II
From Garvin, D. “Competing on the Eight Dimensions of Quality”. Harvard Business Review. Nov 1987.
5. Durability.Canthesoftwarebemaintained(changed)or corrected (debugged) without generation of unintended side effects? Will changes cause the error rate or reliability to degrade with time?
6. Serviceability.Canthesoftwarebemaintained(changed) or corrected (debugged) in an acceptably short time period. Can support staff acquire all information they need to make changes or correct defects?
7. Aesthetics. Elegance, flow
8. Perception.Pastassociationsandexperiencescan
influence perception of quality.
CIS 3760
Software Engineering
35
Slides adapted from Pressman, McGraw-Hill online resources