Introduction To Software Engineering
Introduction To Software Engineering
SOFTWARE
ENGINEERING
MODULE 1
OBJECTIVES
Upon the completion of this module, the students are
expected to:
• Generic products
• Stand-alone systems that are marketed and sold to any
customer who wishes to buy them.
• Examples – PC software such as editing, graphics programs,
project management tools; CAD software; software for
specific markets such as appointments systems for dentists.
• Customized products
• Software that is commissioned by a specific customer to
meet their own needs.
• Examples – embedded control systems, air traffic control
software, traffic monitoring systems.
Why Software is Important?
Question Answer
methods
process model
a “quality” focus
Any engineering approach must rest on organizational commitment to quality which fosters a
continuous process improvement culture.
Process layer as the foundation defines a framework with activities for effective delivery of
software engineering technology. Establish the context where products (model, data, report, and
forms) are produced, milestone are established, quality is ensured and change is managed.
Method provides technical how-to’s for building software. It encompasses many tasks including
communication, requirement analysis, design modeling, program construction, testing and 17
support.
Tools provide automated or semi-automated support for the process and methods.
Software Process
• A process is a collection of activities, actions and tasks that are
performed when some work product is to be created. It is not a
rigid prescription for how to build computer software. Rather, it is
an adaptable approach that enables the people doing the work to
pick and choose the appropriate set of work actions and tasks.
• Purpose of process is to deliver software in a timely manner and
with sufficient quality to satisfy those who have sponsored its
creation and those who will use it.
Five Activities of a Generic
Process framework
• Communication: communicate with customer to understand objectives and
gather requirements
• Planning: creates a “map” defines the work by describing the tasks, risks and
resources, work products and work schedule.
• Modeling: Create a “sketch”, what it looks like architecturally, how the
constituent parts fit together and other characteristics.
• Construction: code generation and the testing.
• Deployment: Delivered to the customer who evaluates the products and provides
feedback based on the evaluation.
• For many software projects, these framework activities are applied iteratively as
a project progresses. Each iteration produces a software increment that provides
a subset of overall software features and functionality.
Umbrella Activities
Complement the five process framework activities and help team manage and control
progress, quality, change, and risk.
• Software project tracking and control: assess progress against the plan and take
actions to maintain the schedule.
• Risk management: assesses risks that may affect the outcome and quality.
• Software quality assurance: defines and conduct activities to ensure quality.
• Technical reviews: assesses work products to uncover and remove errors before
going to the next activity.
• Measurement: define and collects process, project, and product measures to
ensure stakeholder’s needs are met.
• Software configuration management: manage the effects of change throughout
the software process.
• Reusability management: defines criteria for work product reuse and establishes
mechanism to achieve reusable components.
• Work product preparation and production: create work products such as models,
documents, logs, forms and lists.
Adapting a Process Model
The process should be agile and adaptable to problems. Process adopted
for one project might be significantly different than a process adopted from
another project. (to the problem, the project, the team, organizational
culture). Among the differences are:
•the overall flow of activities, actions, and tasks and the interdependencies
among them
•the degree to which actions and tasks are defined within each framework
activity
•the degree to which work products are identified and required
•the manner which quality assurance activities are applied
•the manner in which project tracking and control activities are applied
•the overall degree of detail and rigor with which the process is described
•the degree to which the customer and other stakeholders are involved with
the project
•the level of autonomy given to the software team
•the degree to which team organization and roles are prescribed
Prescriptive and Agile
Process Models
•The prescriptive process models stress detailed definition,
identification, and application of process activates and tasks. Intent is
to improve system quality, make projects more manageable, make
delivery dates and costs more predictable, and guide teams of
software engineers as they perform the work required to build a
system.
•Unfortunately, there have been times when these objectives were
not achieved. If prescriptive models are applied dogmatically and
without adaptation, they can increase the level of bureaucracy.
• Myth 2: Until I get the program running, I have no way of assessing its quality.
• Reality: technical review are a quality filter that can be used to find certain classes of software
defects from the inception of a project.
• Myth 3: software engineering will make us create voluminous and unnecessary documentation
and will invariably slow us down.
• Reality: it is not about creating documents. It is about creating a quality product. Better quality
leads to a reduced rework. Reduced work results in faster delivery times.
• Many people recognize the fallacy of the myths. Regrettably, habitual attitudes and
methods foster poor management and technical practices, even when reality dictates
a better approach.
How It all Starts
• SafeHome:
• Every software project is precipitated by some business need—
• the need to correct a defect in an existing application;
• the need to the need to adapt a ‘legacy system’ to a changing business environment;
• the need to extend the functions and features of an existing application, or
• the need to create a new product, service, or system.
Case studies
53
Process Flow
Linear process flow executes each of the five activities
in sequence.
An iterative process flow repeats one or more of the
activities before proceeding to the next.
An evolutionary process flow executes the activities in
a circular manner. Each circuit leads to a more
complete version of the software.
A parallel process flow executes one or more activities
in parallel with other activities ( modeling for one
aspect of the software in parallel with construction of
another aspect of the software.
Identifying a Task Set
Before you can proceed with the process model, a key
question: what actions are appropriate for a framework
activity given the nature of the problem, the characteristics of
the people and the stakeholders?
A task set defines the actual work to be done to accomplish
the objectives of a software engineering action.
A list of the task to be accomplished
A list of the work products to be produced
A list of the quality assurance filters to be applied
Identifying a Task Set
For example, a small software project
requested by one person with simple
requirements, the communication activity might
encompass little more than a phone all with the
stakeholder. Therefore, the only necessary
action is phone conversation, the work tasks of
this action are:
1. Make contact with stakeholder via telephone.
2. Discuss requirements and take notes.
3. Organize notes into a brief written statement of
requirements.
4. E-mail to stakeholder for review and approval.
Example of a Task Set for Elicitation
The task sets for Requirements gathering
action for a simple project may include:
1. Make a list of stakeholders for the project.
2. Invite all stakeholders to an informal meeting.
3. Ask each stakeholder to make a list of features
and functions required.
4. Discuss requirements and build a final list.
5. Prioritize requirements.
6. Note areas of uncertainty.
Example of a Task Set for Elicitation
The task sets for Requirements gathering action
for a big project may include:
1. Make a list of stakeholders for the project.
2. Interview each stakeholders separately to determine overall wants and needs.
3. Build a preliminary list of functions and features based on stakeholder input.
4. Schedule a series of facilitated application specification meetings.
5. Conduct meetings.
6. Produce informal user scenarios as part of each meeting.
7. Refine user scenarios based on stakeholder feedback.
8. Build a revised list of stakeholder requirements.
9. Use quality function deployment techniques to prioritize requirements.
10. Package requirements so that they can be delivered incrementally.
11. Note constraints and restrictions that will be placed on the system.
12. Discuss methods for validating the system.
•Standard CMMI Assessment Method for Process Improvement (SCAMPI) — provides a five step
process assessment model that incorporates five phases: initiating, diagnosing, establishing, acting
and learning.
•CMM-Based Appraisal for Internal Process Improvement (CBA IPI)—provides a
diagnostic technique for assessing the relative maturity of a software organization; uses the
SEI CMM as the basis for the assessment [Dun01]
•SPICE—The SPICE (ISO/IEC15504) standard defines a set of requirements for software
process assessment. The intent of the standard is to assist organizations in developing an
objective evaluation of the efficacy of any defined software process. [ISO08]
•ISO 9001:2000 for Software—a generic standard that applies to any organization that
wants to improve the overall quality of the products, systems, or services that it provides.
Therefore, the standard is directly applicable to software organizations and companies.
[Ant06]
Prescriptive Models
• Originally proposed to bring order to chaos.
• Prescriptive process models advocate an orderly approach to software
engineering. However, will some extent of chaos (less rigid) be beneficial
to bring some creativity?
Quick
plan
communication
Modeling
Quick design
Deployment
delivery & Construction
feedback of prototype
Construction
of prototype
Evolutionary Models: The Spiral
• It couples the iterative nature of prototyping with the controlled and systematic aspects of the waterfall
model and is a risk-driven process model generator that is used to guide multi-stakeholder concurrent
engineering of software intensive systems.
• Two main distinguishing features: one is cyclic approach for incrementally growing a system’s degree of
definition and implementation while decreasing its degree of risk. The other is a set of anchor point
milestones for ensuring stakeholder commitment to feasible and mutually satisfactory system solutions.
• A series of evolutionary releases are delivered. During the early iterations, the release might be a model
or prototype. During later iterations, increasingly more complete version of the engineered system are
produced.
• The first circuit in the clockwise direction might result in the product specification; subsequent passes
around the spiral might be used to develop a prototype and then progressively more sophisticated
versions of the software. Each pass results in adjustments to the project plan. Cost and schedule are
adjusted based on feedback. Also, the number of iterations will be adjusted by project manager.
• Good to develop large-scale system as software evolves as the process progresses and risk should be
understood and properly reacted to. Prototyping is used to reduce risk.
• However, it may be difficult to convince customers that it is controllable as it demands considerable risk
assessment expertise.
Evolutionary Models: The Spiral
Three Concerns on Evolutionary
Processes
• First concern is that prototyping poses a problem to project planning because
of the uncertain number of cycles required to construct the product.
• Second, it does not establish the maximum speed of the evolution. If the
evolution occur too fast, without a period of relaxation, it is certain that the
process will fall into chaos. On the other hand if the speed is too slow then
productivity could be affected.
• Third, software processes should be focused on flexibility and extensibility
rather than on high quality. We should prioritize the speed of the development
over zero defects. Extending the development in order to reach high quality
could result in a late delivery of the product when the opportunity niche has
disappeared.
Concurrent Model
• Allow a software team to represent iterative and concurrent elements of any of the
process models. For example, the modeling activity defined for the spiral model is
accomplished by invoking one or more of the following actions: prototyping, analysis
and design.
• The Figure shows modeling may be in any one of the states at any given time. For
example, communication activity has completed its first iteration and in the awaiting
changes state. The modeling activity was in inactive state, now makes a transition into
the under development state. If customer indicates changes in requirements, the
modeling activity moves from the under development state into the awaiting changes
state.
• Concurrent modeling is applicable to all types of software development and provides
an accurate picture of the current state of a project. Rather than confining software
engineering activities, actions and tasks to a sequence of events, it defines a process
network. Each activity, action or task on the network exists simultaneously with other
activities, actions or tasks. Events generated at one point trigger transitions among the
states.
Concurrent Model
Still Other Process Models
• Component based development—the process to apply when reuse
is a development objective ( like spiral model)
• Formal methods—emphasizes the mathematical specification of
requirements ( easy to discover and eliminate ambiguity,
incompleteness and inconsistency)
• Aspect Oriented software development (AOSD)—provides a process
and methodological approach for defining, specifying, designing,
and constructing aspects
• Unified Process—a “use-case driven, architecture-centric, iterative
and incremental” software process closely aligned with the Unified
Modeling Language (UML) to model and develop object-oriented
system iteratively and incrementally.
The Unified Process (UP)
elaboration
inception
UP Phases
UP Work Products
Personal Software Process (PSP)
• Planning. This activity isolates requirements and develops both size and resource
estimates. In addition, a defect estimate (the number of defects projected for the work) is
made. All metrics are recorded on worksheets or templates. Finally, development tasks are
identified and a project schedule is created.
• High-level design. External specifications for each component to be constructed are
developed and a component design is created. Prototypes are built when uncertainty exists.
All issues are recorded and tracked.
• High-level design review. Formal verification methods are applied to uncover errors in the
design. Metrics are maintained for all important tasks and work results.
• Development. The component level design is refined and reviewed. Code is generated,
reviewed, compiled, and tested. Metrics are maintained for all important tasks and work
results.
• Postmortem. Using the measures and metrics collected (this is a substantial amount of
data that should be analyzed statistically), the effectiveness of the process is determined.
Measures and metrics should provide guidance for modifying the process to improve its
effectiveness.
Team Software Process (TSP)
Build self-directed teams that plan and track their work,
establish goals, and own their processes and plans. These can
be pure software teams or integrated product teams (IPT) of
three to about 20 engineers.
Show managers how to coach and motivate their teams and
how to help them sustain peak performance.
Accelerate software process improvement by making CMM
Level 5 behavior normal and expected.
The Capability Maturity Model (CMM), a measure of the effectiveness
of a software process, is discussed in Chapter 30.
Provide improvement guidance to high-maturity organizations.
Facilitate university teaching of industrial-grade team skills.
REFERENCES
• Hartson, R. (2018). The UX Book: Agile UX Design
for A Quality User Experience 2nd edition. Morgan
Kaufmann.
11
Agility Principles - I
1. Our highest priority is to satisfy the customer through early and continuous delivery of valuable
software.
2. Welcome changing requirements, even late in development. Agile processes harness change
for the customer's competitive advantage.
3. Deliver working software frequently, from a couple of weeks to a couple of months, with a
preference to the shorter timescale.
4. Business people and developers must work together daily throughout the project.
5. Build projects around motivated individuals. Give them the environment and support they need,
and trust them to get the job done.
6. The most efficient and effective method of conveying information to and within a development
team is face–to–face conversation.
Agility Principles - II
7.Working software is the primary measure of progress.
8.Agile processes promote sustainable development. The sponsors, developers, and
users should be able to maintain a constant pace indefinitely.
9.Continuous attention to technical excellence and good design enhances agility.
10. Simplicity – the art of maximizing the amount of work not done – is essential.
11. The best architectures, requirements, and designs emerge from self–organizing
teams.
12. At regular intervals, the team reflects on how to become more effective, then tunes
and adjusts its behavior accordingly.
Human Factors
• the process molds to the needs of the people and
team, not the other way around
• key traits must exist among the people on an agile
team and the team itself:
• Competence. ( talent, skills, knowledge)
• Common focus. ( deliver a working software increment )
• Collaboration. ( peers and stakeholders)
• Decision-making ability. ( freedom to control its own destiny)
• Fuzzy problem-solving ability.(ambiguity and constant changes, today
problem may not be tomorrow’s problem)
• Mutual trust and respect.
• Self-organization. ( themselves for the work done, process for its local
environment, the work schedule)
Extreme Programming (XP)
• The most widely used agile process, originally proposed by Kent Beck in 2004. It
uses an object-oriented approach.
• XP Planning
• Begins with the listening, leads to creation of “user stories” that describes required
output, features, and functionality. Customer assigns a value(i.e., a priority) to each
story.
• Agile team assesses each story and assigns a cost (development weeks. If more than 3 weeks,
customer asked to split into smaller stories)
• Working together, stories are grouped for a deliverable increment next release.
• A commitment (stories to be included, delivery date and other project matters) is
made. Three ways: 1. Either all stories will be implemented in a few weeks, 2. high priority
stories first, or 3. the riskiest stories will be implemented first.
• After the first increment “project velocity”, namely number of stories implemented
during the first release is used to help define subsequent delivery dates for other
increments. Customers can add stories, delete existing stories, change values of an
existing story, split stories as development work proceeds.
Extreme Programming (XP)
• XP Design ( occurs both before and after coding as refactoring is encouraged)
• Follows the KIS principle (keep it simple) Nothing more nothing less than the story.
• Encourage the use of CRC (class-responsibility-collaborator) cards in an object-oriented context. The only
design work product of XP. They identify and organize the classes that are relevant to the current
software increment. (see Chapter 8)
• For difficult design problems, suggests the creation of “spike solutions”—a design prototype for that
portion is implemented and evaluated.
• Encourages “refactoring”—an iterative refinement of the internal program design. Does not alter the
external behavior yet improve the internal structure. Minimize chances of bugs. More efficient, easy to
read.
• XP Coding
• Recommends the construction of a unit test for a story before coding commences. So implementer can
focus on what must be implemented to pass the test.
• Encourages “pair programming”. Two people work together at one workstation. Real time problem
solving, real time review for quality assurance. Take slightly different roles.
• XP Testing
• All unit tests are executed daily and ideally should be automated. Regression tests are conducted to test
current and previous components.
• “Acceptance tests” are defined by the customer and executed to assess customer visible functionality
Extreme Programming (XP)
spike solut ions
simple design
prot ot ypes
CRC cards
user st ories
values
accept ance t est crit eria
it erat ion plan
refact oring
pair
programming
Release
sof t ware increment unit t est
project velocit y comput ed cont inuous int egrat ion
Release
sof t ware increment
adjust ment s f or subsequent cycles
component s implement ed/ t est ed
focus groups for feedback
formal t echnical reviews
post mort ems
Dynamic Systems Development Method
• It is an agile software development approach that provides a framework for
building and maintaining systems which meet tight time constraints
through the use of incremental prototyping in a controlled project
environment.
• Promoted by the DSDM Consortium (www.dsdm.org)
• DSDM—distinguishing features
• Similar in most respects to XP and/or ASD
• Nine guiding principles
• Active user involvement is imperative.
• DSDM teams must be empowered to make decisions.
• The focus is on frequent delivery of products.
• Fitness for business purpose is the essential criterion for acceptance of deliverables.
• Iterative and incremental development is necessary to converge on an accurate business solution.
• All changes during development are reversible.
• Requirements are baselined at a high level
• Testing is integrated throughout the life-cycle.
Dynamic Systems Development Method
• Principle # 7. Stay focused, modularize your discussion. The more people involved in any
communication, the more likely that discussion will bounce from one topic to the next.
• Principle # 9. (a) Once you agree to something, move on; (b) If you can’t agree to something, move
on; (c) If a feature or function is unclear and cannot be clarified at the moment, move on.
• Principle # 10. Negotiation is not a contest or a game. It works best when both parties win.
Planning Principles
• Principle #1. Understand the scope of the project. It’s impossible to use a
roadmap if you don’t know where you’re going. Scope provides the software team
with a destination.
• Principle #2. Involve the customer in the planning activity. The customer defines
priorities and establishes project constraints.
• Principle #3. Recognize that planning is iterative. A project plan is never
engraved in stone. As work begins, it very likely that things will change.
• Principle #4. Estimate based on what you know. The intent of estimation is to
provide an indication of effort, cost, and task duration, based on the team’s current
understanding of the work to be done.
Planning Principles
• Principle #5. Consider risk as you define the plan. If you have identified risks
that have high impact and high probability, contingency planning is necessary.
• Principle #6. Be realistic. People don’t work 100 percent of every day.
• Principle #7. Adjust granularity as you define the plan. Granularity refers to
the level of detail that is introduced as a project plan is developed.
• Principle #8. Define how you intend to ensure quality. The plan should
identify how the software team intends to ensure quality.
• Principle #9. Describe how you intend to accommodate change. Even the
best planning can be obviated by uncontrolled change.
• Principle #10. Track the plan frequently and make adjustments as required.
Software projects fall behind schedule one day at a time.
Modeling Principles
• In software engineering work, two classes of models can be
created:
• Requirements models (also called analysis models) represent the
customer requirements by depicting the software in three different
domains: the information domain, the functional domain, and the
behavioral domain.
• Design models represent characteristics of the software that help
practitioners to construct it effectively: the architecture, the user
interface, and component-level detail.
Requirements Modeling Principles
• Principle #1. The information domain of a problem must be represented and
understood.
• Principle #2. The functions that the software performs must be defined.
• Principle #3. The behavior of the software (as a consequence of external
events) must be represented.
• Principle #4. The models that depict information, function, and behavior must
be partitioned in a manner that uncovers detail in a layered (or hierarchical)
fashion.
• Principle #5. The analysis task should move from essential information toward
implementation detail.
Design Modeling Principles
• Principle #1. Design should be traceable to the requirements model.
• Principle #2. Always consider the architecture of the system to be built.
• Principle #3. Design of data is as important as design of processing functions.
• Principle #5. User interface design should be tuned to the needs of the end-user. However, in every
case, it should stress ease of use.
• Principle #6. Component-level design should be functionally independent.
• Principle #7. Components should be loosely coupled to one another and to the external
environment.
• Principle #8. Design representations (models) should be easily understandable.
• Principle #9. The design should be developed iteratively. With each iteration, the designer should
strive for greater simplicity.
Agile Modeling Principles
• Principle #1. The primary goal of the software team is to build software, not create models.
• Principle #2. Travel light—don’t create more models than you need.
• Principle #3. Strive to produce the simplest model that will describe the problem or the software.
• Principle #4. Build models in a way that makes them amenable to change.
• Principle #5. Be able to state an explicit purpose for each model that is created.
• Principle #6. Adapt the models you develop to the system at hand.
• Principle #7. Try to build useful models, but forget about building perfect models.
• Principle #8. Don’t become dogmatic about the syntax of the model. If it communicates content successfully,
representation is secondary.
• Principle #9. If your instincts tell you a model isn’t right even though it seems okay on paper, you probably have
reason to be concerned.
• Principle #10. Get feedback as soon as you can.
Construction Principles
• The construction activity encompasses a set of coding and
testing tasks that lead to operational software that is ready
for delivery to the customer or end-user.
• Coding principles and concepts are closely aligned
programming style, programming languages, and
programming methods.
• Testing principles and concepts lead to the design of tests
that systematically uncover different classes of errors and to
do so with a minimum amount of time and effort.
Preparation Principles