CSC 308 Lecture Notes Weeks 1 and 2
CSC 308 Lecture Notes Weeks 1 and 2
Introduction to Software Engineering,
Requirements Analysis, and Specification
-
Materials for weeks 1 and 2 of class:
-
Syllabus.
-
Projects descriptions.
-
Milestone 1 writeup.
-
Specification document outline.
-
SVN basics.
-
Standard operating procedures, Volume 1.
-
These lecture notes.
You're looking at the HTML version of the notes, the link goes to the PDF
version. There are both HTML and PDF versions of all notes and handouts,
FYI.
-
Scheduling details for the first two weeks.
-
First day's activities (Monday):
-
In lecture:
-
Tour of syllabus and other handouts.
-
Brief introduction to the software system life cycle and requirements analysis.
-
In lab:
-
Choice of project teams and projects.
-
Preparation for initial customer interviews.
-
Second day's activities (Wednesday):
-
Initial customer interviews with all teams, in both lecture and
lab.
-
To provide ample interview time, there will be no normal lecture on this
Wednesday.
-
The precise meeting schedule will be determined on the first day of classes.
-
Third day's activities (Friday):
-
Normal lecture.
-
Lab introduction to project repository and SVN.
-
Fourth day's activities (Monday):
-
Second round of customer interviews.
-
As with preceding Wednesday, no normal lecture.
-
Precise schedule TBA.
-
Third week and beyond:
-
"Normal" lectures.
-
Lab meetings as described in syllabus, specific times TBA, in forthcoming
handout.
-
What is software engineering?
-
The disciplined creation of software.
-
Well-known principles of scientific problem solving are applied, including:
-
Defining a problem clearly before starting its solution.
-
Using a "divide and conquer" strategy to manage the complexity of a problem and
its solution.
-
Well-known principles of engineering are applied, including:
-
Using formal mathematics to specify a system precisely.
-
Formally verifying that a problem solution meets its specification.
-
The different types of software.
-
There are three broad categories of software, based on the application domain,
i.e., the general area in which the software is applied.
-
End-user software.
-
Used by people to get work done.
-
Has a human-computer interface (HCI).
-
System software.
-
Provides underlying support to end-user software.
-
Has an application programmer interface (API), and perhaps limited HCI.
-
Embedded software
-
Used within hardware devices.
-
Has no HCI; the interface is directly with the hardware.
-
There are two categories of software based on the clientele who purchase it.
-
Off-the-shelf (or shrink-wrap) software is built by software developers who
sell it on the open marker.
-
Custom (or bespoke) software is built to satisfy the needs of specific
customers, typically an organization of some kind.
-
In 308, we are building custom end-user software.
-
The people involved with software.
-
The following are software "stakeholders", i.e., people who have some interest
in a software product and/or its development.
-
end users -- people who will use the software or
people who represent those who will use it
-
customers -- people who purchase the software, which
they may or may use themselves
-
domain experts -- people who fully understand the
application domain in which the software will run
-
analysts -- members of the software development staff
who specialize in requirements analysis and specification
-
implementors -- members of the development staff who
specialize in software design and implementation
-
testers -- members of the development staff and user
community who test the software to ensure that it meets the requirements
specification
-
managers -- those who manage the development process,
as well as those who manage end users when the software is installed in an
organization
-
visionaries -- those who have the "big picture" for
what the software is intended to do and how it will be developed
-
maintainers and operators -- those who conduct post-
development maintenance and operations, as necessary
-
other interested parties -- anyone else interested in
the software product, such as those with a financial investment
-
The first four groups work together as a team to develop the requirements,
perhaps with some individuals in more than one group.
-
It may be the case that the members of the implementation team do not
participate at all in the requirements specification, but rather accept the
requirement specification document as input.
-
In CSC 308, you will primarily play the roles of analyst and tester, with a
secondary roles as domain experts and end users as appropriate.
-
CSC 309 is concerned with project implementation.
-
The software development process.
-
For software to be properly engineered, its development must be conducted in an
orderly process.
-
The diagram in Figure 1 depicts the major stages of the software development
process.
Figure 1: Major phases of the software development process.
-
The Analyze step of the process addresses the requirements to be met by the
software.
-
For software that is to be used directly by humans, the primary activity of the
Analyze phase is to acquire and organize the functional requirements of the
human users.
-
This part of the analysis involves a considerable amount of human-to-human
communication.
-
The Specify step of the process involves the development of a formal model of
the requirements.
-
The model represents the requirements in a form that can be mechanically
analyzed.
-
Developing the formal specification allows the requirements to be analyzed for
completeness and consistency.
-
The Design step of the process involves organizing the major components of the
software system.
-
The initial design is derived from the components of the formal specification
model.
-
The initial design is then refined into an efficient software architecture,
consisting of packages, classes, and methods.
-
The Implement step fills in the operational details
-
Class data structure details are determined.
-
The code for methods is implemented.
-
The following are some noteworthy considerations about the process.
-
Ideally, each step of the process should be completed before the next step is
begun.
-
If we ignore the upward-pointing dashed arrows in Figure 1, we can view the
process diagram as a "waterfall chart".
-
In this view, information only flows down from higher steps to lower steps.
-
In practice, the ideal waterfall view is rarely possible.
-
In diagrammatic terms, water sometimes needs to flow up hill (the dashed
lines).
-
This view allows feed-back from a lower phase to a higher phase.
-
The process we follow in CSC 308 and 309 has the following properties:
-
There is substantial feedback between the Analyze and Specify steps of the
process.
-
There is also substantial feedback between the Design and Implement steps.
-
The feedback from the Design step back up to the Specify step is limited, and
controlled by specification change orders (SCOs).
-
The reason is that it is important to have a complete and sound specification
before design and implementation begin.
-
Further, it is important to control any requirements specification changes
during design and implementation.
-
A common source of problems in software system development is that of the
"shifting requirements" -- requirements and/or specifications that change
significantly once the design and implementation phases have begun.
-
Viewing the software process as a problem solving exercise, it is clear why
changing requirements and specification are troublesome:
-
The requirements analysis and specification can be considered the "problem
statement" phase.
-
The design and implementation are the "problem solution" phase.
-
When the system requirements or specification change after the design and
implementation are in progress, it is like changing the problem to be solved
while the solution is being developed.
-
Additional "pervasive" steps of the software process.
-
Figure 1 shows the major steps of the process that are carried out in an
ordered, step-by-step manner.
-
Even if there is some feedback among the steps, the overall order is first to
analyze requirements, then specify, then design, and then implement.
-
In addition to the four ordered steps, there are four other steps that are
carried out continuously, or "pervasively", throughout the development process.
-
The pervasive steps of the process are
-
Manage
-
Configure
-
Test
-
Document
-
Reuse
-
The Manage step entails the management of the people involved in the process.
-
Project meetings are scheduled at regular intervals.
-
Project supervisors oversee and evaluate the work of their subordinates.
-
The Configure step of the process involves the organization and management of
the software artifacts.
-
The Configure step is supported by the use version control and configuration
management tools.
-
These tools allow artifacts to be checked in to a software repository, with
version changes controlled and documented throughout the ongoing process.
-
The Test step of the process ensures that software artifacts being produced
meet certain measurable standards.
-
Testing requirements involves careful human inspection, and formal review to
ensure that user needs are being met and properly defined.
-
Testing the specification and design involves formal analysis for completeness,
consistency, and other measurable properties.
-
Testing the implementation involves formal functional testing to ensure that
execution results meet the specification.
-
The Document step produces documentation suitable for everyone involved in the
process.
-
A requirements specification document is produced in a form suitable for both
end users and system developers.
-
Software maintenance documentation is produced during the design and
implementation steps.
-
Various forms of reports are produced for the administrative staff.
-
End user manuals and tutorials are produced for the final delivered software
product.
-
The Reuse step evaluates existing artifacts to determine if they can be used in
whole or in part in a new development project.
-
Reuse from libraries is a normal part of the development process.
-
Reuse of other artifacts involves refining and adapting them to meet current
needs.
-
The important characteristics of a pervasive process step are the following.
-
Pervasive steps are carried out during each of the ordered steps, and in a
manner specifically related to each step.
-
For example, testing is carried out during each of the analyze, specify design,
and implement steps of the process.
-
Further, the form of testing carried out for each ordered step is specifically
designed for the kind of software artifact that each ordered step produces.
-
Pervasive steps are typically performed at regularly scheduled intervals.
-
For example in CSC 308, we will perform requirements testing on a weekly basis
during the second half of the quarter.
-
As part of the Manage step, we will have regularly scheduled project meetings
and reviews.
-
Traditional process versus agile processes.
-
The process we follow in 308 and 309 can be considered traditional in
the sense that it is based on a clear set of plans, carried out in a specific
way.
-
One of the particularly traditional aspects of the class process is the
production of a substantial requirements document, which can be considered a
plan for subsequent implementation.
-
A more incremental process approach, called agile development, does
much less up-front requirements analysis, but instead develops requirements in
small increments as the process proceeds (see Figure 2).
Figure 2: Comparing traditional and agile software processes.
-
Customers and implementors work very closely together, and a product is
deployed to the customers in very small increments.
-
The more traditional steps of specification and design are replaced by
incremental "refactoring", which cleans up the incrementally developed code,
that has a tendency to get messy along the way.
-
Agile development, and its underlying methodology of extreme
programming, are relatively new in the world of software processes.
-
People have reported success using agile methods for small to medium-scale
projects, with tight-knit teams of customers and developers.
-
Few solid studies have been done to determine how well agile methods work.
-
At present, there are questions about the efficacy of agile development for
large-scale projects for which incremental development is not always feasible.
-
Without question, agile methods have proved successful in many cases.
-
What is involved in requirements analysis and specification?
-
These steps involve precisely specifying the need for a proposed software
system.
-
In order for a requirements specification to be complete and consistent, it is
defined in a requirements specification document.
-
The informal sections of the document must be understandable to everyone who
will be affected by the computing equipment, so that:
-
Everyone understands precisely how computing will affect their work.
-
Everyone can contribute to the formulation of the requirements.
-
The formal sections of the document must be precise enough for use as a
contractual instrument for the subsequent development or acquisition of the
software.
-
Importance of careful requirements analysis.
-
Before an organization procures a software system to meet its computing needs,
or before a company builds a software system to meet marketplace needs, the
people involved should have a precise understanding of exactly what the needs
are.
-
This seemingly obvious idea is often overlooked in computer system acquisition
and development.
-
The lure of technology and/or the skill of the technology vendor often lead to
insufficient time being spent on requirements analysis and specification.
-
Vendors may over sell a system, with claims that the system can meet a wide
range of needs
-
Marketers may overestimate or misunderstand the needs of a potential
marketplace.
-
Many organizations have learned painfully that hastily-acquired computer
systems can cause more problems than they solve.
-
Companies who have built hastily-specified software products have often found
insubstantial markets for their product.
-
There is nearly universal agreement among software engineers that thorough
requirements analysis is essential for successful software development.
-
Patience is required from all participants
-
It may sometimes seem that the requirements analysis process spends a long time
specifying the obvious.
-
During the requirements, many people may think that they have a clear idea of
the needs to be met and what the software is supposed to do.
-
Even if many do, it is often the case that not everyone has the same
ideas.
-
Hence, a precise requirements analysis document serves to help everyone agree
on what the needs are, in addition to stating the needs precisely.
-
Major phases of requirements specification
-
Requirements analysis with end-user scenarios.
-
The language used is English and pictures.
-
The primary audience is proposed customers and end users.
-
Much user consultation is required to gather necessary data.
-
Formal model specification.
-
A formal specification language is used.
-
The primary audience is system designers and implementors; a secondary audience
is domain experts.
-
The final version is a very formal document suitable for use as a
contractual instrument for the procurement of a computer system.
-
Details of user consultations and data gathering
-
It is critically important to involve end-users in the requirements analysis
from the outset and throughout the process.
-
With this involvement, the ultimate success of the computer system is far more
likely than without it.
-
Many serious failures in software development have resulted when the needs of
end users are neglected.
-
Activities of user consultation include:
-
User interviews
-
User interface scenarios
-
User questionnaires or surveys
-
Visits to other similar organizations and computer system installations
-
Rapid system prototypes
-
Customer interview techniques.
-
For users who are not computer specialists, the analyst should not ask
questions using computer jargon or terminology.
-
Questions should be specialized to what individual users know best.
-
Analysts should use other common sense interview skills, including being
prepared, polite, succinct, non-threatening, diplomatic, and empathetic, as
appropriate.
-
User interface scenarios.
-
The goal of this activity is to provide potential users with a concrete view of
what the proposed system will be like to use.
-
Scenarios begin with the premise "Suppose the system existed already, what
would it look like to the user?"
-
The scenarios describe precisely what a user sees when the system is used.
-
Scenarios define what screens look like, what the user commands are, the format
of user-visible data, and all other aspects of the end-user interface.
-
Rapid system prototyping.
-
For some software projects, building an operational prototype can be helpful to
capture user requirements.
-
A prototype is a version of the software product that has reduced functionality
that can be rapidly developed prior to full design and implementation.
-
Figure 2 shows two views of how prototyping can be integrated into the software
development process.
Figure 3: How prototyping fits into the software process.
-
In Figure 2a, prototyping is a specific step of the process.
-
In this type of process, the prototype is typically a "store front" style of
system that allows a user to interact through an operational user interface.
-
Behind the interface there is no actual functionality.
-
In Figure 2b, a prototype is constructed by taking one or more initial passes
through the complete process.
-
As each full-process pass is completed, increasingly more functionality is
added.
-
When a complete and stable result is produced, the prototype has been
transformed to a production software system.
-
This kind of process is often called "iterative development".
-
In CSC 308, we will take the view of prototyping shown in Figure 2b. By the
end of 309, we could have a first-pass prototype of an operational system.
-
Establishing genuine user needs.
-
The notion of establishing genuine need is quite critical in the analysis
process.
-
Many computer systems have been for which there is no substantial, demonstrated
need.
-
When software is being analyzed for a particular organization, a forthright
analyst should be prepared to say to customers at the end of the requirements
phase: "Hey, you folks really don't need any new software at all. What you
already have works fine based on your current needs, or you could buy what you
need off the shelf."
-
When requirements are being gathered for a general-market software product,
marketing analysts must be prepared to conclude that there may not be a
substantial market for a piece of software, once the requirements for it are
fully understood.
-
Other important aspects of requirements analysis.
-
Identification of users and other operational personnel.
-
Precisely who the end users will be.
-
Who will be operate and maintain the system, as necessary.
-
Others who will be affected by the system.
-
Overview of current and proposed operations.
-
How things work before the proposed software system exists.
-
How things will work after the proposed software system is installed.
-
Analysis of relevant existing systems.
-
Are there systems with features similar to those required for the proposed
system?
-
What is good and bad about those systems?
-
Impact analysis.
-
What positive impacts will the system have on the intended user community?
-
What negative impacts will the system have?
-
Examples of requirements specification
-
In 308, we will study a concrete example similar in size and scope to the
projects you are working on; it is an electronic Calendar Tool.
-
The example will be presented in phases corresponding to the milestones of the
308 projects covered in the class syllabus.
-
The first concrete example covers roughly what Milestone 1 should look like.
-
We will go over this example in detail next.
index
|
lectures
|
handouts
|
examples
|
textbook
|
doc
|
grades