• No results found

Lecture 19 (1)

N/A
N/A
Protected

Academic year: 2020

Share "Lecture 19 (1)"

Copied!
32
0
0

Loading.... (view fulltext now)

Full text

(1)

Software Quality Engineering

BS(SE)-VI

Dr. Assad Abbas

Department of Computer Science

(2)

Topics

n Quality in Software Construction and Coding

n Coding Standards

(3)

Introduction

n

The term

software construction

refers to

the detailed

creation of working software

through a combination of coding, verification,

unit testing, integration testing, and

(4)

Introduction

n

Software construction

closely tied

to

5

Software design

5

Software testing

(5)
(6)

Introduction

n Software construction typically produces the highest number

of configuration items that need to be managed in a software project (source files, documentation, test cases, and so on).

n Thus, the Software Construction is also closely linked to the

(7)

Introduction

n Construction is tool intensive.

n Quality (or lack thereof) is very evident in the construction

products.

n Construction is highly related to technical Computer Science

capabilities due to

5 Use of algorithms

(8)
(9)

Why should you care about code Quality?

n The developers use different jargons.

n Readability: Make the code more readable and easier to comprehend for everyone working on the project. It’s much

harder to read and understand a bad quality code than to write it.

n Maintainability: It’s easier, safer and less time consuming to

maintain and test quality code.

n Lower technical debt: Good quality code can speed up

long-term software development since it can be reused and

developers don’t have to spend that much time fixing old bugs and polishing code. It also makes it easier for new project

(10)

Relationship with Software Quality

n Weinberg has identified four targets which a good program

should meet:

5 Does a program meet its specification; "correct output for each possible input"?

5 Is the program produced on schedule (and within budget)?

5 How adaptable is the program to cope with changing requirements?

(11)

What’s Wrong With Software Construction?

n Historically a “write-only” exercise: If it doesn’t break, no one

else reads it.

n Ad-hoc or absent standards.

n Testing as a separate exercise.

n Re-work (patch) to fix defects (“bugs”). n Features take precedence over quality. n Definition of quality is not rigorous.

(12)

What’s Missing in Software Construction?

n

If we built buildings this way….

n

They might not stay standing!!

09/22/2020

(13)

Buildings are not built this way, Building construction has Standards!

n Typical Building Requirements:

5 Building Heights and Areas

5 Types of Construction

5 Soils and Foundations

5 Fire-Resistance and Fire Protection Systems

5 Means of Egress

5 Accessibility

5 Interior Finishes and Environment

5 Energy Efficiency

5 Exterior Walls

5 Roof Assemblies

5 Rooftop Structures

5 Structural Design

5 Materials (Concrete, Steel, Wood, etc.)

(14)

Missing: the “Building Code” for software

n There is a lack of uniformity and standards.

n Historically, these are created in an ad hoc manner

by each organization.

n There is no penalty for inadequate standards.

n Best practices are often discarded under cost and

(15)

How Do We Fix This?

n We must identify and implement industry best practices. n We must enforce best practices

5 Rules

5 Requirements

n This is the way to make sure our software doesn’t burn up or

(16)

Growth of code—and complexity

• Software projects can be too complex .

• Successful software projects must control that complexity.

(17)

Construction Guidelines in Brief

n

A general overview of all of the above:

5

Know what the code block must perform

5

Maintain naming conventions which are uniform

throughout.

5

Indicate a brief description of what a variable is for

(reference to commenting)

5

Correct errors as they occur.

(18)
(19)
(20)

Software Construction Fundamentals

n Minimizing complexity n Anticipating change

n Constructing for verification n Reuse

(21)

Minimizing Complexity

n Humans are severely limited in ability to hold complex information in their working memories.

n As a result, minimizing complexity is one of the strongest drivers in software construction.

n Need to reduce complexity throughout the lifecycle.

n As functionality increases, so does complexity.

n Accomplished through use of standards.

5 Examples:

g J2EE for complex, distributed Java applications.

g UML for modeling all aspects of complex systems.

g High-order programming languages such as C++ and Java.

(22)

Anticipating Change

n Software changes over time.

n Anticipation of change affect how software is constructed. n This can effect

5 Use of control structures.

5 Handling of errors.

5 Source code organization.

5 Code documentation.

(23)

Constructing for Verification

n Construct software that allows bugs to be easily found and

fixed.

n Examples:

5 Enforce coding standards.

g Helps support code reviews

5 Unit testing.

5 Organizing code to support automated testing.

(24)

Reuse

n Reuse refers to using existing assets in solving different

problems.

5 In software construction, typical assets that are reused include libraries, modules, components, source code, and commercial off-the-shelf (COTS) assets.

n Reuse is best practiced systematically, according to a

well-defined, repeatable process.

n Systematic reuse can enable significant software productivity,

(25)

Standards in Construction

n Standards which directly affect construction issues include:

5 Programming languages

g E.g. standards for languages like Java and C++

5 Communication methods

g E.g. standards for document formats and contents

uCSV or XML, SOAP web services or HTTP POST

5 Platforms

g E.g. programmer interface standards for operating system calls, J2EE

5 Tools

g E.g. diagrammatic standards for notations like the Unified Modeling

(26)

Tasks Involved in Software Construction

n Verifying that the groundwork has been laid so that construction can

proceed successfully.

n Determining how your code will be tested.

n Designing and writing classes and routines.

n Creating and naming variables and named constants.

n Selecting control structures and organizing blocks of statements.

n Unit testing, integration testing, and debugging your own code.

n Reviewing other team members’ low-level designs and code and

having them review yours.

n Polishing code by carefully formatting and commenting it.

(27)
(28)
(29)
(30)
(31)

Inspection Error Checklist…

(32)

References

1. The Art of Software Testing. Glenford J. Myers. John Wiley & Sons, Inc.

2004.

References

Related documents

education, and consumer engagement in health care might look to national standards that measure and evaluate health literacy accommodations among providers and health plans.. The

SINGLE FAMILY DWELLING... SIDE & REAR YARD

Furthermore, to test the possibility that the chloramphenicol concentration used in the previous attempts of isolating a resistant strain were too high (20µg /ml), cells were

This paper examines relationship quality as a multidimensional metaconstruct comprising three dimensions; satisfaction, trust and commitment. The role of relationship quality in

Th is guide will provide you with useful information about the con- struction process and tips to keep your business going during the life of the project.. Major construction

The aim of this Confe rence is to bring together specialists from several distinct areas of the legal discipline including but not limited to: international law, European

PROCESS FOR REVISING POs Inputs from stakeholders Department Committee BOS Academic Council Governing Council Department Vision, Mission and P E O Existing POs 74

This paper examines the relationships between the energy consumption and GDP growth from one hand and emission and energy consumption from the other hand by the use