Software Engineering 1 Module
Software Engineering 1 Module
Software Engineering 1 Module
1
Week 1: The Scope of Software Engineering
Introduction
The term software engineering is composed of two words, software and engineering.
Software is more than just a program code. A program is an executable code, which serves
some computational purpose. Software is considered to be a collection of executable
programming code, associated libraries and documentations. Software, when made for a
specific requirement is called software product. Engineering on the other hand, is all about
developing products, using well-defined, scientific principles and methods. So, we can
define software engineering as an engineering branch associated with the development of
software product using well-defined scientific principles, methods and procedures.
The outcome of software engineering is an efficient and reliable software product. IEEE
defines software engineering as: The application of a systematic, disciplined, quantifiable
approach to the development, operation and maintenance of software. We can alternatively
view it as a systematic collection of past experience. The experience is arranged in the form
of methodologies and guidelines. A small program can be written without using software
engineering principles. But if one wants to develop a large software product, then software
engineering principles are absolutely necessary to achieve a good quality software cost
effectively. Without using software engineering principles it would be difficult to develop
large programs. In industry it is usually needed to develop large programs to accommodate
multiple functions. A problem with developing such large commercial programs is that the
complexity and difficulty levels of the programs increase exponentially with their sizes.
Software engineering helps to reduce this programming complexity. Software engineering
principles use two important techniques to reduce problem complexity: abstraction and
decomposition.
The principle of abstraction implies that a problem can be simplified by omitting irrelevant
details. In other words, the main purpose of abstraction is to consider only those aspects of
the problem that are relevant for certain purpose and suppress other aspects that are not
relevant for the given purpose. Once the simpler problem is solved, then the omitted details
can be taken into consideration to solve the next lower level abstraction, and so on.
Course Module
CS-6209 Software Engineering 1
2
Week 1: The Scope of Software Engineering
Abstraction is a powerful way of reducing the complexity of the problem. The other
approach to tackle problem complexity is DEPT OF CSE & IT VSSUT, Burla decomposition.
In this technique, a complex problem is divided into several smaller problems and then the
smaller problems are solved one by one. However, in this technique any random
decomposition of a problem into smaller parts will not help. The problem has to be
decomposed such that each component of the decomposed problem can be solved
independently and then the solution of the different components can be combined to get
the full solution.
Operational
Transitional
Maintenance
This tells us how well software works in operations. It can be measured on:
CS-6209 Software Engineering 1
3
Week 1: The Scope of Software Engineering
Budget
Usability
Efficiency
Correctness
Functionality
Dependability
Security
Safety Transitional
This aspect is important when the software is moved from one platform to another
Portability
Interoperability
Reusability
Adaptability
Maintenance
This aspect briefs about how well software has the capabilities to maintain itself in
the ever-changing environment:
Modularity
Maintainability
Flexibility
Scalability
Course Module
CS-6209 Software Engineering 1
4
Week 1: The Scope of Software Engineering
4. Batch processing systems. These are business systems that are designed
to process data in large batches. They process large numbers of
individual inputs to create corresponding outputs. Examples of batch
systems include periodic billing systems, such as phone billing systems,
and salary payment systems.
5. Entertainment system. These are systems that are primarily for personal
use and which are intended to entertain the user. Most of these systems
are games of one kind or another. The quality of the user interaction
offered is the most important distinguishing characteristic of
entertainment systems.
6. Systems for modeling and simulation. These are systems that are
developed by scientists and engineers to model physical processes or
situations, which include many, separate, interacting objects. These are
often computationally intensive and require high-performance parallel
systems for execution.
7. Data collection systems. These are systems that collect data from their
environment using a set of sensors and send that data to other systems
for processing. The software has to interact with sensors and often is
installed in a hostile environment such as inside an engine or in a
remote location.
CS-6209 Software Engineering 1
5
Week 1: The Scope of Software Engineering
Of course, the boundaries between these system types are blurred. If you
develop a game for a mobile (cell) phone, you have to take into account the
same constraints (power, hardware interaction) as the developers of the phone
software. Batch processing systems are often used in conjunction with web-
based systems. For example, in a company, travel expense claims may be
submitted through a web application but processed in a batch application for
monthly payment.
You use different software engineering techniques for each type of system
because the software has quite different characteristics. For example, an
embedded control system in an automobile is safety-critical and is burned into
ROM when installed in the vehicle. It is therefore very expensive to change.
Such a system needs very extensive verification and validation so that the
chances of having to recall cars after sale to fix software problems are
minimized. User interaction is minimal (or perhaps nonexistent) so there is no
need to use a development process that relies on user interface prototyping.
Course Module
CS-6209 Software Engineering 1
6
Week 1: The Scope of Software Engineering
It goes without saying that you should uphold normal standards of honesty
and integrity. You should not use your skills and abilities to behave in a
dishonest way or in a way that will bring disrepute to the software engineering
profession. However, there are areas where standards of acceptable behavior
are not bound by laws but by the more tenuous notion of professional
responsibility. Some of these are:
4. Computer misuse. You should not use your technical skills to misuse
other people’s computers. Computer misuse ranges from relatively
trivial (game playing on an employer’s machine, say) to extremely
serious (dissemination of viruses or other malware).
PREAMBLE
The short version of the code summarizes aspirations at a high level of the
abstraction; the clauses that are included in the full version give examples
and details of how these aspirations change the way we act as software
engineering professionals. Without the aspirations, the details can become
legalistic and tedious; without the details, the aspirations can become high
sounding but empty; together, the aspirations and the details form a
cohesive code.
PUBLIC — Software engineers shall act consistently with the public interest.
Professional associations, notably the ACM and the IEEE, have cooperated to
produce a joint code of ethics and professional practice. This code exists in both a
short form, shown in Figure 1.3, and a longer form (Gotterbarn et al., 1999) that
adds detail and substance to the shorter version. The rationale behind this code
is summarized in the first two paragraphs of the longer form:
The Code contains eight Principles related to the behaviour of and decisions made
by professional software engineers, including practitioners, educators, managers,
supervisors and policy makers, as well as trainees and students of the profession.
The Principles identify the ethically responsible relationships in which individuals,
groups, and organizations participate and the primary obligations within these
relationships. The Clauses of each Principle are illustrations of some of the
obligations included in these relationships. These obligations are founded in the
software engineer’s humanity, in special care owed to people affected by the work
of software engineers, and the unique elements of the practice of software
engineering. The Code prescribes these as obligations of anyone claiming to be or
aspiring to be a software engineer.
In any situation where different people have different views and objectives you
are likely to be faced with ethical dilemmas. For example, if you disagree, in
principle, with the policies of more senior management in the company, how
should you react? Clearly, this depends on the particular individuals and the
nature of the dis-agreement. Is it best to argue a case for your position from
within the organization or to resign in principle? If you feel that there are
problems with a software project, when do you reveal these to management? If
you discuss these while they are just a suspicion, you may be overreacting to a
situation; if you leave it too late, it may be impossible to resolve the difficulties.
Such ethical dilemmas face all of us in our professional lives and, fortunately, in
most cases they are either relatively minor or can be resolved without too much
difficulty. Where they cannot be resolved, the engineer is faced with, perhaps,
another problem. The principled action may be to resign from their job but this
may well affect others such as their partner or their children.
The problem here is that there are no absolutes when it comes to safety.
Although the system may not have been validated according to predefined
criteria, these criteria may be too strict. The system may actually operate safely
throughout its lifetime. It is also the case that, even when properly validated, the
system may fail and cause an accident. Early disclosure of problems may result in
damage to the employer and other employees; failure to disclose problems may
result in damage to others.
Course Module
CS-6209 Software Engineering 1
10
Week 1: The Scope of Software Engineering
You must make up your own mind in these matters. The appropriate ethical
position here depends entirely on the views of the individuals who are involved.
In this case, the potential for damage, the extent of the damage, and the people
affected by the damage should influence the decision. If the situation is very
dangerous, it may be justified to publicize it using the national press (say).
However, you should always try to resolve the situation while respecting the
rights of your employer.
In this situation, it is important that both employers and employees should make
their views known to each other in advance. Where an organization is involved in
military or nuclear work, they should be able to specify that employees must be
willing to accept any work assignment. Equally, if an employee is taken on and
makes clear that they do not wish to work on such systems, employers should
not put pressure on them to do so at some later date.
However, I find that this philosophical approach is too abstract and difficult to
relate to everyday experience. I prefer the more concrete approach embodied in
codes of conduct and practice. I think that ethics are best discussed in a software
engineering context and not as a subject in their own right. In this book,
therefore, I do not include abstract ethical discussions but, where appropriate,
include examples in the exercises that can be the starting point for a group
discussion on ethical issues.
CS-6209 Software Engineering 1
11
Week 1: The Scope of Software Engineering
Course Module
Week 001
The Scope of Software Engineering
Week 001: The Scope of Software Engineering
*Completed with
Faults, 49%
Horror Stories
• Patients died as a consequence of severe overdoses of radiation.
• US Treasury Department mailed incorrectly printed Social Security
Checks.
• Interest miscalculated on student loans resulting in higher monthly
payments.
• Mars Climate Orbiter spacecraft crashes into the surface of Mars
because of measurement conversion error.
• Projects take a long time and clients requirements change during process
• No longer from scratch - Reuse of existing products is widespread
Week 001: The Scope of Software Engineering
Post-Delivery Maintenance
The real-time world is constantly changing
Post-delivery Development
maintenance 25%
75%
Code of Ethics
Ethics – moral standards that help • Contribute to society and
guide your behavior, actions and human well being
choices • Avoid harm to others
The golden rule: Do unto others as • Be honest and trustworthy
you would have them do unto you • Honor property rights including
copyrights and patents
The slippery-slope rules: Be careful
starting down a path because one • Give proper credit for
you start you may not be able to stop intellectual property
• Access computing resources
Professional codes of conduct (ACM, only when authorized
IEEE)
• Respect privacy of others.
Week 001: The Scope of Software Engineering
Questions
• When is it better to find faults? (requirements, post-delivery
maintenance)
• You are in charge of computerizing the extraction process in a silver
refinery. The cost of development has been estimated to be $370,000.
Approximately how much additional cost will be needed for post-
delivery maintenance?
CS-6209 Software Engineering 1
1
Week 2: Software Engineering Principles
Introduction
Software engineering is concerned with all aspects of software production from the early
stages of system specification through to maintaining the system after it has been used.
As a discipline, software engineering has progressed very far in a very short period of time,
particularly when compared to classical engineering field (like civil or electrical
engineering). In the early days of computing, not more than 50 years ago, computerized
systems were quite small. Most of the programming was done by scientists trying to solve
specific, relatively small mathematical problems. Errors in those systems generally had
only “annoying” consequences to the mathematician who was trying to find “the answer.”
Today we often build monstrous systems, in terms of size and complexity.
Separation of Concerns
When specifying the behavior of a data structure component, there are often two
concerns that need to be dealt with: basic functionality and support for data
integrity. A data structure component is often easier to use if these two concerns are
divided as much as possible into separate sets of client functions. It is certainly
helpful to clients if the client documentation treats the two concerns separately.
Modularity
The principle of modularity is a specialization of the principle of separation of
concerns. Following the principle of modularity implies separating software into
components according to functionality and responsibility. It describes a
responsibility-driven methodology for modularization in an object-oriented context.
Course Module
CS-6209 Software Engineering 1
2
Week 2: Software Engineering Principles
Abstraction
The principle of abstraction is another specialization of the principle of separation
of concerns. Following the principle of abstraction implies separating the behavior
of software components from their implementation. It requires learning to look at
software and software components from two points of view: what it does, and how
it does it.
Anticipation of Change
Computer software is an automated solution to a problem. The problem arises in
some context or domain that is familiar to the users of the software. The domain
defines the types of data that the users need to work with and relationships
between the types of data.
Software developers, on the other hand, are familiar with a technology that deals
with data in an abstract way. They deal with structures and algorithms without
regard for the meaning or importance of the data that is involved. A software
developer can think in terms of graphs and graph algorithms without attaching
concrete meaning to vertices and edges.
The clients are learning to see the range of possible solutions that software
technology can provide. They are also learning to evaluate the possible solutions
with regard to their effectiveness in meeting the client’s needs.
Generality
The principle of generality is closely related to the principle of anticipation of
change. It is important in designing software that is free from unnatural
restrictions and limitations. One excellent example of an unnatural restriction or
limitation is the use of two digit year numbers, which has led to the "year 2000"
problem: software that will garble record keeping at the turn of the century.
Although the two-digit limitation appeared reasonable at the time, good software
frequently survives beyond its expected lifetime.
Incremental Development
An incremental software development process simplifies verification. If you develop
software by adding small increments of functionality, then, for verification, you only
need to deal with the added portion. If there are any errors detected, they are
already partly isolated so they are much easier to correct.
A carefully planned incremental development process can also ease the handling of
changes in requirements. To do this, the planning must identify use cases that are
most likely to be changed and put them towards the end of the development
process.
Consistency
The principle of consistency is a recognition of the fact that it is easier to do things
in a familiar context. For example, coding style is a consistent manner of laying out
code text. This serves two purposes. First, it makes reading the code easier. Second,
it allows programmers to automate part of the skills required in code entry, freeing
the programmer's mind to deal with more important issues.
Course Module
CS-6209 Software Engineering 1
4
Week 2: Software Engineering Principles
The fact that there is also a hands-on approach of applying existing plans
(development in this case) is simply similar to the fact that in other fields,
somebody else executes those plans (e.g., the construction worker).
It is true that most developers also carry software engineering tasks, and that our
education is often not in programming but rather in software engineering. So we get
our hands dirty whereas a civil engineer would not.
Information System
An Information System (IS) is a system composed of people and computers that
processes or interprets information. The term is also sometimes used in more
restricted senses, referring only to the software used to run a computerized
database or a computer system only.
The 6 components that must come together to produce an information system are:
Hardware
The term hardware refers to machinery. This category includes the computer itself,
which is often referred to as the central processing unit (CPU), and all of its support
equipment. Among the support equipment are input and output devices, storage
devices and communication devices.
Software
CS-6209 Software Engineering 1
5
Week 2: Software Engineering Principles
The term software refers to computer programs and the manuals (if any) that
support them. Computer programs are machine-readable instructions that direct
the circuitry within the hardware parts of the system to function in ways that
produce useful information from data.
Data
Data are facts that are used by programs to produce useful information. Like
programs, data are generally stored in machine-readable form on disk or tape until
the computer needs them.
Procedures
Procedures are the policies that govern the operation of a computer system.
"Procedures are to people what software is to hardware" is a common analogy that
is used to illustrate the role of procedures in a system.
People
Every system needs people if it is to be useful. Often, the most over-looked element
of the system is the people when in fact it is probably the component that
influences the success or failure of information systems the most. This includes not
only the users, but those who operate and service the computers, those who
maintain the data, and those who support the network of computers.
Feedback
It is another component of the IS, that defines that an IS may be provided with a
feedback.
Data is the bridge between Hardware and People. This means that the data we
collect is only data, until we involve people. At that point, data will be information.
Course Module
CS-6209 Software Engineering 1
6
Week 2: Software Engineering Principles
The image above is a four level pyramid model of different types of information
systems based on the different levels of hierarchy in an organization.
The "classic" view of Information systems found in the textbooks in the 1980s was
of a pyramid of systems that reflected the hierarchy of the organization. Usually,
transaction processing systems is at the bottom of the pyramid, followed by
management information systems, decision support systems, and ending with
executive information systems at the top. Although the pyramid model remains
useful, since it was first formulated a number of new technologies have been
developed and new categories of information systems have emerged, some of
which no longer fit easily into the original pyramid model.
Hardware- these are the devices like the monitor, processor, printer and
keyboard, all of which work together to accept, process, show data and
information.
Software- are the programs that allow the hardware to process the data.
Procedures- are the commands for combining the components above to process
information and produce the preferred output.
The first four components (hardware, software, database, and network) make up
what is known as the information technology platform. Information technology
workers could use these components to create information systems that watch over
safety measures, risk and the management of data. These actions are known as
information technology services.
Information gathering
Requirements specification for the new system
System design
System construction
System implementation
Review and maintenance
The CIO is the executive who is in charge of the IS function. In most organizations,
the CIO works with the chief executive officer (CEO), the chief financial officer
(CFO), and other senior executives. Therefore, he or she actively participates in the
organization's strategic planning process.
Salvatore March and Gerald Smith proposed a framework for researching different
aspects of Information Technology including outputs of the research (research
outputs) and activities to carry out this research (research activities). They
identified research outputs as follows:
Course Module
CS-6209 Software Engineering 1
10
Week 2: Software Engineering Principles
Overview
Tools
Methodologies
Methods
Techniques
Principles
Week 002: Software Engineering Principles
We Will Cover
• Rigor and Formality
• Separation of Concerns
• Modularity
• Abstraction
• Anticipation of Change
• Generality (?)
• Incrementality
Week 002: Software Engineering Principles
• Evident in
• Programming languages, design notations, requirements
specifications, process definitions
Week 002: Software Engineering Principles
Separation of Concerns
• We cannot deal with all aspects of a problem simultaneously
• One way to conquer complexity
• Separate issues and tasks
• Separate functionality from efficiency
• Requirements specification from design
• Various types of separation
• In terms of time
• In terms of qualities
• In terms of views of an artifact
Week 002: Software Engineering Principles
More on Separation
• By separating concerns we may miss out on optimizations
• True
• But, if we take a global view we may fail entirely!
• Separation of concerns allow separation of responsibilities
• Separation of managerial and technical issues
• Separation of requirements and design
Week 002: Software Engineering Principles
Modularity
• A complex system must be broken down into smaller modules
• Three goals with modularity
• Decomposability
• Break the system down into understandable modules
• Divide and conquer
• Composability
• Construct a system from smaller pieces
• Reuse, ease of maintenance, OO frameworks
Week 002: Software Engineering Principles
Modularity (continued)
• Ease of understanding
• The system will be changed; we must understand it
• Understand in pieces versus understanding the whole
Week 002: Software Engineering Principles
Abstraction
• Identify the important aspects and ignore the details
• Must have different abstractions of the same reality
• Provide different views
• Examples of abstraction
• Design notations
• Project planning
• Etc.
• Two key concepts
• Information hiding and data encapsulation
Week 002: Software Engineering Principles
Anticipation of Change
• Change is inevitable
• We might as well plan on it!
Generality (??)
• In every problem, attempt to find a more general solution
• General problem is often easier to solve
• A generalized solution may be reusable
• If you are lucky, you may even be able to buy instead of build
Incrementality
• Move towards the goal in increments
• Very difficult to have a “big bang” approach to anything
Concluding Remarks
• These fundamental principled guide all aspects of software development
• Remember
• Tools, methodologies, and techniques will evolve, the principles
remain the same
CS-6209 Software Engineering 1
1
Week 3: Technical Development
Introduction
Software development is a complicated process. It requires careful planning and execution
to meet the goals. Sometimes a developer must react quickly and aggressively to meet ever-
changing market demands. Maintaining software quality hinders fast-paced software
development, as many testing cycles are necessary to ensure quality products.
This chapter provides an introduction to the software development process. As you will
learn, there are many stages of any software development project. A commercial software
product is usually derived from market demands. Sales and marketing people have first-
hand knowledge of their customers’ requirements. Based upon these market requirements,
senior software developers create architecture for the products along with functional and
design specifications. Then the development process starts. After the initial development
phase, software testing begins, and many times it is done in parallel with the development
process. Documentation is also part of the development process because a product cannot
be brought to market without manuals. Once development and testing are done, the
software is released and the support cycle begins. This phase may include bug fixes and
new releases.
Requirement gathering
Writing functional specifications
Creating architecture and design documents
Implementation and coding
Testing and quality assurance
Software release
Documentation
Course Module
CS-6209 Software Engineering 1
2
Week 3: Technical Development
There may be many additional steps and stages depending upon the nature of the
software product. You may have to go through multiple cycles during the testing
phase as software testers find problems and bugs and developers fix them before a
software product is officially released. Let us go into some detail of these stages.
Requirement Gathering
Requirement gathering is usually the first part of any software product. This stage
starts when you are thinking about developing software. In this phase, you meet
customers or prospective customers, analyzing market requirements and features
that are in demand. You also find out if there is a real need in the market for the
software product you are trying to develop.
In this stage, marketing and sales people or people who have direct contact with the
customers do most of the work. These people talk to these customers and try to
understand what they need. A comprehensive understanding of the customers’
needs and writing down features of the proposed software product are the keys to
success in this phase. This phase is actually a base for the whole development effort.
If the base is not laid correctly, the product will not find a place in the market. If you
develop a very good software product which is not required in the market, it does
not matter how well you build it. You can find many stories about software products
that failed in the market because the customers did not require them. The marketing
people usually create a Marketing Requirement Document or MRD that contains
formal data representation of market data gathered.
Spend some time doing market research and analysis. Consider your competitors’
products (if any), a process called competitive analysis. List the features required by
the product. You should also think about the economics of software creation at this
point. Is there a market? Can I make money? Will the revenue justify the cost of
development?
Course Module
CS-6209 Software Engineering 1
3
Week 3: Technical Development
Course Module
CS-6209 Software Engineering 1
4
Week 3: Technical Development
Once components of the product have been decided and their functionality defined,
inter-faces are designed for these components to work together. In most cases, no
component works in isolation; each one has to coordinate with other components of
the product. Interfaces are the rules and regulations that define how these
components will interact with each other. There may be major problems down the
road if these interfaces are not designed properly and in a detailed way. Different
people will work on different components of any large software development
project and if they don’t fully understand how a particular component will
communicate with others, integration becomes a major problem.
For some products, new hardware is also required to make use of technology
advancements. The architects of the product also need to consider this aspect of the
product.
Course Module
CS-6209 Software Engineering 1
5
Week 3: Technical Development
After defining architecture, software components and their interfaces, the next
phase of development is the creation of design documents. At the architecture level,
a component is defined as a black box that provides certain functionality. At the
design documents stage, you have to define what is in that black box. Senior
software developers usually create design documents and these documents define
individual software components to the level of functions and procedures. The design
document is the last document completed before development of the software
begins. These design documents are passed on to software developers and they start
coding. Architecture documents and MRDs typically need to stay in sync, as sales
and marketing will work from MRDs while engineering works from engineering
documents.
eventually. Ten years after the initial work, you may find only that information
which is present inside the code in the form of comments.
Development tools also play an important role in this phase of the project. Good
development tools save a lot of time for the developers, as well as saving money in
terms of improved productivity. The most important development tools for time
saving are editors and debuggers. A good editor helps a developer to write code
quickly. A good debugger helps make the written code operational in a short period
of time. Before starting the coding process, you should spend some time choosing
good development tools.
Review meetings during the development phase also prove helpful. Potential
problems are caught earlier in the development. These meeting are also helpful to
keep track of whether the product is on time or if more effort is needed complete it
in the required time frame. Sometimes you may also need to make some changes in
the design of some components because of new requirements from the marketing
and sales people. Review meetings are a great tool to convey these new
requirements. Again, architecture documents and MRDs are kept in sync with any
changes/problems encountered during development.
Testing
Testing is probably the most important phase for long-term support as well as for
the reputation of the company. If you don’t control the quality of the software, it will
not be able to compete with other products on the market. If software crashes at the
customer site, your customer loses productivity as well money and you lose
credibility. Sometimes these losses are huge. Unhappy customers will not buy your
other products and will not refer other customers to you. You can avoid this
situation by doing extensive testing. This testing is referred to as Quality Assurance,
or QA, in most of the software world.
Usually testing start as soon as the initial parts of the software is available. There
are multiple types of testing and these are explained in this section. Each of these
has its own importance.
Unit Testing
Unit testing is testing one part or one component of the product. The developer
usually does this when he/she has completed writing code for that part of the
product. This makes sure that the component is doing what it is intended to do. This
also saves a lot of time for software testers as well as developers by eliminating
Course Module
CS-6209 Software Engineering 1
7
Week 3: Technical Development
many cycles of software being passed back and forth between the developer and the
tester.
When a developer is confident that a particular part of the software is ready, he/she
can write test cases to test functionality of this part of the software. The component
is then forwarded to the software testing people who run test cases to make sure
that the unit is working properly.
Sanity Testing
Sanity testing is a very basic check to see if all software components compile with
each other without a problem. This is just to make sure that developers have not
defined conflicting or multiple functions or global variable definitions.
The regression testing may be started as soon as some components are ready. This
testing process requires a very long period of time by its very nature. The process
should be continued as more components of the product are integrated. The
integration process and communication through interfaces may create new bugs in
the code.
Functional Testing
Functional testing is carried out to make sure that the software is doing exactly
what it is supposed to do. This type of testing is a must before any software is
released to customers. Functional testing is done by people whose primary job is
software testing, not the developers them-selves. In small software projects where a
company can’t afford dedicated testers, other developers may do functional testing
also. The key point to keep in mind is that the person who wrote a software
Course Module
CS-6209 Software Engineering 1
8
Week 3: Technical Development
component should not be the person who tested it. A developer will tend to test the
software the way he/she has written it. He/she may easily miss any problems in the
software.
The software testers need to prepare a testing plan for each component of the
software. A testing plan consists of test cases that are run on the software. The
software tester can prepare these test cases using functional specifications
documents. The tester may also get help from the developer to create test cases.
Each test case should include methodology used for testing and expected results.
In addition to test cases, the tester may also need to create a certain infrastructure
or environment to test the functionality of a piece of code. For example, you may
simulate a network to test routing algorithms that may be part of a routing product.
The next important job of the tester is to create a service request if an anomaly is
found. The tester should include as much information in the service request as
possible. Typical information included in reporting bugs includes:
Test case description
How the test was carried out
Expected results
Results obtained
If a particular environment was created for testing, a description of that
environment
The service request should be forwarded to the developer so that the developer may
correct the problem. Many software packages are available in the market to track
bugs and fix problems in software. There are many web-based tools as well. For a
list of freely available open source projects, go to http://www.osdn.org or
http://www.sourceforge.net and search for “bug track”. OSDN (Open Source
Developers Network) hosts many open source software development projects. You
can find software packages that work with CVS also.
Software Releases
Before you start selling any software product, it is officially released. This means
that you create a state of the software in your repository, make sure that it has been
tested for functionality and freeze the code. A version number is assigned to release
software. After releasing the software, development may continue but it will not
make any change in the released software. The development is usually carried on in
a new branch and it may contain new features of the product. The released software
is updated only if a bug fixed version is released.
Course Module
CS-6209 Software Engineering 1
9
Week 3: Technical Development
Branches
In almost all serious software development projects, a revision or version control
system is used. This version control system keeps a record of changes in source
code files and is usually built in a tree-like structure. When software is released, the
state of each file that is part of the release should be recorded. Future developments
are made by creating branches to this state. Sometimes special branches may also be
created that are solely used for bug fixing.
Release Notes
Every software version contains release notes. These release notes are prepared by
people releasing the software version with the help of developers. Release notes
show what happened in this software version. Typically the information includes:
Bug fixes
New functionality
Detail of new features added to the software
Any bugs that are not yet fixed
Future enhancements
Typically a user should be given enough information to understand the new release
enhancements and decide whether an upgrade is required or not.
Documentation
There are three broad categories of documentation related to software development
processes.
1. Technical documentation developed during the development process. This
includes architecture, functional and design documents.
Course Module
CS-6209 Software Engineering 1
10
Week 3: Technical Development
All three types of documents are necessary for different aspects of product support.
Technical documents are necessary for future development, bug fixes, and adding
new features. Technical documentation for technical support staff contains
information that is too complicated for the end user to understand and use. The
support staff needs this information in addition to user manuals to better support
customers. Finally each product must contain user manuals.
Technical writers usually develop user manuals which are based on functional
specifications. In the timelines of most software development projects, functional
specifications are pre-pared before code development starts. So the technical
writers can start writing user manuals while developers are writing code. By the
time the product is ready, most of the work on user manuals has already been
completed.
Your customers need support when you start selling a product. This is true
regardless of the size of the product, and even for products that are not software
related. Most common sup-port requests from customers are related to one of the
following:
In addition to that, you may also want to add new features to the product for the
next release because competitor products have other features. Better support will
increase your customer loyalty and will create referral business for you.
You may adopt two strategies to add new features. You may provide an upgrade to
the cur-rent release as a patch, or wait until you have compiled and developed a list
of new features and make a new version. Both of these strategies are useful
depending how urgent the requirement for new features is.
Course Module
CS-6209 Software Engineering 1
11
Week 3: Technical Development
Let us take a closer look on these components and what role they play in the
development cycle.
Hardware Platform
This is the tangible part of the development system. A hardware platform is the
choice of your hardware, PC or workstation, for the development system. You can
choose a particular hardware platform depending upon different factors as listed
below:
Course Module
CS-6209 Software Engineering 1
12
Week 3: Technical Development
Depending upon these factors, you may make a choice from the available hardware
plat-forms for development.
If hardware is part of the final product, selection of hardware platform also depends
upon customer/market requirement.
Operating System
Choice of a particular operating system may be made depending upon:
Cost
Availability of development tools
Hardware platform
Native or cross compiling
Some operating systems are cheaper than others. Linux is an excellent choice, as far
as cost is concerned. Linux is also a very good operating system as it has all of the
development tools available. Now you can install Linux on high-end workstations
from Sun Microsystems, HP, and IBM as well as commodity PC hardware available
everywhere. It provides stability and most of the people are familiar with
development tools. You can also use the operating system for cross-platform
development using GNU tools.
Editors
Editors play an important role in the development work. Easy-to-use and feature
rich editors, like Emacs, increase developers’ productivity. You should look at a few
things while selecting editors. These features include:
Understanding syntax of language
Collapsing of context
Support of tags
Opening multiple files
Easy editing for generally used editing functions like cut, copy, paste, search,
replace and so on
Multiple windows
Support of user defined functions and macros
If you look at the open source community, you can find a lot of good editors
available to developers. The most commonly used editors are Jed, Emacs and
Xemacs. However, many other variants of these editors are also available. You can
also use X-Windows-based editors available on Linux platform. A lot of people also
edit in vi or vim, both of these have been very popular historically.
Course Module
CS-6209 Software Engineering 1
13
Week 3: Technical Development
C
C++
Java
Fortran
In addition to GCC, you can find a lot of other open source compilers available for
Linux.
GNU utilities set, also known as binutils, include GNU assembler and other utilities
that can be used for many tasks. GNU assembler is used whenever you compile a
program using GNU compiler.
Debuggers
Debuggers are the also an important part of all development systems. You can’t
write a program that is free of bugs. Debugging is a continuous part of software
development and you need good tools for this purpose. GNU debugger, more
commonly known as GDB, is a common debugger. Many other debuggers are also
built on this debugger. The GNU debugger and some other debuggers will be
introduced later in this book.
Course Module
CS-6209 Software Engineering 1
14
Week 3: Technical Development
When multiple developers are modifying the same file at the same time, conflict may
occur between different changes made by multiple developers. When a conflict is
detected in the files being checked in, CVS provides a mechanism to merge the files
appropriately.
CVS can be used over secure links as well. This is required when developers are not
physically located at the same place. A server on the Internet can be used to provide
secure access to the central software repository.
There are other version control systems as well which are popular in the software
development community. Examples are Aegis, PRCS, RCS and SCCS.
X-Windows
X-Windows is much more than just a GUI interface on Linux, but for development
purposes, it provides a very good user interface. This is especially useful for editors
like Emacs.
Miscellaneous Tools
Many miscellaneous tools are also important during the development process. Some
of these tools are listed below:
PCs and workstations for developers. There is no hard and fast rule about how to
select a particular hardware platform. It depends upon the requirements of a
development project. Some factors that you may keep in mind are as follows:
There may be other factors as well and you are the best person to judge what you
need. However, keep in mind that reliability of hardware is one major factor that
people usually over-look. If you buy cheap systems that decrease productivity of
developers, you lose a lot of money.
Course Module
CS-6209 Software Engineering 1
16
Week 3: Technical Development
Senior managers who often push to complete the project earlier than the
deadline.
Coordinating all of these parties is not an easy task. The manager has to convince
senior management that a new feature needs that much time for development. At
the same time he has to push developers to meet the deadlines. Some of the
important tasks of software management in a real-life project are as follows.
Creating Deadlines
The manager usually coordinates with the software developers to set reasonable
dead-lines for certain features. These deadlines must conform to the product
delivery time lines. The manager may have to arrange additional resources to
complete feature development in the allotted time.
Project management software can help a manager to set and meet deadlines and
track completion of different components.
The manager has to keep track of how development among different parts of the
software is going on. If part of the product is behind schedule, she has to re-arrange
resources to get it back on track.. She may also need to hire new people to finish the
development of a particular component on schedule.
Resolving Dependencies
Usually software components are dependent on one another. If the development of
one component is lagging behind, it may affect development of other components.
The development manager needs to keep an eye on these dependencies and how
these may affect the over-all progress of the project. Well-known project
management methods are usually helpful for this task.
Course Module
CS-6209 Software Engineering 1
17
Week 3: Technical Development
Course Module
Week 003
Technical Development
Week 003: Technical Development
• Requirement gathering
• Writing functional specifications
• Creating architecture and design documents
• Implementation and coding
• Testing and quality assurance
• Software release
• Documentation
• Support and new features
Week 003: Technical Development
Requirements Gathering
Requirement gathering is usually the first part of any software product.
This stage starts when you are thinking about developing software. In this
phase, you meet customers or prospective customers, analyzing market
requirements and features that are in demand.
You also find out if there is a real need in the market for the software
product you are trying to develop.
Week 003: Technical Development
Task Classification
• Is the Task a set of sequential steps or is it a rapidly overlaying series of
sub-tasks?
Coding
• Coding is undertaken once the design phase is complete and the
design documents have been successfully reviewed. In the coding
phase, every module identified and specified in the design document
is independently coded and unit tested.
• The input to the coding phase is the design document.
• During the coding phase, different modules identified in the design
document are coded according to the respective module
specifications.
Week 003: Technical Development
Programming practice
• The primary goal of the coding phase is to translate the given design
into source code in a given programming language, so that the code
is simple easy to test and easy to understand and modify.
• So now we will discuss some concepts related to coding in a
language independent manner.
Week 003: Technical Development
Information hiding
• Information hiding can reduce the coupling between modules and
make the system more maintainable.
• Information hiding is also an effective tool for managing the
complexity of developing software.
• Another form of information hiding is to let a module see only those
data items needed by it.
Week 003: Technical Development
Internal documentation
• Internal documentation of the program is done by the use of
comments. All languages provide a means for writing comments
in program. Comments are textual statements that are meant for
the program reader and are not executed.
Week 003: Technical Development
Coding Standards
• General coding standards pertain to how the developer writes code,
so here we will discuss some important standard regardless of the
programming language being used.
Indentation
• Proper and consistent indentation is important in producing easy to
read and maintainable programs. Indentation should be used to:
• Emphasize the body of a control statement such as a loop or a select
statement
• Emphasize the body of a conditional statement Emphasize a
new scope block
Week 003: Technical Development
Inline Comments
• Inline comments explaining the functioning of the subroutine or key
aspects of the algorithm shall be frequently used.
Structured Programming
• Structured (or modular) programming techniques shall be used. GO
TO statements shall not be used as they lead to “spaghetti” code,
which is hard to read and maintain, except as outlined in the
FORTRAN Standards and Guidelines.
Week 003: Technical Development
Source File
• The name of the source file or script shall represent its function. All of
the routines in a file shall have a common purpose.
Variable Names
• Variable shall have mnemonic or meaningful names that convey to a
casual observer, the intent of its use. Variables shall be initialized prior
to its first use.
Week 003: Technical Development
Coding Guidelines
• General coding guidelines provide the programmer with a set of best
practices which can be used to make programs easier to read and
maintain.
• Most of the examples use the C language syntax but the guidelines
can be applied to all languages.
Week 003: Technical Development
Line Length
• It is considered good practice to keep the lengths of source code lines
at or below 80 characters. Lines longer than this may not be
displayed properly on some terminals and tools. Some printers will
truncate lines longer than 80 columns.
Week 003: Technical Development
Spacing
The proper use of spaces within a line of code can enhance readability.
Example:
Bad:
cost=price+(price*sales_tax);
fprintf(stdout ,“The total cost is %5.2f\n”,cost);
Better:
cost = price + ( price * sales_tax );
fprintf (stdout, “The total cost is %5.2f\n”, cost) ;
Week 003: Technical Development
Wrapping Lines
When an expression will not fit on a single line, break it according to these following
principles:
• Break after a comma
Example:
Bad:
longName1 = longName2 * (longName3 + LongName4 –
longName5) + 4 * longName6 ;
Better:
longName1 = longName2 * (longName3 + LongName4 – LongName5)
+ 4 * longName6 ;
Week 003: Technical Development
Variable Declarations
Variable declarations that span multiple lines should always be preceded
by a type.
Example: Acceptable:
int price , score ;
Acceptable:
int price ; int score ;
Not Acceptable:
int price , score ;
CS-6209 Software Engineering 1
1
Week 4: Software Project Management
Introduction
Project management has been practiced since early civilization. Until the beginning of
twentieth century civil engineering projects were actually treated as projects and were
generally managed by creative architects and engineers. Project management as a
discipline was not accepted. It was in the 1950s that organizations started to systematically
apply project management tools and techniques to complex projects. As a discipline,
Project Management developed from several fields of application including construction,
engineering, and defense activity. Two forefathers of project management are commonly
known: Henry Gantt, called the father of planning and control techniques who is famous for
his use of the Gantt chart as a project management tool; and Henri Fayol for his creation of
the five management functions which form the foundation of the body of knowledge
associated with project and program management. The 1950s marked the beginning of the
modern Project Management era. Project management became recognized as a distinct
discipline arising from the management discipline.
What is a Project?
All of us have been involved in projects, whether they be our personal projects or in
business and industry. Examples of typical projects are for example:
Personal projects:
obtaining an MCA degree
writing a report
planning a party
planting a garden
Industrial projects:
Course Module
CS-6209 Software Engineering 1
2
Week 4: Software Project Management
Construction of a building
Provide electricity to an industrial estate
Building a bridge
Designing a new airplane
Projects can be of any size and duration. They can be simple, like planning a party,
or complex like launching a space shuttle.
Project Definition:
A project can be defined in many ways :
Finally, every project creates a unique product or service. This is the deliverable for
the project and the reason, why that project was undertaken.
Project Attributes
Projects come in all shapes and sizes. The following attributes help us to define a
project further:
decisions that must be made in planning and building a new house. It works
best to draft preliminary plans for owners to approve before more detailed
plans are developed.
Project Constraints
Like any human undertaking, projects need to be performed and delivered under
certain constraints. Traditionally, these constraints have been listed as scope, time,
and cost. These are also referred to as the Project Management Triangle, where each
side represents a constraint. One side of the triangle cannot be changed without
impacting the others. A further refinement of the constraints separates product
'quality' or 'performance' from scope, and turns quality into a fourth constraint.
The time constraint refers to the amount of time available to complete a project. The
cost constraint refers to the budgeted amount available for the project. The scope
constraint refers to what must be done to produce the project's end result. These
three constraints are often competing constraints: increased scope typically means
increased time and increased cost, a tight time constraint could mean increased
costs and reduced scope, and a tight budget could mean increased time and reduced
scope.
The discipline of project management is about providing the tools and techniques
that enable the project team (not just the project manager) to organize their work to
meet these constraints.
Time:
For analytical purposes, the time required to produce a product or service is
estimated using several techniques. One method is to identify tasks needed to
produce the deliverables documented in a work breakdown structure or WBS. The
work effort for each task is estimated and those estimates are rolled up into the final
deliverable estimate.
The tasks are also prioritized, dependencies between tasks are identified, and this
information is documented in a project schedule. The dependencies between the
tasks can affect the length of the overall project (dependency constraint), as can the
availability of resources (resource constraint). Time is not considered as cost nor a
resource since the project manager cannot control the rate at which it is expended.
This makes it different from all other resources and cost categories.
Cost:
Cost to develop a project depends on several variables including: labor rates,
material rates, risk management, plant (buildings, machines, etc.), equipment, and
profit. When hiring an independent consultant for a project, cost will typically be
determined by the consultant's or firm's per diem rate multiplied by an estimated
quantity for completion.
Scope:
Scope is requirement specified for the end result. The overall definition of what the
project is supposed to accomplish, and a specific description of what the end result
should be or accomplish can be said to be the scope of the project. A major
Course Module
CS-6209 Software Engineering 1
5
Week 4: Software Project Management
component of scope is the quality of the final product. The amount of time put into
individual tasks determines the overall quality of the project. Some tasks may
require a given amount of time to complete adequately, but given more time could
be completed exceptionally. Over the course of a large project, quality can have a
significant impact on time and cost or vice versa.
Together, these three constraints viz. Scope, Schedule & Resources have given rise
to the phrase "On Time, On Spec, On Budget". In this case, the term "scope" is
substituted with "spec(ification)"
Knowledge, skills, goals and personalities are the factors that need to be considered
within project management. The project manager and his/her team should
collectively possess the necessary and requisite interpersonal and technical skills to
facilitate control over the various activities within the project.
Projects normally involve the introduction of a new system of some kind and, in
almost all cases, new methods and ways of doing things. This impacts the work of
others: the "users". User interaction is an important factor in the success of projects
and, indeed, the degree of user involvement can influence the extent of support for
the project or its implementation plan. A project manager is the one who is
responsible for establishing a communication in between the project team and the
user. Thus one of the most essential quality of the project manager is that of being a
good communicator, not just within the project team itself, but with the rest of the
organization and outside world as well.
Course Module
CS-6209 Software Engineering 1
6
Week 4: Software Project Management
Features of projects:
Projects are often carried out by a team of people who have been assembled for that
specific purpose. The activities of this team may be co-ordinated by a project
manager.
Project teams may consist of people from different backgrounds and different parts
of the organization. In some cases project teams may consist of people from
different organizations.
Project teams may be inter-disciplinary groups and are likely to lie outside the
normal organization hierarchies.
The project team will be responsible for delivery of the project end product to some
sponsor within or outside the organization. The full benefit of any project will not
become available until the project has been completed.
Project Classification:
In recent years more and more activities have been tackled on a project basis.
Project teams and a project management approach have become common in most
organizations. The basic approaches to project management remain the same
regardless of the type of project being considered. You may find it useful to consider
projects in relation to a number of major classifications:
Course Module
CS-6209 Software Engineering 1
7
Week 4: Software Project Management
Course Module
CS-6209 Software Engineering 1
8
Week 4: Software Project Management
Course Module
CS-6209 Software Engineering 1
9
Week 4: Software Project Management
Some of the factors that influence projects and may help them succeed are
Executive Support
User involvement
Experienced project managers
Limited scope
Clear basic requirements
Formal methodology
Reliable estimates
In whatever field, a successful project manager must be able to envisage the entire
project from start to finish and to have the ability to ensure that this vision is
realized.
When they are appointed, project managers should be given terms of reference that
define their:
Objectives;
Responsibilities;
Limits of authority.
Project Initiation:
The initiation stage determines the nature and scope of the development. If this
stage is not performed well, it is unlikely that the project will be successful in
Course Module
CS-6209 Software Engineering 1
11
Week 4: Software Project Management
meeting the business’s needs. The key project controls needed here are an
understanding of the business environment and making sure that all necessary
controls are incorporated into the project. Any deficiencies should be reported and a
recommendation should be made to fix them.
The initiation stage should include a plan that encompasses the following areas:
Analyzing the business needs/requirements in measurable goals.
Reviewing of the current operations.
Conceptual design of the operation of the final product.
Equipment and contracting requirements including an assessment
of long lead time items.
Financial analysis of the costs and benefits including a budget.
Stakeholder analysis, including users, and support personnel for
the project.
Project charter including costs, tasks, deliverables, and schedule.
Course Module
CS-6209 Software Engineering 1
12
Week 4: Software Project Management
In this stage, auditors should pay attention to how effectively and quickly user
problems are resolved.
Over the course of any IT project, the work scope may change. Change is normal and
expected part of the process. Changes can be the result of necessary design
modifications, differing site conditions, material availability, client-requested
changes, value engineering and impacts from third parties, to name a few. Beyond
executing the change in the field, the change normally needs to be documented to
show what was actually developed. This is referred to as Change Management.
Hence, the owner usually requires a final record to show all changes or, more
specifically, any change that modifies the tangible portions of the finished work. The
record is made on the contract documents – usually, but not necessarily limited to,
the design drawings. The end product of this effort is what the industry terms as-
built drawings, or more simply, “as built.”
When changes are introduced to the project, the viability of the project has to be re-
assessed. It is important not to lose sight of the initial goals and targets of the
projects. When the changes accumulate, the forecasted result may not justify the
original proposed investment in the project.
Closure:
Closing includes the formal acceptance of the project and the ending
thereof. Administrative activities include the archiving of the files and
documenting lessons learned.
This phase consists of:
Project close: Finalize all activities across all of the process groups
to formally close the project or a project phase.
Contract closure: Complete and settle each contract (including the
resolution of any open items) and close each contract applicable to
the project or project phase.
Sample Questions
1. Why is there a new or renewed interest in the field of project
management?
2. What is a project, and what are its main attributes? How is a project
different from what most people do in their day-to-day jobs? What
is the triple constraint?
3. What is project management? Briefly describe the project
management framework, providing examples of stakeholders,
knowledge areas, tools and techniques, and project success factors.
Course Module
CS-6209 Software Engineering 1
14
Week 4: Software Project Management
Course Module
Week 004
Software Project Management
Week 004: Software Project Management
Lecture Outline
• What is a Project
• Details relevant to Project
• What is Project Management
• Details relevant to Project Management
• What is Software Project Management
• Details relevant to Software Project Management
Week 004: Software Project Management
What is a Project ?
• PMI definition
• It is a temporary endeavor (having specific start and completion
dates) undertaken to create a unique product or service
Week 004: Software Project Management
• Unique
• means that the product or service is different in some
distinguishing way from all similar products or services
Week 004: Software Project Management
Projects
• Projects may involve a single person or thousands
• Projects may be completed in hours, several months or years
• Examples of projects
• Developing a new product or service
• Designing a new vehicle
• Constructing a building
• Running a campaign for political office
• Implementing a new business procedure or process
• And so on …
Week 004: Software Project Management
It is the discipline of
planning, organizing, and managing resources
to bring about the successful completion of
specific project goals and objectives
Week 004: Software Project Management
Project Management
• Following are related to Project Management
• Professional Organizations
Project Management Institute (PMI) (pmi.org)
Software Engineering Institute (SEI)
IEEE Software Engineering Group
• Certifications
PMI’s PMP (Project Management Professional)
• The “PMBOK” – PMI Body of Knowledge
• Tools
MS Project
Primavera Project Manager
Week 004: Software Project Management
Project Management
Project Management Skills
• Leadership
• Communications
• Problem Solving
• Negotiating
• Influencing the Organization
• Mentoring
• Process and technical expertise
Week 004: Software Project Management
Project Management
Project Manager Positions
• Project Administrator / Coordinator
• Assistant Project Manager
• Project Manager / Program Manager
• Executive Program Manager
• V.P. Program Development
Week 004: Software Project Management
Project
Management
Software
Project
Management
Week 004: Software Project Management
Project Planning
• Its purpose is to identify the
• scope of the project,
• estimate the work involved,
• and create a project schedule.
• Project planning begins with requirements that define the software to
be developed.
• The project plan is then developed to describe the tasks that will lead
to completion
Week 004: Software Project Management
Introduction
Computers and software are ubiquitous. Mostly they are embedded and we don’t even
realize where and how we depend on software. We might accept it or not, but software is
governing our world and society and will continue further on. It is difficult to imagine our
world without software. There would be no running water, food supplies, business or
transportation would disrupt immediately, diseases would spread, and security would be
dramatically reduced – in short, our society would disintegrate rapidly. A key reason our
planet can bear over six billion people is software. Since software is so ubiquitous, we need
to stay in control. We have to make sure that the systems and their software run as we
intend – or better. Only if software has the right quality, we will stay in control and not
suddenly realize that things are going awfully wrong. Software quality management is the
discipline that ensures that the software we are using and depending upon is of right
quality. Only with solid under- standing and discipline in software quality management, we
will effectively stay in control.
What exactly is software quality management? To address this question we first need to
define the term “quality”. Quality is the ability of a set of inherent characteristics of a
product, service, product component, or process to fulfill requirements of customers [1].
From a management and controlling perspective quality is the degree to which a set of
inherent characteristics fulfills requirements. Quality management is the sum of all planned
systematic activities and processes for creating, controlling and assuring quality [1]. Fig. 1
indicates how quality management relates to the typical product development. We have
used a V-type visualization of the development process to illustrate that different quality
control techniques are applied to each level of abstraction from requirements engineering
to implementation. Quality control questions are mentioned on the right side. They are
addressed by techniques such as reviews or testing. Quality assurance questions are
mentioned in the middle. They are addressed by audits or sample checks. Quality
improvement questions are mentioned on the left side. They are addressed by dedicated
improvement projects and continuous improvement activities.
Course Module
CS-6209 Software Engineering 1
2
Week 6: Software Quality Management
Quality Concepts
The long-term profitability of a company is heavily impacted by the quality
perceived by customers. Customers view achieving the right balance of reliability,
market window of a product and cost as having the greatest effect on their long-
term link to a company. This has been long articulated, and applies in different
economies and circumstances. Even in restricted competitive situations, such as a
market with few dominant players (e.g., the operating system market of today or the
database market of few years ago), the principle applies and has given rise to open
source development. With the competitor being often only a mouse-click away,
today quality has even higher relevance. This applies to Web sites as well as to
commodity goods with either embedded or dedicated software deliveries. And the
principle certainly applies to investment goods, where suppliers are evaluated by a
long list of different quality attributes.
Yet there is a problem with quality in the software industry. By quality we mean the
bigger picture, such as delivering according to commitments. While solutions
abound, knowing which solutions work is the big question. What are the most
fundamental underlying principles in successful projects? What can be done right
now? What actually is good or better? What is good enough – considering the
immense market pressure and competition across the globe?
A simple – yet difficult to digest and implement – answer to these questions is that
software quality management is not simply a task, but rather a habit. It must be
engrained in the company culture. It is something that is visible in the way people
are working, independent on their role. It certainly means that every single person
in the organization sees quality as her own business not that of a quality manager or
a testing team. A simple yet effective test to quickly identify the state of practice
with respect to quality management is to ask around what quality means for an
employee and how he delivers ac- cording to this meaning. You will identify that
many see it as a bulky and formal approach to be done to achieve necessary
certificates. Few exceptions exist, such as industries with safety and health impacts.
But even there, you will find different approaches to quality, depending on culture.
Those with carrot and stick will not achieve a true quality culture. Quality is a habit.
It is driven by objectives and not based on believes. It is primarily achieved when
each person in the organization knows and is aware on her own role to deliver
quality.
Quality is implemented along the product life-cycle. Fig. 2 shows some pivotal
quality-related activities mapped to the major life-cycle phases. Note that on the left
side strategic directions are set and a respective management system is
implemented. Towards the right side, quality related processes, such as test or
supplier audits are implemented. During evolution of the product with dedicated
services and customer feedback, the product is further optimized and the
management system is adapted where necessary.
Course Module
CS-6209 Software Engineering 1
4
Week 6: Software Quality Management
A small example will illustrate this need. A software system might have strict
reliability constraints. Instead of simply stating that reliability should achieve less
than one failure per month in operation, which would be reactive, related quality
requirements should target underlying product and process needs to achieve such
reliability. During the strategy phase, the market or customer needs for reliability
need to be elicited. Is reliability important as an image or is it rather availability?
What is the perceived value of different failure rates? A next step is to determine
how these needs will be broken down to product features, components and
capabilities. Which architecture will deliver the desired re- liability and what are
cost impacts? What component and supplier qualification criteria need to be
established and maintained throughout the product life-cycle? Then the underlying
quality processes need to be determined. This should not be done ad-hoc and for
each single project individually but by tailoring organizational processes, such as
product life-cycle, project reviews, or testing to the specific needs of the product.
What test coverage is necessary and how will it be achieved? Which test equipment
and infrastructure for interoperability of components needs to be applied? What
checklists should be used in preparing for reviews and releases? These processes
need to be carefully applied during development. Quality control will be applied by
each single engineer and quality assurance will be done systematically for selected
processes and work products. Finally the evolution phase of the product needs to
establish criteria for service request management and assuring the right quality
level of follow-on releases and potential defect corrections. A key question to
address across all these phases is how to balance quality needs with necessary effort
and availability of skilled people. Both relate to business, but that is at times
overlooked. We have seen companies that due to cost and time constraints would
Course Module
CS-6209 Software Engineering 1
5
Week 6: Software Quality Management
The concept of process maturity is not new. Many of the established quality models
in manufacturing use the same concept. This was summarized by Philip Crosby in
his bestselling book “Quality is Free” in 1979. He found from his broad experiences
as a senior manager in different industries that business success depends on quality.
With practical insight and many concrete case studies he could empirically link
process performance to quality. His credo was stated as: “Quality is measured by the
cost of quality which is the expense of nonconformance – the cost of doing things
wrong.”
First organizations must know where they are; they need to assess their processes.
The more detailed the results from such an assessment, the easier and more
straightforward it is to establish a solid improvement plan. That was the basic idea
with the “maturity path” concept proposed by Crosby in the 1970s. He distinguishes
five maturity stages, namely
Stage 1: Uncertainty
Stage 2: Awakening
Stage 3: Enlightening
Stage 4: Wisdom
Stage 5: Certainty
Course Module
CS-6209 Software Engineering 1
6
Week 6: Software Quality Management
These four questions relate to the four basic quality management techniques of
prediction, detection, correction and prevention. The first step is to identify how
many defects there are and which of those defects are critical to product performance.
The underlying techniques are statistical methods of defect estimation, reliability
prediction and criticality assessment. These defects have to be detected by quality
control activities, such as inspections, reviews, unit test, etc. Each of these techniques
has their strengths and weaknesses which explains why they ought to be combined to
be most efficient. It is of not much value to spend loads of people on test, when in-depth
requirements reviews would be much faster and cheaper. Once defects are detected and
identified, the third step is to remove them. This sounds easier than it actually is due to
the many ripple effects each correction has to a system. Regression tests and reviews of
corrections are absolutely necessary to assure that quality won’t degrade with changes.
A final step is to embark on preventing these defects from re-occurring. Often engineers
and their management state that this actually should be the first and most relevant step.
We agree, but experience tells that again and again, people stumble across defect
avoidance simply because their processes won’t support it. In order to effectively avoid
defects engineering processes must be defined, systematically applied and
quantitatively managed. This being in place, defect prevention is a very cost-effective
means to boost both customer satisfaction and business performance, as many high-
maturity organizations such as Motorola, Boeing or Wipro show.
Defect removal is not about assigning blame but about building better quality and
improving the processes to ensure quality. Reliability improvement always needs
measurements on effectiveness (i.e., percentage of removed defects for a given activity)
compared to efficiency (i.e., effort spent for detecting and removing a defect in the
respective activity). Such measurement asks for the number of residual defects at a
given point in time or within the development process.
only on the different components of the system and their inherent quality before the
start of validation activities, and reliability models which look more dynamically during
validation activities at residual defects and failure rates.
Only a few studies have been published that typically relate static defect estimation to
the number of already detected defects independently of the activity that resulted in
defects, or the famous error seeding which is well known but is rarely used due to the
belief of most software engineers that it is of no use to add errors to software when
there are still far too many defects in, and when it is known that defect detection costs
several person hours per defect.
Defects can be easily estimated based on the stability of the underlying software. All
software in a product can be separated into four parts according to its origin:
Software that is new or changed. This is the standard case where software had
been designed especially for this project, either internally or from a supplier.
Software reused but to be tested (i.e., reused from another project that was
never integrated and therefore still contains lots of defects; this includes ported
functionality). This holds for reused software with unclear quality status, such as
internal libraries.
Software reused from another project that is in testing (almost) at the same
time. This software might be partially tested, and therefore the overlapping of
the two test phases of the parallel projects must be accounted for to estimate
remaining defects. This is a specific segment of software in product lines or any
other parallel usage of the same software without having hardened it so far for
field usage.
Software completely reused from a stable product. This software is considered
stable and there- fore it has a rather low number of defects. This holds especially
for commercial off the shelf software components and opens source software
which is used heavily.
The base of the calculation of new or changed software is the list of modules to be used
in the complete project (i.e., the description of the entire build with all its components).
A defect correction in one of these components typically results in a new version, while
a modification in functionality (in the context of the new project) results in a new
variant. Configuration management tools are used to distinguish the one from the other
while still maintaining a single source.
f = a × x + b × y + c × z + d × (w – x – y – z)
Course Module
CS-6209 Software Engineering 1
8
Week 6: Software Quality Management
with
x: the number of new or changed KStmt designed and to be tested within this
project. This soft- ware was specifically designed for that respective project. All
other parts of the software are re- used with varying stability.
y: the number of KStmt that are reused but are unstable and not yet tested
(based on functionality that was designed in a previous project or release, but
was never externally delivered; this includes ported functionality from other
projects).
z: the number of KStmt that are tested in parallel in another project. This
software is new or changed for the other project and is entirely reused in the
project under consideration.
w: the number of KStmt in the total software – i.e., the size of this product in its
totality.
The factors a-d relate defects in software to size. They depend heavily on the
development environment, project size, maintainability degree and so on. Our
starting point for this initial estimation is actually driven by psychology. Any person
makes roughly one (non-editorial) defect in ten written lines of work. This applies
to code as well as a design document or e-mail, as was observed by the personal
software process (PSP) and many other sources [1,16,17]. The estimation of
remaining defects is language independent because defects are introduced per
thinking and editing activity of the programmer, i.e., visible by written statements.
This translates into 100 defects per KStmt. Half of these defects are found by careful
checking by the author which leaves some 50 defects per KStmt delivered at code
completion. Training, maturity and coding tools can further reduce the number
substantially. We found some 10-50 defects per KStmt de- pending on the maturity
level of the respective organization. This is based only on new or changed code, not
including any code that is reused or automatically generated.
Most of these original defects are detected by the author before the respective work
product is re- leased. Depending on the underlying individual software process, 40–
80% of these defects are re- moved by the author immediately. We have
experienced in software that around 10–50 defects per KStmt remain. For the
following calculation we will assume that 30 defects/KStmt are remaining (which is
a common value [18]. Thus, the following factors can be used:
Course Module
CS-6209 Software Engineering 1
9
Week 6: Software Quality Management
5
0
%
6
5
%
Since defects can never be entirely avoided, different quality control techniques are
used in combination for detecting defects during the product life-cycle. They are listed
in sequence when they are applied throughout the development phase, starting with
requirements and ending with system test:
failures, expected defect density, individual change history, customer’s risk and
occurrence probability)
Unit testing
Focused testing by tracking the effort spent for analyses, reviews, and
inspections and separating according to requirements to find out areas not
sufficiently covered
Systematic testing by using test coverage measurements (e.g., C0 and C1
coverage) and improvement
Operational testing by dynamic execution already during integration testing
Automatic regression testing of any redelivered code
System testing by applying operational profiles and usage specifications.
We will further focus on several selected approaches that are applied for improved
defect detection before starting with integration and system test because those
techniques are most cost-effective.
Note that the starting point for effectively reducing defects and improving reliability is
to track all defects that are detected. Defects must be recorded for each defect
detection activity. Counting defects and deriving the reliability (that is failures over
time) is the most widely applied and accepted method used to determine software
quality. Counting defects during the complete project helps to estimate the duration of
distinct activities (e.g., unit testing or subsystem testing) and improves the underlying
processes. Failures reported during system testing or field application must be traced
back to their primary causes and specific defects in the design (e.g., design decisions or
lack of design reviews).
Quality improvement activities must be driven by a careful look into what they mean
for the bottom line of the overall product cost. It means to continuously investigate
what this best level of quality re- ally means, both for the customers and for the
engineering teams who want to deliver it.
One does not build a sustainable customer relationship by delivering bad quality and
ruining his reputation just to achieve a specific delivery date. And it is useless to spend
an extra amount on improving quality to a level nobody wants to pay for. The optimum
seemingly is in between. It means to achieve the right level of quality and to deliver in
time. Most important yet is to know from the beginning of the project what is actually
relevant for the customer or market and set up the project accordingly. Objectives will
be met if they are driven from the beginning.
We look primarily at factors such as cost of non-quality to follow through this business
reasoning of quality improvements. For this purpose we measure all cost related to
error detection and removal (i.e., cost of non-quality) and normalize by the size of the
product (i.e., normalize defect costs). We take a conservative approach in only
considering those effects that appear inside our engineering activities, i.e., not
considering opportunistic effects or any penalties for delivering insufficient quality.
The most cost-effective techniques for defect detection are requirements reviews. For
Course Module
CS-6209 Software Engineering 1
11
Week 6: Software Quality Management
code re- views, inspections and unit test are most cost-effective techniques aside static
code analysis. Detecting defects in architecture and design documents has
considerable benefit from a cost perspective, because these defects are expensive to
correct at later stages. Assuming good quality specifications, major yields in terms of
reliability, however, can be attributed to better code, for the simple reason that there
are many more defects residing in code that were inserted during the coding activity.
We therefore provide more depth on techniques that help to improve the quality of
code, namely code reviews (i.e., code reviews and formal code inspections) and unit
test (which might include static and dynamic code analysis).
There are six possible paths of combining manual defect detection techniques in the
delivery of a piece of software from code complete until the start of integration test
(Fig. 4). The paths indicate the per- mutations of doing code reviews alone, performing
code inspections and applying unit test. Each path indicated by the arrows shows
which activities are performed on a piece of code. An arrow crossing a box means that
the activity is not applied. Defect detection effectiveness of a code inspection is much
higher than that of a code review. Unit test finds different types of defects than
reviews. However cost also varies depending on which technique is used, which
explains why these different permutations are used. In our experience code reviews is
the cheapest detection technique (with ca. 1-2 PH/defect), while manual unit test is
the most expensive (with ca. 1-5 PH/defect, depending on automation degree). Code
inspections lie somewhere in between. Although the best approach from a mere defect
detection perspective is to apply inspections and unit test, cost considerations and the
objective to reduce elapsed time and thus improve throughput suggest carefully
evaluating which path to follow in order to most efficiently and effectively detect and
remove defects
Entire set of modules
Code
integration test
Reviews
test
Unit
Formal
Code
Inspection
Fig. 4: Six possible paths for modules between end of coding and start of
integration test
Unit tests, however, combined with C0 coverage targets, have the highest effectiveness
for regression testing of existing functionality. Inspections, on the other hand, help in
detecting distinct defect classes that can only be found under real load (or even stress)
in the field.
Course Module
CS-6209 Software Engineering 1
12
Week 6: Software Quality Management
Defects are not distributed homogeneously through new or changed code. An analysis
of many projects revealed the applicability of the Pareto rule: 20-30% of the modules
are responsible for 70- 80% of the defects of the whole project. These critical
components need to be identified as early as possible, i.e., in the case of legacy systems
at start of detailed design, and for new software during coding. By concentrating on
these components the effectiveness of code inspections and unit testing is increased
and fewer defects have to be found during test phases. By concentrating on defect-
prone modules both effectiveness and efficiency are improved. Our main approach to
identify defect- prone software-modules is a criticality prediction taking into account
several criteria. One criterion is the analysis of module complexity based on
complexity measurements. Other criteria concern the number of new or changed code
in a module, and the number of field defects a module had in the pre- ceding project.
Code inspections are first applied to heavily changed modules, in order to optimize
payback of the additional effort that has to be spent compared to the lower effort for
code reading. Formal code reviews are recommended even for very small changes
with a checking time shorter than two hours in order to profit from a good efficiency of
code reading. The effort for know-how transfer to another designer can be saved.
accidental complexity in the product will definitely decrease productivity (e.g., gold
plating, additional rework, more test effort) and quality (more defects). A key to
controlling accidental complexity from creeping into the project is the measurement
and analysis of complexity throughout in the life-cycle. Volume, structure, order or the
connections of different objects contribute to complexity. However, do they all account
for it equally? The clear answer is no, because different people with different skills
assign complexity subjectively, according to their experience in the area. Certainly
criticality must be predicted early in the life-cycle to effectively serve as a managerial
instrument for quality improvement, quality control effort estimation and resource
planning as soon as possible in a project. Tracing comparable complexity metrics for
different products throughout the life-cycle is advisable to find out when essential
complexity is over- ruled by accidental complexity. Care must be used that the
complexity metrics are comparable, that is they should measure the same factors of
complexity.
Having identified such overly critical modules, risk management must be applied. The
most critical and most complex, for instance, the top 5% of the analyzed modules are
candidates for a redesign. For cost reasons mitigation is not only achieved with
redesign. The top 20% should have a code inspection instead of the usual code
reading, and the top 80% should be at least entirely (C0 coverage of 100%) unit tested.
By concentrating on these components the effectiveness of code inspections and unit
test is increased and fewer defects have to be found during test phases. To achieve
feedback for improving predictions the approach is integrated into the development
process end-to-end (requirements, design, code, system test, deployment).
It must be emphasized that using criticality prediction techniques does not mean
attempting to detect all defects. Instead, they belong to the set of managerial
instruments that try to optimize resource allocation by focusing them on areas with
many defects that would affect the utility of the delivered product. The trade-off of
applying complexity-based predictive quality models is estimated based on
Our experiences show that, in accordance with other literature corrections of defects in
early phases is more efficient, because the designer is still familiar with the problem
and the correction delay during testing is reduced
The effect and business case for applying complexity-based criticality prediction to a
Course Module
CS-6209 Software Engineering 1
14
Week 6: Software Quality Management
new project can be summarized based on results from our own experience database
(taking a very conservative ratio of only 40% defects in critical components):
20% of all modules in the project were predicted as most critical (after coding);
These modules contained over 40% of all defects (up to release time). Knowing
from these and many other projects that
60% of all defects can theoretically be detected until the end of unit test and
defect correction during unit test and code reading costs less than 10%
compared to defect correction during system test
It can be calculated that 24% of all defects can be detected early by investigating 20% of
all modules more intensively with 10% of effort compared to late defect correction
during test, therefore yielding a 20% total cost reduction for defect correction.
Additional costs for providing the statistical analysis are in the range of two person
days per project. Necessary tools are off the shelf and account for even less per project.
Course Module
Week 006
Software Quality Management
Week 006: Software Quality Management
Quality Definition
• Quality means that a product satisfies the demands of its
specifications
• It also means achieving a high level of customer satisfaction with the
product
• In software systems this is difficult
• customer quality requirements (e.g. efficiency or reliability) often
conflict with developer quality requirements (e.g. maintainability or
reusability)
• software specifications are often incomplete, inconsistent, or
ambiguous
Week 006: Software Quality Management
Quality Standards
• Key to effective quality management
• Product standards define the characteristics exhibited by all
components (e.g. programming style issues)
• Process standards describe how a software process is to be
implemented
• Should encapsulate best practices - this helps avoid repeating past
mistakes
• Provide continuity by giving new team members a means to
understand the organizational priorities
Week 006: Software Quality Management
Documentation Standards
• Documentation process standards
describe how documents are to be developed, validated, and
maintained
• Document standards
concerned with document content, structure, and appearance
• Document interchange standards
specify how documents are to be stored and shared between
different documentation systems
Week 006: Software Quality Management
Documentation process
Incorporate
Create Review Re-draft
review
initial draft draft document
comments
Stage 1:
Creation Approved document
Stage 2:
Polishing Approved document
Stage 3:
Pr oduction
Week 006: Software Quality Management
Document Standards
• Document identification standards
how documents are labeled
• Document structure standards
organization of project documents
• Document presentation standards
fonts, styles, logos, etc.
• Document update standards
change control and version definition
Week 006: Software Quality Management
Process-Based Quality
• Product quality is influenced by the quality of its production process
• This relationship is easy the see in the manufacture of goods, it is more
complex for software production because
the application of individual skills and experience is particularly
important in software development
external factors (e.g. application novelty or need to accelerate
schedule) are more likely to impair quality
Week 006: Software Quality Management
No Yes
Improve Quality Standar dize
process OK process
Week 006: Software Quality Management
Quality Plan
• Identifies the most significant quality attributes appropriate for the
product
• Defines the assessment process in detail for each quality attribute
• Indicates which organization standards should be applied and defines
new standards as necessary
Week 006: Software Quality Management
Quality Control
• Examines the software development process to ensure that all relevant
procedures and standards are being followed
• Two basic approaches
quality reviews
software measurement and assessment
Week 006: Software Quality Management
Reviews
• Reviews are the principle means of validating both process and
product quality
• Basic procedure is to have a group of people examine a process
artifact to find potential problems
• Common software review types include
• defect inspection and removal (product)
• progress reviews (product and process)
• quality reviews (product and standards)
Week 006: Software Quality Management
Quality Reviews
• Group of knowledgeable people examines a software component and
its documentation
• Code, design models, specifications, test plans, standards, etc. can be
subjected to review
• Once an artifact has been reviewed and ‘signed off’ by the reviewers,
management has given its approval to proceed to the next stage of
development
Week 006: Software Quality Management
Review Purposes
• Quality function
• part of the general quality management process
• Project management function
• provide information to project managers
• Training and communication function
• product knowledge is shared among development team members
Week 006: Software Quality Management
Introduction
A software process is a set of related activities that leads to the production of a soft-
ware product. These activities may involve the development of software from
scratch in a standard programming language like Java or C. However, business
applications are not necessarily developed in this way. New business software is
now often developed by extending and modifying existing systems or by configuring
and integrating off-the-shelf software or system components.
There are many different software processes but all must include four activities that
are fundamental to software engineering:
Software specification. The functionality of the software and constraints on
its operation must be defined.
Software design and implementation. The software to meet the
specification must be produced.
Software validation. The software must be validated to ensure that it does
what the customer wants.
Software evolution. The software must evolve to meet changing customer
needs.
In some form, these activities are part of all software processes. In practice, of
course, they are complex activities in themselves and include sub-activities such as
requirements validation, architectural design, unit testing, etc. There are also
supporting process activities such as documentation and software configuration
management.
Course Module
CS-6209 Software Engineering 1
2
Week 7: Software Development Method
When we describe and discuss processes, we usually talk about the activities in
these processes such as specifying a data model, designing a user interface, etc., and
the ordering of these activities. However, as well as activities, process descriptions
may also include:
1. Products, which are the outcomes of a process activity. For example, the out-
come of the activity of architectural design may be a model of the software
architecture.
2. Roles, which reflect the responsibilities of the people involved in the process.
Examples of roles are project manager, configuration manager, programmer,
etc.
3. Pre- and post-conditions, which are statements that are true before and after
a process activity has been enacted or a product produced. For example,
before architectural design begins, a pre-condition may be that all
requirements have been approved by the customer; after this activity is
finished, a post-condition might be that the UML models describing the
architecture have been reviewed.
Software processes are complex and, like all intellectual and creative processes, rely
on people making decisions and judgments. There is no ideal process and most
organizations have developed their own software development processes.
Processes have evolved to take advantage of the capabilities of the people in an
organization and the specific characteristics of the systems that are being
developed. For some systems, such as critical systems, a very structured
development process is required. For business systems, with rapidly changing
requirements, a less formal, flexible process is likely to be more effective.
Although there is no ‘ideal’ software process, there is scope for improving the
software process in many organizations. Processes may include outdated
techniques or may not take advantage of the best practice in industrial software
engineering. Indeed, many organizations still do not take advantage of software
engineering methods in their software development.
Course Module
CS-6209 Software Engineering 1
3
Week 7: Software Development Method
These generic models are not definitive descriptions of software processes. Rather,
they are abstractions of the process that can be used to explain different approaches
to software development. You can think of them as process frameworks that may be
extended and adapted to create more specific software engineering processes.
These models are not mutually exclusive and are often used together, especially for
large systems development. For large systems, it makes sense to combine some of
the best features of the waterfall and the incremental development models. You
need to have information about the essential system requirements to design a soft-
ware architecture to support these requirements. You cannot develop this
incrementally. Sub-systems within a larger system may be developed using different
approaches. Parts of the system that are well understood can be specified and
developed using a waterfall-based process. Parts of the system which are difficult to
specify in advance, such as the user interface, should always be developed using an
incremental approach
Course Module
CS-6209 Software Engineering 1
4
Week 7: Software Development Method
The principal stages of the waterfall model directly reflect the fundamental
development activities:
1. Requirements analysis and definition. The system’s services, constraints,
and goals are established by consultation with system users. They are then
defined in detail and serve as a system specification.
2. System and software design. The systems design process allocates the
requirements to either hardware or software systems by establishing an
overall system architecture. Software design involves identifying and
describing the fundamental software system abstractions and their
relationships.
3. Implementation and unit testing. During this stage, the software design is
realized as a set of programs or program units. Unit testing involves verifying
that each unit meets its specification.
4. Integration and system testing. The individual program units or programs
are integrated and tested as a complete system to ensure that the software
Course Module
CS-6209 Software Engineering 1
5
Week 7: Software Development Method
requirements have been met. After testing, the software system is delivered
to the customer.
5. Operation and maintenance. Normally (although not necessarily), this is the
longest life cycle phase. The system is installed and put into practical use.
Maintenance involves correcting errors which were not discovered in earlier
stages of the life cycle, improving the implementation of system units and
enhancing the system’s services as new requirements are discovered.
In principle, the result of each phase is one or more documents that are approved
(‘signed off’). The following phase should not start until the previous phase has
finished. In practice, these stages overlap and feed information to each other. During
design, problems with requirements are identified. During coding, design problems
are found and so on. The software process is not a simple linear model but involves
feedback from one phase to another. Documents produced in each phase may then
have to be modified to reflect the changes made.
Because of the costs of producing and approving documents, iterations can be costly
and involve significant rework. Therefore, after a small number of iterations, it is
normal to freeze parts of the development, such as the specification, and to continue
with the later development stages. Problems are left for later resolution, ignored, or
programmed around. This premature freezing of requirements may mean that the
system won’t do what the user wants. It may also lead to badly structured systems
as design problems are circumvented by implementation tricks.
During the final life cycle phase (operation and maintenance) the software is put
into use. Errors and omissions in the original software requirements are discovered.
Program and design errors emerge and the need for new functionality is identified.
The system must therefore evolve to remain useful. Making these changes (software
maintenance) may involve repeating previous process stages.
Incremental development
Incremental development is based on the idea of developing an initial
implementation, exposing this to user comment and evolving it through several
versions until an adequate system has been developed (Figure 6.2). Specification,
development, and validation activities are interleaved rather than separate, with
rapid feedback across activities.
Course Module
CS-6209 Software Engineering 1
6
Week 7: Software Development Method
Each increment or version of the system incorporates some of the functionality that
is needed by the customer. Generally, the early increments of the system include the
most important or most urgently required functionality. This means that the
customer can evaluate the system at a relatively early stage in the development to
see if it delivers what is required. If not, then only the current increment has to be
changed and, possibly, new functionality defined for later increments.
Course Module
CS-6209 Software Engineering 1
7
Week 7: Software Development Method
Incremental development in some form is now the most common approach for the
development of application systems. This approach can be either plan-driven, agile,
or, more usually, a mixture of these approaches. In a plan-driven approach, the
system increments are identified in advance; if an agile approach is adopted, the
early increments are identified but the development of later increments depends on
progress and customer priorities.
You can develop a system incrementally and expose it to customers for comment,
without actually delivering it and deploying it in the customer’s environment.
Incremental delivery and deployment means that the software is used in real,
operational processes. This is not always possible as experimenting with new
software can disrupt normal business processes.
Course Module
CS-6209 Software Engineering 1
8
Week 7: Software Development Method
This informal reuse takes place irrespective of the development process that is
used. However, in the 21st century, software development processes that focus
on the reuse of existing software have become widely used. Reuse-oriented
approaches rely on a large base of reusable software components and an
integrating framework for the composition of these components. Sometimes,
these components are systems in their own right (COTS or commercial off-the-
shelf systems) that may provide specific functionality such as word processing or
a spreadsheet.
into account the components that are reused and organize the framework
to cater for this. Some new software may have to be designed if reusable
components are not available.
4. Development and integration. Software that cannot be externally
procured is developed, and the components and COTS systems are
integrated to create the new system. System integration, in this model,
may be part of the development process rather than a separate activity.
There are three types of software component that may be used in a reuse-
oriented process:
1. Web services that are developed according to service standards and which
are available for remote invocation.
2. Collections of objects that are developed as a package to be integrated
with a component framework such as .NET or J2EE.
3. Stand-alone software systems that are configured for use in a particular
environment.
Course Module
CS-6209 Software Engineering 1
10
Week 7: Software Development Method
Course Module
Week 007
Software Development Method
Week 007: Software Development Method
Methodology Stages
• Requirements
- Determine the functional needs of the application
• Design
- Translate the requirements into a system specification
• Implementation
- Implement the design into a working application
Week 007: Software Development Method
Methodology Stages
• Testing
-Verify the correctness of the application
-Ensure that the application fulfills the requirements
• Maintenance
-Bug fixing and application updates
• Risk Analysis
-Is the application proceeding acceptable?
-Should the plug be pulled?
• Customer Verification
-Refinement of requirements, design, and implementation
Week 007: Software Development Method
Waterfall
Waterfall
• Sequence workflow from project inception to project deployment
• The classic model of development
• The project starts with customer communication to gather
requirements and ends with delivery of the application0
Week 007: Software Development Method
Waterfall Issues
• Real projects often break out of the linear progress of this model
Waterfall Issues
• What happens when the customer does not specify the requirements
completely?
Waterfall Issues
• Customer patience and forethought is required
• The customer does not see a prototype until the application is done
• What happens when a small misunderstanding in requirements
results in a major difference in the built application?
Week 007: Software Development Method
By keeping the customer in the loop, a project is less likely to be killed or overhauled
before delivery
Week 007: Software Development Method
RAD Model
Week 007: Software Development Method
RAD Model
• Design must be more rigorous
• Coordinate the different sub-components
• If modularization is not possible, the application will fail
• More manpower
• More testing
• Performance tuning is more difficult
Week 007: Software Development Method
Extreme Programming
• Adding process to the spiral model
• Start with the customer and gather requirements
• Developers take each discrete requirement and estimate its time to
completion
Week 007: Software Development Method
Extreme Programming
• The developers decide how long it will take
• The customer gets to explicitly prioritize the requirements
• XP is “agile”, it will react well to change
• The process requires buy-in from the customer
• If the customer is not engaged, the process will not work
CS-6209 Software Engineering 1
1
Week 8-9: Software Implementation and Documentation
Software Implementation
In this chapter, we will study about programming methods, documentation and
challenges in software implementation.
Structured Programming
In the process of coding, the lines of code keep multiplying, thus, size of the software
increases. Gradually, it becomes next to impossible to remember the flow of
program. If one forgets how software and its underlying programs, files, procedures
are constructed, it then becomes very difficult to share, debug, and modify the
program. The solution to this is structured programming. It encourages the
developer to use subroutines and loops instead of using simple jumps in the code,
thereby bringing clarity in the code and improving its efficiency Structured
programming also helps programmer to reduce coding time and organize code
properly.
Structured programming states how the program shall be coded. It uses three main
concepts:
1. Top-down analysis - A software is always made to perform some rational
work. This rational work is known as problem in the software parlance. Thus
it is very important that we understand how to solve the problem. Under top-
down analysis, the problem is broken down into small pieces where each one
has some significance. Each problem is individually solved and steps are
clearly stated about how to solve the problem.
statements in the program, which often makes the program flow non-
traceable. Jumps are prohibited and modular format is encouraged in
structured programming.
Functional Programming
Functional programming is style of programming language, which uses the concepts
of mathematical functions. A function in mathematics should always produce the
same result on receiving the same argument. In procedural languages, the flow of
the program runs through procedures, i.e. the control of program is transferred to
the called procedure. While control flow is transferring from one procedure to
another, the program changes its state.
Course Module
CS-6209 Software Engineering 1
3
Week 8-9: Software Implementation and Documentation
Common Lisp, Scala, Haskell, Erlang, and F# are some examples of functional
programming languages.
Programming style
Programming style is set of coding rules followed by all the programmers to write
the code. When multiple programmers work on the same software project, they
frequently need to work with the program code written by some other developer.
This becomes tedious or at times impossible, if all developers do not follow some
standard programming style to code the program.
Coding Guidelines
Practice of coding style varies with organizations, operating systems and language
of coding itself.
Variables - This mentions how variables of different data types are declared
and defined.
Comments - This is one of the important coding components, as the
comments included in the code describe what the code actually does and all
other associated descriptions. This section also helps creating help
documentations for other developers.
But at times, it is impossible to design software that works on the target machines.
Software Documentation
Software documentation is an important part of software process. A well written
document provides a great tool and means of information repository necessary to
know about software process. Software documentation also provides information
about how to use the product.
Source of this document can be previously stored data about the software,
already running software at the client’s end, client’s interview,
Course Module
CS-6209 Software Engineering 1
5
Week 8-9: Software Implementation and Documentation
There are various automated tools available and some comes with the
programming language itself. For example java comes JavaDoc tool to
generate technical documentation of code.
Course Module
CS-6209 Software Engineering 1
6
Week 8-9: Software Implementation and Documentation
Course Module
Week 008-9
Software Implementation and
Documentation
Week 008-9: Software Implementation and Documentation
Structured Programming
• Structured programing is the set of design and implementation
processes that yield well-structured programs.
• A disciplined approach to programming
• Top-down design
• Step-wise refinement using a restricted set* of program structures
Top-Down Design
• A program is divided into a main module and its related modules.
Each module is in turn divided into sub-modules until the resulting
modules are understood without further division.
Week 008-9: Software Implementation and Documentation
Modular Programming
• While programming, the code is broken
down into smaller group of instructions.
These groups are known as modules,
subprograms, or subroutines.
Structured Coding
• Structured programming is
a programming paradigm aimed at
improving the clarity, quality, and
development time of a computer
program by making extensive use of the
structured control flow constructs of
selection (if/then/else) and repetition
(while and for), block structures,
and subroutines.
Week 008-9: Software Implementation and Documentation
Documentation Requirements
• General requirements of all software documentation
• Should provide for communication among team
members
• Should act as an information repository to be used
by maintenance engineers
• Should provide enough information to
management to allow them to perform all program
management related activities
• Should describe to users how to operate and
administer the system
Week 008-9: Software Implementation and Documentation
Documentation Requirements
• In all software projects some amount of
documentation should be created prior to any code
being written
• Design docs, etc.
• Documentation should continue after the code has
been completed
• User’s manuals, etc.
Process Documentation
• Used to record and track the development process
• Planning documentation
• Cost, Schedule, Funding tracking
• Schedules
• Standards
• Etc.
Process Documentation
• Has a relatively short lifespan
Product Documentation
• Describes the delivered product
• System Documentation
• User Documentation
Week 008-9: Software Implementation and Documentation
Product Documentation
• System Documentation
• Describes how the system works, but not how to
operate it
• Examples:
Requirements Spec
Architectural Design
Detailed Design
Commented Source Code
- Including output such as JavaDoc
Test Plans
- Including test cases
V&V plan and results
List of Known Bugs
Week 008-9: Software Implementation and Documentation
Product Documentation
• User Documentation has two main types
• End User
• System Administrator
Product Documentation
• There are five important areas that should be
documented for a formal release of a software
application
• These do not necessarily each have to have their
own document, but the topics should be covered
thoroughly
1. Functional Description of the Software
2. Installation Instructions
3. Introductory Manual
4. Reference Manual
5. System Administrator’s Guide
Week 008-9: Software Implementation and Documentation
Document Quality
• Providing thorough and professional documentation is
important for any size product development team
Document Structure
• All documents for a given product should have a
similar structure
• A good reason for product standards
• The IEEE Standard for User Documentation lists such
a structure
• It is a superset of what most documents need
Standards
• Standards play an important role in the development,
maintenance and usefulness of documentation
• Standards can act as a basis for quality documentation
• But are not good enough on their own
• Usually define high level content and
organization
• There are three types of documentation standards ->
Week 008-9: Software Implementation and Documentation
1.Process Standards
• Define the approach that is to be used when creating
the documentation
• Don’t actually define any of the content of the
documents
Draft
Peer Reviews
Revise Check
Week 008-9: Software Implementation and Documentation
2. Product Standards
• Goal is to have all documents created for a specific
product attain a consistent structure and appearance
• Can be based on organizational or contractually
required standards
2. Product Standards
• One caveat:
3. Interchange Standards
• Deals with the creation of documents in a format that
allows others to effectively use
• PDF may be good for end users who don’t need to
edit
• Word may be good for text editing
• Specialized CASE tools need to be considered
• This is usually not a problem within a single
organization, but when sharing data between
organizations it can occur
• This same problem is faced all the time during
software integration
Week 008-9: Software Implementation and Documentation
Other Standards
• IEEE
• Has a published standard for user documentation
• Provides a structure and superset of content areas
• Many organizations probably won’t create
documents that completely match the standard
• Writing Style
• Ten “best practices” when writing are provided
• Author proposes that group edits of important
documents should occur in a similar fashion to
software walkthroughs
Week 008-9: Software Implementation and Documentation
Online Documentation
• Either internal to the application or Web based
• Requires rethinking the presentation style since normal
“paper” documentation approaches do not carry over
well
• Should act as a supplement to paper documentation
• Biggest benefit of Web docs are that they are always
current
Week 008-9: Software Implementation and Documentation
Document Preparation
• Covers the entire process of creating and formatting a
document for publication
• Author recommends using specialized (and separate)
tools for creating and preparing documents
• This is only important for user documentation
Document Storage
• Author Recommends (in 2001)
• File System to store the actual documents
• Database to store references to the files with metadata
to allow searching and referencing
Introduction
Software Testing is evaluation of the software against requirements gathered from
users and system specifications. Testing is conducted at the phase level in software
development life cycle or at module level in program code. Software testing
comprises of Validation and Verification.
Software Validation
Validation is process of examining whether or not the software satisfies the user
requirements. It is carried out at the end of the SDLC. If the software matches
requirements for which it was made, it is validated.
Validation ensures the product under development is as per the user
requirements.
Validation answers the question – "Are we developing the product which
attempts all that user needs from this software?".
Validation emphasizes on user requirements.
Software Verification
Verification is the process of confirming if the software is meeting the business
requirements, and is developed adhering to the proper specifications and
methodologies.
Verification ensures the product being developed is according to design
specifications.
Verification answers the question– "Are we developing this product by firmly
following all design specifications ?"
Verifications concentrates on the design and system specifications.
Course Module
CS-6209 Software Engineering 1
2
Week 11: Software Testing
Manual testing is time and resource consuming. The tester needs to confirm
whether or not right test cases are used. Major portion of testing involves
manual testing.
There are software and hardware tools which helps tester in conducting load
testing, stress testing, regression testing.
Testing Approaches
Tests can be conducted based on two approaches –
1. Functionality testing
2. Implementation testing
Course Module
CS-6209 Software Engineering 1
3
Week 11: Software Testing
Exhaustive tests are the best-desired method for a perfect testing. Every single
possible value in the range of the input and output values is tested. It is not possible
to test each and every value in real world scenario if the range of values is large.
Black-box testing
It is carried out to test functionality of the program and also called ‘Behavioral’
testing. The tester in this case, has a set of input values and respective desired
results. On providing input, if the output matches with the desired results, the
program is tested ‘ok’, and problematic otherwise.
In this testing method, the design and structure of the code are not known to the
tester, and testing engineers and end users conduct this test on the software.
White-box testing
It is conducted to test program and its implementation, in order to improve code
efficiency or structure. It is also known as ‘Structural’ testing.
Course Module
CS-6209 Software Engineering 1
4
Week 11: Software Testing
In this testing method, the design and structure of the code are known to the tester.
Programmers of the code conduct this test on the code.
Testing Levels
Testing itself may be defined at various levels of SDLC. The testing process runs
parallel to software development. Before jumping on the next stage, a stage is tested,
validated and verified.
Testing separately is done just to make sure that there are no hidden bugs or issues
left in the software. Software is tested on various levels –
Unit Testing
While coding, the programmer performs some tests on that unit of program to know
if it is error free. Testing is performed under white-box testing approach. Unit
testing helps developers decide that individual units of the program are working as
per requirement and are error free.
Integration Testing
Even if the units of software are working fine individually, there is a need to find out
if the units if integrated together would also work without errors. For example,
argument passing and data updation etc.
Course Module
CS-6209 Software Engineering 1
5
Week 11: Software Testing
System Testing
The software is compiled as product and then it is tested as a whole. This can be
accomplished using one or more of the following tests:
Functionality testing - Tests all functionalities of the software against the
requirement.
Performance testing - This test proves how efficient the software is. It tests
the effectiveness and average time taken by the software to do desired task.
Performance testing is done by means of load testing and stress testing
where the software is put under high user and data load under various
environment conditions.
Security & Portability - These tests are done when the software is meant to
work on various platforms and accessed by number of persons.
Acceptance Testing
When the software is ready to hand over to the customer it has to go through last
phase of testing where it is tested for user-interaction and response. This is
important because even if the software matches all user requirements and if user
does not like the way it appears or works, it may be rejected.
Alpha testing - The team of developer themselves perform alpha testing by
using the system as if it is being used in work environment. They try to find
out how user would react to some action in software and how the system
should respond to inputs.
Beta testing - After the software is tested internally, it is handed over to the
users to use it under their production environment only for testing purpose.
This is not as yet the delivered product. Developers expect that users at this
stage will bring minute problems, which were skipped to attend.
Regression Testing
Whenever a software product is updated with new code, feature or functionality, it
is tested thoroughly to detect if there is any negative impact of the added code. This
is known as regression testing.
Testing Documentation
Testing documents are prepared at different stages –
Before Testing
Testing starts with test cases generation. Following documents are needed for
reference –
SRS document - Functional Requirements document
Course Module
CS-6209 Software Engineering 1
6
Week 11: Software Testing
Test Policy document - This describes how far testing should take place
before releasing the product.
Test Strategy document - This mentions detail aspects of test team,
responsibility matrix and rights/responsibility of test manager and test
engineer.
Traceability Matrix document - This is SDLC document, which is related to
requirement gathering process. As new requirements come, they are added
to this matrix. These matrices help testers know the source of requirement.
They can be traced forward and backward.
After Testing
The following documents may be generated after testing :
Test summary - This test summary is collective analysis of all test reports
and logs. It summarizes and concludes if the software is ready to be
launched. The software is released under version control system if it is ready
to launch.
Course Module
Week 011
Software Testing
Week 011: Software Testing
Levels of Testing
• Unit Testing
• Integration Testing
• Validation Testing
Regression Testing
Alpha Testing
Beta Testing
• Acceptance Testing
Week 011: Software Testing
Unit Testing
• Algorithms and logic
• Data structures (global and local)
• Interfaces
• Independent paths
• Boundary conditions
• Error handling
Week 011: Software Testing
Top-Down Integration
1. The main control module is used as a driver, and stubs are
substituted for all modules directly subordinate to the main
module.
2. Depending on the integration approach selected (depth or
breadth first), subordinate stubs are replaced by modules
one at a time.
Week 011: Software Testing
Bottom-Up Integration
• Integration begins with the lowest-level modules, which are
combined into clusters, or builds, that perform a specific
software subfunction
• Drivers (control programs developed as stubs) are written to
coordinate test case input and output
• The cluster is tested
• Drivers are removed and clusters are combined moving
upward in the program structure
Week 011: Software Testing
Validation Testing
• Determine if the software meets all of the requirements
defined in the SRS
• Having written requirements is essential
• Regression testing is performed to determine if the software
still meets all of its requirements in light of changes and
modifications to the software
• Regression testing involves selectively repeating existing
validation tests, not developing new tests
Week 011: Software Testing
Acceptance Testing
• Similar to validation testing except that customers are
present or directly involved.
• Usually the tests are developed by the customer
Week 011: Software Testing
Test Methods
• White box or glass box testing
• Black box testing
• Top-down and bottom-up for performing incremental
integration
• ALAC (Act-like-a-customer)
Week 011: Software Testing
Test Types
• Functional tests
• Algorithmic tests
• Positive tests
• Negative tests
• Usability tests
• Boundary tests
• Startup/shutdown tests
• Platform tests
• Load/stress tests
Week 011: Software Testing
Test Planning
• The Test Plan – defines the scope of the work to be
performed
• The Test Procedure – a container document that holds all of
the individual tests (test scripts) that are to be executed
• The Test Report – documents what occurred when the test
scripts were run
Week 011: Software Testing
Test Plan
• Questions to be answered:
• How many tests are needed?
• How long will it take to develop those tests?
• How long will it take to execute those tests?
• Topics to be addressed:
• Test estimation
• Test development and informal validation
• Validation readiness review and formal validation
• Test completion criteria
Week 011: Software Testing
Test Estimation
• Number of test cases required is based on:
• Testing all functions and features in the SRS
• Including an appropriate number of ALAC (Act Like A
Customer) tests including:
• Do it wrong
• Use wrong or illegal combination of inputs
• Don’t do enough
• Do nothing
• Do too much
• Achieving some test coverage goal
• Achieving a software reliability goal
Week 011: Software Testing
Introduction
Software design is a process to conceptualize the software requirements into
software implementation. Software design takes the user requirements as
challenges and tries to find optimum solution. While the software is being
conceptualized, a plan is chalked out to find the best possible design for
implementing the intended solution.
There are multiple variants of software design. Let us study them briefly:
Structured Design
Structured design is a conceptualization of problem into several well-organized
elements of solution. It is basically concerned with the solution design. Benefit of
structured design is, it gives better understanding of how the problem is being
solved. Structured design also makes it simpler for designer to concentrate on the
problem more accurately.
Structured design is mostly based on ‘divide and conquer’ strategy where a problem
is broken into several small problems and each small problem is individually solved
until the whole problem is solved.
The small pieces of problem are solved by means of solution modules. Structured
design emphasis that these modules be well organized in order to achieve precise
solution.
These modules are arranged in hierarchy. They communicate with each other. A
good structured design always follows some rules for communication among
multiple modules, namely –
Cohesion - grouping of all functionally related elements.
Coupling - communication between different modules.
Course Module
CS-6209 Software Engineering 1
2
Week 12: Software Design Strategies
A good structured design has high cohesion and low coupling arrangements.
This design mechanism divides the whole system into smaller functions, which
provides means of abstraction by concealing the information and their operation.
These functional modules can share information among themselves by means of
information passing and using information available globally.
Design Process
The whole system is seen as how data flows in the system by means of data
flow diagram.
DFD depicts how functions change data and state of the entire system.
The entire system is logically broken down into smaller units known as
functions on the basis of their operation in the system.
Each function is then described at large.
Every entity has some attributes associated to it and has some methods to
perform on the attributes.
Design Process
Software design process can be perceived as series of well-defined steps. Though it
varies according to design approach (function oriented or object oriented, yet It may
have the following steps involved:
A solution design is created from requirement or previous used system
and/or system sequence diagram.
Objects are identified and grouped into classes on behalf of similarity in
attribute characteristics.
Class hierarchy and relation among them is defined.
Application framework is defined.
Top-down design takes the whole software system as one entity and then
decomposes it to achieve more than one sub-system or component based on some
characteristics. Each sub-system or component is then treated as a system and
decomposed further. This process keeps on running until the lowest level of system
in the top-down hierarchy is achieved.
Top-down design starts with a generalized model of system and keeps on defining
the more specific part of it. When all the components are composed the whole
system comes into existence.
Top-down design is more suitable when the software solution needs to be designed
from scratch and specific details are unknown.
Bottom-up Design
The bottom up design model starts with most specific and basic components. It
proceeds with composing higher level of components by using basic or lower level
components. It keeps creating higher level components until the desired system is
not evolved as one single component. With each higher level, the amount of
abstraction is increased.
Bottom-up strategy is more suitable when a system needs to be created from some
existing system, where the basic primitives can be used in the newer system.
Both, top-down and bottom-up approaches are not practical individually. Instead, a
good combination of both is used.
Course Module
CS-6209 Software Engineering 1
5
Week 12: Software Design Strategies
User interface is part of software and is designed in such a way that it is expected to
provide the user insight of the software. UI provides fundamental platform for
human-computer interaction.
CLI provides a command prompt, the place where the user types the command and
feeds to the system. The user needs to remember the syntax of command and its
use. Earlier CLI were not programmed to handle the user errors effectively.
Course Module
CS-6209 Software Engineering 1
6
Week 12: Software Design Strategies
CLI Elements
Course Module
CS-6209 Software Engineering 1
7
Week 12: Software Design Strategies
Typically, GUI is more resource consuming than that of CLI. With advancing
technology, the programmers and designers create complex GUI designs that work
with more efficiency, accuracy, and speed.
GUI Elements
GUI provides a set of components to interact with software or hardware.
Every graphical component provides a way to work with the system. A GUI system
has following elements such as:
Course Module
CS-6209 Software Engineering 1
8
Week 12: Software Design Strategies
Cursor - Interacting devices such as mouse, touch pad, digital pen are
represented in GUI as cursors. On screen cursor follows the instructions from
hardware in almost real-time. Cursors are also named pointers in GUI
systems. They are used to select menus, windows and other application
features.
Text-Box - Provides an area for user to type and enter text-based data.
Buttons - They imitate real life buttons and are used to submit inputs to the
software.
Course Module
CS-6209 Software Engineering 1
9
Week 12: Software Design Strategies
Course Module
CS-6209 Software Engineering 1
10
Week 12: Software Design Strategies
A model used for GUI design and development should fulfill these GUI specific steps.
GUI Requirement Gathering - The designers may like to have list of all
functional and non-functional requirements of GUI. This can be taken from
user and their existing software solution.
User Analysis - The designer studies who is going to use the software GUI.
The target audience matters as the design details change according to the
knowledge and competency level of the user. If user is technical savvy,
advanced and complex GUI can be incorporated. For a novice user, more
information is included on how-to of software.
Course Module
CS-6209 Software Engineering 1
11
Week 12: Software Design Strategies
Testing - GUI testing can be done in various ways. Organization can have in-
house inspection, direct involvement of users and release of beta version are
few of them. Testing may include usability, compatibility, user acceptance
etc.
Course Module
Week 012
Software Design Strategies
Week 012: Software Design Strategies
Design Process
Software designers do not arrive at a finished design immediately.
They develop design iteratively through number of different versions.
The starting point is informal design which is refined by adding
information to make it consistent and complete as shown in the figure
below:
Week 012: Software Design Strategies
Design Process
A general model of design process
Week 012: Software Design Strategies
Architectural Design
Identifying the sub-systems and establishing framework for sub-
system control and communication.
Explained using the following architecture
Week 012: Software Design Strategies
Architecture Design
Activities necessary for architectural designing;
System Structuring
Control modeling
Modular decomposition
The output of the architectural design process is an architectural
design document.
Week 012: Software Design Strategies
Architecture Design
Client and Server are the subsystems that
are controlling the other modules.
Other modules are the rectangles in white.
Ex, Network Prediction, Play, Chat Room,
Game Room etc.
Week 012: Software Design Strategies
Design Methodologies
J. Christopher Jones, taken from classis work, Design Methods: Seeds
of Human Futures(Jones 1970.)
Design Methodologies
A more methodical approach to software design is proposed by
structured methods which are sets of notations and guidelines for
software design.
Two major rules of this method
Programs were to be broken into functions and subroutines
There was only a single entry point and a single exit point for any
function or routine.
Week 012: Software Design Strategies
Design Methodologies
Structured methods often support some or all of the following
models of a system:
A data-flow model
An Entity-relationship model
A structural model
An object-oriented model
Week 012: Software Design Strategies
Design Methodologies
Rounded rectangles represents functions which transform inputs to
outputs.
The transformation name indicates its functions.
Rectangles represents data stores.
Structural Model
Example for structural model
Week 012: Software Design Strategies
Design Strategies
Function Oriented
Design is decomposed into set of interacting units where each
unit has clearly defined function
Conceals the details of an algorithm in a function but system state
information is not hidden.
The activities of this strategy;
Data-flow design
Structural decomposition
Detailed design description
Week 012: Software Design Strategies
Design Strategies
Object-oriented design
Is based on the idea of information hiding.
System is viewed as a set of interacting objects, with their own
private state.
Dominant design strategy for new software systems.
Objects communicate by calling on services offered by other
objects rather than sharing variables. This reduces the overall
system coupling.
Message passing model allows objects to be implemented
as concurrent processes.
Week 012: Software Design Strategies
Design Strategies
Kinds of concurrent object implementation
Passive objects
Active objects
CS-6209 Software Engineering 1
1
Week 13: Software Maintenance
Introduction
Software maintenance is widely accepted part of SDLC now a days. It stands for all
the modifications and updations done after the delivery of software product. There
are number of reasons, why modifications are required, some of them are briefly
mentioned below:
Market Conditions - Policies, which changes over the time, such as taxation
and newly introduced constraints like, how to maintain bookkeeping, may
trigger need for modification.
Client Requirements - Over the time, customer may ask for new features or
functions in the software.
Host Modifications - If any of the hardware and/or platform (such as
operating system) of the target host changes, software changes are needed to
keep adaptability.
Organization Changes - If there is any business level change at client end,
such as reduction of organization strength, acquiring another company,
organization venturing into new business, need to modify in the original
software may arise.
Types of maintenance
In a software lifetime, type of maintenance may vary based on its nature. It may be
just a routine maintenance tasks as some bug discovered by some user or it may be
a large event in itself based on maintenance size or nature. Following are some
types of maintenance based on their characteristics:
Course Module
CS-6209 Software Engineering 1
2
Week 13: Software Maintenance
Cost of Maintenance
Reports suggest that the cost of maintenance is high. A study on estimating software
maintenance found that the cost of maintenance is as high as 67% of the cost of
entire software process cycle.
On an average, the cost of software maintenance is more than 50% of all SDLC
phases. There are various factors, which trigger maintenance cost go high, such as:
Course Module
CS-6209 Software Engineering 1
3
Week 13: Software Maintenance
Maintenance Activities
IEEE provides a framework for sequential maintenance process activities. It can be
used in iterative manner and can be extended so that customized items and
processes can be included.
Course Module
CS-6209 Software Engineering 1
4
Week 13: Software Maintenance
Implementation - The new modules are coded with the help of structured
design created in the design step.Every programmer is expected to do unit
testing in parallel.
Delivery - After acceptance test, the system is deployed all over the
organization either by small update package or fresh installation of the
system. The final testing takes place at client end after the software is
delivered.
Course Module
CS-6209 Software Engineering 1
5
Week 13: Software Maintenance
Software Re-engineering
When we need to update the software to keep it to the current market, without
impacting its functionality, it is called software re-engineering. It is a thorough
process where the design of software is changed and programs are re-written.
Legacy software cannot keep tuning with the latest technology available in the
market. As the hardware become obsolete, updating of software becomes a
headache. Even if software grows old with time, its functionality does not.
For example, initially Unix was developed in assembly language. When language C
came into existence, Unix was re-engineered in C, because working in assembly
language was difficult.
Other than this, sometimes programmers notice that few parts of software need
more maintenance than others and they also need re-engineering.
Re-Engineering Process
Decide what to re-engineer. Is it whole software or a part of it?
Perform Reverse Engineering, in order to obtain specifications of existing
software.
Restructure Program if required. For example, changing function-oriented
programs into object-oriented programs.
Course Module
CS-6209 Software Engineering 1
6
Week 13: Software Maintenance
Reverse Engineering
It is a process to achieve system specification by thoroughly analyzing,
understanding the existing system. This process can be seen as reverse SDLC model,
i.e. we try to get higher abstraction level by analyzing lower abstraction levels.
Program Restructuring
It is a process to re-structure and re-construct the existing software. It is all about
re-arranging the source code, either in same programming language or from one
programming language to a different one. Restructuring can have either source
code-restructuring and data-restructuring or both.
Re-structuring does not impact the functionality of the software but enhance
reliability and maintainability. Program components, which cause errors very
frequently can be changed, or updated with re-structuring.
Forward Engineering
Forward engineering is a process of obtaining desired software from the
specifications in hand which were brought down by means of reverse engineering. It
assumes that there was some software engineering already done in the past.
Course Module
CS-6209 Software Engineering 1
7
Week 13: Software Maintenance
Component reusability
A component is a part of software program code, which executes an independent
task in the system. It can be a small module or sub-system itself.
Example
The login procedures used on the web can be considered as components, printing
system in software can be seen as a component of the software.
Components have high cohesion of functionality and lower rate of coupling, i.e. they
work independently and can perform tasks without depending on other modules.
In OOP, the objects are designed are very specific to their concern and have fewer
chances to be used in some other software.
In modular programming, the modules are coded to perform specific tasks which
can be used across number of other software programs.
There is a whole new vertical, which is based on re-use of software component, and
is known as Component Based Software Engineering (CBSE).
Course Module
CS-6209 Software Engineering 1
8
Week 13: Software Maintenance
Reuse Process
Two kinds of method that can be adopted: either by keeping requirements same and
adjusting components or by keeping components same and modifying
requirements.
Design - This is also a standard SDLC process step, where requirements are
defined in terms of software parlance. Basic architecture of system as a
whole and its sub-systems are created.
Course Module
CS-6209 Software Engineering 1
9
Week 13: Software Maintenance
Course Module
Week 013
Software Maintenance
Week 013: Software Maintenance
Software Maintenance
Main issues:
why maintenance is such an issue
reverse engineering and its limitations
how to organize maintenance
Week 013: Software Maintenance
Hardware
Development
Percent of total cost
60
Software
20
Maintenance
Point to ponder #1
corrective 21%
perfective 50%
adaptive 25%
preventive 4%
Week 013: Software Maintenance
• 2015: ??
• Unstructured code
• Insufficient documentation
Week 013: Software Maintenance
Reverse engineering
Week 013: Software Maintenance
Reverse engineering
• Does not involve any adaptation of the system
Restructuring
• Functionality does not change
Reengineering (renovation)
Program comprehension
• Role of programming plans, beacons
Summary
• Maintenance problems:
• Unstructured code
• Insufficient knowledge about system and domain
• Insufficient documentation
• Bad image of maintenance department
Introduction
Software is not immune to the failing economy. Many software companies will close,
and thousands of layoffs will occur as company’s contract and try to save money.
Poor software engineering, which gave rise to seriously flawed economic models,
helped cause the recession. As the recession deepens, it is urgent that those
concerned with software engineering take a hard look at fundamental issues:
quality, security, measurement of results, and development best practices. This will
discuss the following topics that are critical during a major recession:
Course Module
CS-6209 Software Engineering 1
2
Week 14: Software Engineering Best Practices
A book entitled Software Engineering Best Practices should start by defining exactly
what is meant by the phrase “best practice” and then explain where the data came
from in order to include each practice in the set. A book on best practices should
also provide quantitative data that demonstrates the results of best practices.
Because practices vary by application size and type, evaluating them is difficult. For
example, the Agile methods are quite effective for projects below about 2,500
function points, but they lose effectiveness rap-idly above 10,000 function points.
Agile has not yet even been attempted for applications in the 100,000–function
point range and may even be harmful at that size.
To deal with this situation, an approximate scoring method has been developed that
includes both size and type. Methods are scored using a scale that runs from +10 to
–10 using the criteria shown in Table 11-1. Both the approximate impact on
productivity and the approximate impact on quality are included. The scoring
method can be applied to specific ranges such as 1000 function points or 10,000
function points. It can also be applied to specific types of software such as
information technology, web application, commercial software, military software,
and several others. The scoring method runs from a maximum of +10 to a minimum
of –10, as shown in Table 11-1.
For software engineering, a historically serious problem has been that measurement
practices are so poor that quantified results are scarce. There are many claims for
tools, languages, and methodologies that assert each should be viewed as a best
practice. But empirical data on their actual effectiveness in terms of quality or
productivity has been scarce.
Course Module
CS-6209 Software Engineering 1
3
Week 14: Software Engineering Best Practices
Course Module
CS-6209 Software Engineering 1
4
Week 14: Software Engineering Best Practices
Point 2: Software engineering is not a “one size fits all” kind of occupation. There
are many different forms of software, such as embedded applications, commercial
software packages, information technology projects, games, military applications,
outsourced applications, open source applications, and several others. These
various kinds of software applications do not necessarily use the same languages,
tools, or development methods. Therefore this will considers the approaches that
yield the best results for each type of software application.
Point 3: Tools, languages, and methods are not equally effective or important for all
activities. For example, a powerful programming language such as Objective C will
obviously have beneficial effects on coding speed and code quality. But which
programming language is used has no effect on requirements creep, user
documentation, or project management. Therefore the phrase “best practice” also
has to identify which specific activities are improved. This is complicated because
activities include development, deployment, and post-deployment maintenance and
enhancements. Indeed, for large applications, development can take up to five years,
installation can take up to one year, and usage can last as long as 25 years before the
application is finally retired. Over the course of more than 30 years, hundreds of
activities will occur.
The result of the preceding factors is that selecting a set of best practices for
software engineering is a fairly complicated undertaking. Each method, tool, or
language needs to be evaluated in terms of its effective-ness by size, by application
type, and by activity. The best practices in a variety of contexts:
In 2009, software engineering is not yet a true profession with state certification,
licensing, board examinations, formal specialties, and a solid body of empirical facts
about technologies and methods that have proven to be effective. There are, of
course, many international standards. Also, various kinds of certification are
possible on a voluntary basis. Currently, neither standards nor certification have
demonstrated much in the way of tangible improvements in software success rates.
This is not to say that certification or standards have no value, but rather that
proving their value by quantification of quality and productivity is a difficult task.
Several forms of test certification seem to result in higher levels of defect removal
efficiency than observed when uncertified testers work on similar applications.
Certified function-point counters have been shown experimentally to produce more
accurate results than uncertified counters when counting trial examples. However,
Course Module
CS-6209 Software Engineering 1
5
Week 14: Software Engineering Best Practices
much better data is needed to make a convincing case that would prove the value of
certification.
As to standards, the results are very ambiguous. No solid empiri-cal data indicates,
for example, that following ISO quality standards results in either lower levels of
potential defects or higher levels of defect removal efficiency. Some of the security
standards seem to show improvements in reduced numbers of security flaws, but
the data is sparse and unverified by controlled studies.
Because many paths are based on application size and type, a network of possible
paths exists. The key to successful software engineering is to find the specific path
that will yield the best results for a specific project. Some of the paths will include
Agile development, and some will include the Team Software Process (TSP). Some
paths will include the Rational Unified Process (RUP), and a few might even include
traditional water-fall development methods.
No matter which specific path is used, the destination must include fundamental
goals for the application to reach a successful conclusion:
Project planning and estimating must be excellent and accurate.
Quality control must be excellent.
Change control must be excellent.
Progress and cost tracking must be excellent.
Measurement of results must be excellent and accurate.
Examples of typical development paths are shown in Figure 11-1. This figure
illustrates the development methods and quality practices used for three different
size ranges of software applications.
To interpret the paths illustrated by Figure 11-1, the Methods boxes near the top
indicate the methods that have the best success rates. For example, at fewer than
1000 function points, Agile has the most success. But for larger applications, the
Team Software Process (TSP) and Personal Software Process (PSP) have the
greatest success. However, all of the methods in the boxes have been used for
applications of the sizes shown, with reasonable success.
Course Module
CS-6209 Software Engineering 1
6
Week 14: Software Engineering Best Practices
Moving down, the Defect Prevention and Defect Removal boxes show the best
combinations of reviews, inspections, and tests. As you can see, larger applications
require much more sophistication and many more kinds of defect removal than
small applications of fewer than 1000 function points.
Course Module
CS-6209 Software Engineering 1
7
Week 14: Software Engineering Best Practices
Not only are paths through software development important, but also paths for
delivery of software to customers, and then paths for maintenance and
enhancements during the active life of software applications. Figure 11-2 shows
typical installation paths for three very different situations: Software as a Service,
self-installed applications, and those requiring consultants and installation
specialists.
Course Module
CS-6209 Software Engineering 1
8
Week 14: Software Engineering Best Practices
However, the really complex installation procedures are those associated with large
mainframe applications that need customization as well as installation. Some large
applications such as ERP packages are so complicated that sometimes it takes install
teams of 25 consultants and 25 in-house personnel a year to complete installation.
Because usage of these large applications spans dozens of different kinds of users in
various organizations (accounting, marketing, customer support, manufacturing,
etc.), a wide variety of custom user manuals and custom classes need to be created.
From the day large software packages are delivered until they are cut-over and
begin large-scale usage by all classes of users, as long as a year can go by. Make no
Course Module
CS-6209 Software Engineering 1
9
Week 14: Software Engineering Best Practices
All software applications have bugs or defects, and as these are found, they will need
to be repaired.
As businesses evolve, new features and new requirements will surface, so existing
applications must be updated to keep them current with user needs.
As software ages, structural decay always occurs, which may slow down
performance or cause an increase in bugs or defects. Therefore if the software
continues to have business value, it may be necessary to “renovate” legacy
applications. Renovation consists of topics such as restructuring or refactoring to
lower complexity, identification and removal of error-prone modules, and perhaps
adding features at the same time. Renovation is a special form of maintenance that
needs to be better covered in the literature.
After some years of usage, aging legacy applications may outlive their utility and
need replacement. However, redeveloping an existing application is not the same as
starting a brand-new application. Existing business rules can be extracted from the
code using data-mining techniques, since the original requirements and
specifications usually lag and are not kept current.
Therefore, this will attempt to show the optimal paths not only for development, but
also for deployment, maintenance, and enhancements. Figure 11-3 illustrates three
of the more common and important paths that are followed during the maintenance
period.
As can be seen from Figure 11-3, maintenance is not a “one size fits all” form of
modification. Unfortunately, the literature on software maintenance is very sparse
compared with the literature on software development. Defect repairs,
Course Module
CS-6209 Software Engineering 1
10
Week 14: Software Engineering Best Practices
enhancements, and renovations are very different kinds of activities and need
different skill sets and sometimes different tools.
Course Module
CS-6209 Software Engineering 1
11
Week 14: Software Engineering Best Practices
All of these sources provide benchmark data primarily using function points as
defined by the International Function Point Users Group (IFPUG). It uses IFPUG
function points for all quantitative data dealing with quality and productivity.
There are several other forms of function point, including COSMIC (Common
Software Measurement International Consortium) function points and Finnish
function points. While data in these alternative metrics will not be discussed at
length in this module, citations to sources of benchmark data will be included. Other
metrics such as use case points, story points, and goal-question metrics will be
mentioned and references provided.
(It is not possible to provide accurate benchmarks using either lines of code metrics
or cost per defect metrics. As will be illustrated later, both of these common metrics
violate the assumptions of standard economics, and both distort historical data so
that real trends are concealed rather than revealed.)
On the opposite end of the spectrum from best practices are worst practices. The
author has been an expert witness in a number of breach-of-contract lawsuits where
depositions and trial documents revealed the major failings that constitute worst
Course Module
CS-6209 Software Engineering 1
12
Week 14: Software Engineering Best Practices
practices. These will be discussed from time to time, to demonstrate the differences
between the best and worst practices.
In between the sets of best practices and worst practices are many methods and
practices that might be called neutral practices. These may provide some benefits for
certain kinds of applications, or they may be slightly harmful for others. But in
neither case does use of the method cause much variation in productivity or quality.
This will attempts to replace unsupported claims with empirical data derived from
careful measurement of results. When the software industry can measure
performance consistently and accurately, can estimate the results of projects with
good accuracy, can build large applications without excessive schedule and cost
overruns, and can achieve excellence in quality and customer satisfaction, then we
can call ourselves “software engineers” without that phrase being a misnomer. Until
our successes far outnumber our failures, software engineering really cannot be
considered to be a serious and legitimate engineering profession.
Another flawed metric is that of cost per defect for measuring quality. This metric
actually penalizes quality and achieves its lowest values for the buggiest
applications. Cost per defect cannot be used to measure zero-defect applications.
Here, too, the author views cost per defect as professional malpractice if used for
economic study.
Mathematical problems with the cost per defect metric have led to the urban legend
that “it costs 100 times as much to fix a bug after delivery as during development.”
This claim is not based on time and motion studies, but is merely due to the fact that
cost per defect goes up as numbers of defects go down. Defect repairs before and
after deployment take about the same amount of time. Bug repairs at both times
range from 15 minutes to more than eight hours. Fixing a few subtle bugs can take
much longer, but they occur both before and after deployment.
Course Module
CS-6209 Software Engineering 1
13
Week 14: Software Engineering Best Practices
Neither lines of code nor cost per defect can be used for economic analysis or to
demonstrate software best practices. Therefore this will use function point metrics
for economic study and best-practice analysis. As mentioned, the specific form of
function point used is that defined by the International Function Point Users Group
(IFPUG).
There are other metrics in use such as COSMIC function points, use case points,
story points, web object points, Mark II function points, Finnish function points,
feature points, and perhaps 35 other function point variants. However, as of 2008,
only IFPUG function points have enough measured historical data to be useful for
economic and best-practice analysis on a global basis. Finnish function points have
sev-eral thousand projects, but most of these are from Finland where the work
practices are somewhat different from the United States. COSMIC function points
are used in many countries, but still lack substantial quantities of benchmark data as
of 2009 although this situation is improving.
This will offer some suggested conversion rules between other metrics and IFPUG
function points, but the actual data will be expressed in terms of IFPUG function
points using the 4.2 version of the counting rules.
IFPUG function point metrics are far from perfect, but they offer a number of
advantages for economic analysis and identification of best practices. Function
points match the assumptions of standard economics. They can measure
information technology, embedded applications, commercial software, and all other
types of software. IFPUG function points can be used to measure noncode activities
as well as to measure coding work. Function points can be used to measure defects
in requirements and design as well as to measure code defects. Function points can
handle every activity during both development and maintenance. In addition,
benchmark data from more than 20,000 projects is available using IFPUG function
points. No other metric is as stable and versatile as function point metrics.
One key fact should be obvious, but unfortunately it is not. To demonstrate high
quality levels, high productivity levels, and to identify best practices, it is necessary
to have accurate measurements in place. For more than 50 years, the software
engineering domain has utilized measurement practices and metrics that are
seriously flawed. An occupation that cannot measure its own performance with
accuracy is not qualified to be called an engineering discipline. Therefore another
purpose of this is to demonstrate how economic analysis can be applied to software
engineering projects. This will demonstrate methods for measuring productivity
and quality with high precision.
Course Module
CS-6209 Software Engineering 1
14
Week 14: Software Engineering Best Practices
Course Module
Week 014
Software Engineering Best Practices
Week 013: Software Engineering Best Practices
• Note:
• Process, systematic (not ad hoc), evolutionary…
• Constraints: high quality, cost, time, meets user requirements
Week 013: Software Engineering Best Practices
Project Schedule
Week 013: Software Engineering Best Practices
Develop Iteratively
Use
Manage Model Verify
Component Visually
Requirements Architectures Quality
Control Changes
Know these!
Week 013: Software Engineering Best Practices
Interestingly,
• An initial design will likely be flawed with respect to its key
requirements. Requirements rarely fully known up front!
• Late-phase discovery of design defects results in costly over-runs
and/or project cancellation
• Oftentimes requirements change – even during implementation!
Week 013: Software Engineering Best Practices
R Requirements
I Design
S Code
Waterfall risk
K Integration
System
Test
T I M E
Week 013: Software Engineering Best Practices
Iterative Development
Iterative Development
I Risk reduction
S
Waterfall risk
K Iterative
Iterative Development
In an iteration,
you may walk
C through all
O
N
disciplines
T
E
N
T
S
T
R
U
C
T
U
R
E
20
Week 013: Software Engineering Best Practices
Summary
• You will see some of these again – and, more importantly, use
this information in your own iteration planning.