Software and Software Engineering
What is Software?
Software can be described as a collection of instruction that is executed to get desired
functionalities. It is different from a program in the sense that software includes
programs, documentation and operating procedures.
Characteristics of software compared to hardware
Software is developed, not manufactured.
Does not wear out.
Has reusable components.
Flexible.
Types of software
System software
Software that provides a platform to other software such as Microsoft Windows,
GNU/Linux, macOS.
Application Software
Programs designed for end users like Notepad, Firefox, Media players.
Engineering/Scientific Software
Software built with techniques and formulae specific to specific scientific or
engineering field, examples are MATLAB, AUTOCAD.
Embedded Software
Programs that control machines or devices such as Traffic light control mechanism,
Motorcycle dashboard display.
Product-line Software
A group of products sharing common features that are used to satisfy specific needs of
a mission like MS Office supporting home use, business use, enterprise use etc.
Web Application Software
Programs that are run on web servers and are accessed through a web browser,
examples are Gmail, Facebook etc.
Artificial Intelligence Software
Software that is capable of intelligent behaviour, like in Robotics, Game Playing etc.
Legacy Software System
Software systems that were developed decades ago which becomes costly and risky to
maintain and evolve.
Software Engineering
Software engineering can be defined as a systematic and disciplined engineering
approach applied for building and maintaining software.
It is a layered technology comprising
Quality focus is its central support element since improving the quality of process
and products through quality improvement techniques is the organisation’s main
focus.
The process layer provides a framework for the management of software project.
The method layer includes methods such as communication, design, coding and
other technical aspects for the development of software.
The tools layer provides supporting tools for the Method and Process layers.
Software Engineering Practice and Myths
Software Engineering Practice
Essence of practice
General steps in carrying out software engineering are,
Understand the problem through communication.
Plan a solution by modelling and designing.
Carry out the plan (coding).
Examine result for correctness (testing).
Principles of best practice
Software should provide value to users.
Keep the software design simple.
The vision of the project should be kept in mind throughout.
Keep your work products in an understandable format for others to work with them
easily.
Design in a way that can incorporate changes in future.
Build reusable components.
Think before acting or learn before starting.
Software Myths (False Belief)
Management myths
• Software practitioners follow the book of standards and procedures for software
development.
• If a delay occurs, programmers can be added at any point.
• Outsourcing helps.
Customer myths
• General requirements and not a detailed one is needed for starting programming.
• Software is easy to change.
Practitioner’s myths (Developer’s myths)
• Software development is all about coding.
• Only a finished software can be tested.
• Software engineering has plentiful documentation and will slow down the process.
Software Process
The software process comprises activities performed to create a software product. It
deals with the technical and management aspects of software development.
Software process includes
Tasks – focus on a small, specific objective.
Action – set of tasks that produce a major work product.
Activities – group of related tasks and actions for a major objective.
A process framework for software engineering defines five framework activities.
Framework activities include communication, planning, modelling, construction and
deployment. Each framework activity includes a set of engineering actions and each
action defines a set of tasks that incorporates work products, project milestones and
software quality assurance (SQA) points that are required. Umbrella activities are
carried throughout the process.
Process Framework Activities
Communication – Communicate with stakeholders and customers to obtain
objectives of the system and requirements for the software.
Planning – Software project plan has details of resources needed, tasks and risk
factors likely to occur, schedule.
Modelling – Architectural models and design to better understand the problem and
for work towards the best solution.
Construction – Generation of code and testing of the system to rectify errors and
ensuring all specified requirements are met.
Deployment – Entire software product or partially completed product is delivered to
the customer for evaluation and feedback.
Umbrella activities
Activities that occur throughout a software process for better management and
tracking of the project.
Software project tracking and control – Compare the progress of the project with
the plan and take steps to maintain a planned schedule.
Risk management – Evaluate risks that can affect the outcome and quality of the
software product.
Software quality assurance (SQA) – Conduct activities to ensure the quality of the
product.
Technical reviews – Assessment of errors and correction done at each stage of
activity.
Measurement – All the measurements of the project and product features.
Software configuration management (SCM) – Controlling and tracking changes in
the software.
Reusability management – Back up work products for reuse and apply the
mechanism to achieve reusable software components.
Work product preparation and production – Project planning and other activities
used to create work product are documented.
Process flow
Process flow determines how activities, actions and tasks are arranged with respect to
sequence and time.
Linear process flow
Linear process flow executes each activity in sequence.
Iterative process flow
Iterative process flow repeats one or more activities before starting next.
Evolutionary process flow
Evolutionary process flow carry out activities in a circular way.
Parallel process flow
Parallel process flow execute one or more activities in parallel with each other.
Software Development Life Cycle (SDLC)
SDLC(Software Development Life Cycle) comprises a series of activities that are
used to design, develop and test high-quality software products, conforming to time
and cost constraints.
Planning and Requirement analysis
Requirements are gathered and analysed, a feasibility study is conducted. Planning for
quality assurance requirements are laid out and possible risk factors are determined.
Defining requirements
After the analysis is done, they are clearly defined and documented. They are
documented in Software Requirement Specification (SRS) document which defines
all the product requirements that need to be developed into a
working so ware product.
Designing
Based on the SRS document, the design for the product is outlined and documented in
a Design Document Specification (DDS). Product modules are designed and data
flow amongst them are specified using several tools.
Building
The actual building of the product starts here. Code generation occurs in this stage
referring to the design. Programming languages and other tools for developing
software are chosen in this stage.
Testing
In this stage, the errors are detected and fixed using different testing methods. The
product is tested to check whether it has achieved the requirements and quality
standards specified in SRS.
Deployment
The software product is delivered and implemented in a real business environment.
Customers or end-users evaluate the product which is called User Acceptance
Testing(UAT) and gives feedback based on which the product is finalized or a call for
modification is considered.
Maintenance
After the product is accepted by the customer or released into the market, the software
has to be maintained for a long run to incorporate changing environment requirements
of the future, for improving performance and consistency of the product.
Prescriptive process models – Waterfall model, Incremental process model,
Prototyping & Spiral model
Prescriptive process models
Prescriptive process models prescribe a set of framework and other activities, quality
assurance points, and software process-related elements. They define a
workflow among these elements that shows their inter-relationship.
The process models described here are,
Waterfall Model.
Incremental Process Model.
Evolutionary Process Model.
The Waterfall Model
The Waterfall model is also known as ‘Linear sequential model‘ or ‘Classic life
cycle model‘. It is used in small projects where requirements are well defined and
known before starting the project. Activities are carried out in a linear and systematic
fashion.
The Waterfall Model
The process starts with communication, where requirements are gathered from the
customer and recorded.
Then goes to the planning stage where the cost and time constraints are estimated, a
schedule is outlined and project tracking variables are defined.
Modelling is where a design based on the requirements and keeping the project
constraints in mind is created. After this, code is generated and the actual building of
the product is started in the construction phase.
Testing (unit testing, integration testing) is done after code completion in this phase.
Deployment is the last stage where the product is delivered, customer feedback is
received and, support and maintenance for the product are provided.
Advantages of the waterfall model
A simple model to use and implement.
Easily understandable workflow.
Easy to manage since requirements are known prior to the start of the project.
Can be applied to projects where quality is preferred over cost.
Disadvantages of the waterfall model
It may be difficult for the customer to provide all the specific requirements
beforehand.
Cannot be used for complex and object-oriented projects.
Testing and customer evaluation are done at the last stages and hence the risk
is high.
Iteration of activities is not promoted which is unavoidable for certain
projects.
May lead to “blocking states” in which some project team members must wait
for other members of the team to complete dependent tasks.
Incremental Process Model
The Incremental process model is also known as ‘Successive version model‘.
In the Incremental process model, a series of releases, called increments, are built and
delivered to the customer. First, a simple working system(core product), that
addresses basic requirements, is delivered. Customer feedback is recorded after each
incremental delivery. Many increments are delivered, by adding more functions, until
the required system is released. This model is used when a user demands a model of
product with limited functionality quickly.
The Incremental Process Model
Advantages of incremental process model
Flexible to change requirements.
Changes can be done throughout the development stages.
Errors are reduced since the product is tested by the customer in each phase.
Working software available at the early stage of the process.
Easy to test because of small iterations.
The initial cost is lower.
Disadvantages of incremental process model
Requires good planning and design.
Modules and interfaces should be well defined.
The total cost is high.
Demands a complete planning strategy before commencement.
Refining requirements in each iteration may affect system architecture.
Breaking the problem into increments needs skilful management supervising.
Evolutionary Process Models
Evolutionary process models are opted when the requirements may tend to change
and also when the complete sophisticated product delivery cannot be done before a
given deadline, but the delivery of a limited version of it is possible.
In the incremental model, complete requirements are specified beforehand and these
requirements are refined over time for each increment. The evolutionary model
permits requirements, plans and estimates to evolve over time. Here we
discuss prototyping and the spiral model.
Prototyping
In cases when the requirements are unclear and are likely to change or when the
developer is doubtful about working of an algorithm, a solution is to build a prototype
and find out what is actually needed. Hence, in this model, one or more prototypes are
made with unrefined currently known requirements before the actual product is made.
A quick design is what occurs in a prototype model. The client evaluates the
prototype and gives feedback and other requirements which are incorporated in the
next prototype. This is repeated until the prototype becomes a complete product that is
acceptable to the client. Some prototypes are built as “throwaways”, others are
“evolutionary” in nature as they evolve into the actual system.
Advantages of prototyping
Active involvement of the user.
Errors are detected earlier.
Feedback after each prototype helps in understanding the system better.
Does not need to know detailed processes, input and output from the
beginning.
Disadvantages of prototyping
Multiple prototypes can slow down the process.
Frequent changes can increase complexity.
Unsatisfied client leads to multiple throwaways.
The customer may not be interested or satisfied after evaluating the initial
prototype.
Spiral Model
In spiral model, the software is developed through a series of increments. The
diagram looks like a spiral with loops where each loop is a phase. Each phase is split
into four sectors/quadrant.
The Spiral Model
The first circuit around the spiral might result in the development of a product
specification. The subsequent passes around the spiral might be used to develop a
prototype and then progressively more mature versions of the software.
Planning is where the objectives, alternatives and other constraints are determined.
The alternatives are considered, risks in each alternative are analysed and prototypes
are refined in the risk analysis sector. At the development quadrant level risks are
known and it proceeds with developing and testing the product. In the assessment
sector, customer evaluation of product developed is reviewed and the next phase is
planned. This loop continues until acceptable software is built and deployed.
Hence, the spiral model follows an incremental process methodology and unlike other
process models, it deals with the uncertainty by applying a series of risk analysis
strategies throughout the process.
Advantages of spiral model
Reduces risk.
Recommended for complex projects.
Changes can be incorporated at a later stage.
Strong documentation helps in better management.
Disadvantages of spiral model
Costly and not recommended for small projects.
Demands risk assessment expertise.
Looping is a complex process.
Heavy documentation.
Agile Development
Agile Process
An agile process is highly driven by the customer requirements and considering the
customer as a part of the development team thereby adapting to changes after
delivering software increments. The emphasis is on construction rather than the
intermediate work products recognizing that plans are short-lived and changes are
always happening.
Principles of Agile Process
1. Customer satisfaction through early delivery of software.
2. Accommodate changes late in project without dramatic cost and time impact.
3. Business people, developers and customers work together as a team.
4. Gives developers a sense of support and trust in their skills.
5. At regular intervals, the team reflects on how to become more effective and
adjusts
accordingly.
Concept of Agility
Rapid and adaptive response to change.
Effective communication among all stakeholders.
Adopts customer onto the team.
Organizing a team that is highly motivated and uses informal methods.
Rapid, incremental delivery of software and low intermediate work products.
Extreme Programming
Extreme Programming is the most widely used agile process and it follows an object-
oriented approach.
The foundation of extreme programming are the following five values
1. Communication – close and informal communication between developers,
customers and stakeholders. Focus on continuous feedback and hence
avoiding voluminous documentation.
2. Simplicity – address only present needs without getting bothered about future
needs. Create simple design accordingly.
3. Feedback – feedback from software itself after unit testing, feedback from
customer after increment delivery, and feedback from software team members
regarding next increment plan.
4. Courage – courage to design for present scenario and keeping in mind that
future requirements may change rapidly hence should not design for future
now.
5. Respect – all the members of team including customer develop respect for
each other by following values mentioned above and it should grow over time.
Planning
Begins with the creation of user stories.
Agile team assesses each story and assigns a cost.
Stories are grouped to build deliverable increment.
A commitment is made on delivery date.
After the first increment project velocity (number of stories implemented in
first release) is used to help define subsequent delivery dates for other
increments.
Design
Follows KIS (Keep It Simple) principle.
Encourage the use of CRC (Class-Responsibility-Collaborator) cards to
identify and organize object-oriented classes.
For difficult design problems, suggests the creation of spike solutions – an
immediate operational prototype.
Encourages refactoring — changing the internal program without affecting
external behavior of code.
Coding
Develop unit test procedures for each stories before starting to code.
Uses the concept of pair programming where two people work together at
one workstation to create code for a story.
Unit tests are implemented for each unit.
Code or pair programmers are integrated with others along with implementing
smoke testing.
Testing
Unit testing should be implemented in a repetitive nature which will
encourage regression testing.
Integration and validation testing is done on a daily basis.
Acceptance tests (Customer tests) are done where overall features are
reviewed by the customer.
Industrial XP(IXP) combines the properties of XP and an additional focus on
management and
upgraded technical practices. It conducts a readiness assessment of the project before
commencement, considers project community, project chartering, test-driven
management,
the specialized technical review called retrospectives and encourages continuous
learning.