Lesson 3 Software Engineering
Lesson 3 Software Engineering
Lesson 3 Software Engineering
Agile methods
Plan-driven and agile development
Extreme programming (XP)
Scrum
Scaling up agile methods
Rapid software development
Rapid development and delivery is now often the most important requirement for
software systems
Businesses operate in a fast–changing environment
Software has to evolve quickly to reflect changing business needs
Rapid software development characteristics:
Specification, design and implementation are inter-leaved
System is developed as a series of versions with stakeholders involved in version
evaluation
User interfaces are often developed using an IDE and graphical toolset
Agile Methods
“We are uncovering better ways of developing software by doing it and helping
others do it. Through this work we have come to value:
Individuals and interactions over processes and tools;
Working software over comprehensive documentation;
Customer collaboration over contract negotiation;
Responding to change over following a plan;
That is, while there is value in the items on the right, we value the items on the left
more.”
The principles of agile methods
Agile method applicability
It can be difficult to keep the interest of customers who are involved in the process
Team members may be unsuited to the intense involvement that characterizes
agile methods
Prioritizing changes can be difficult where there are multiple stakeholders
Maintaining simplicity requires extra work
Contracts may be a problem as with other approaches to iterative development
Agile methods and software maintenance
Plan-driven development
A plan-driven approach to software engineering is based around separate development
stages with the outputs to be produced at each of these stages planned in advance
Not necessarily waterfall model – plan-driven, incremental development, spiral (Boehm)
are also possible
Iteration occurs within activities
Agile development
Specification, design, implementation and testing are inter-leaved and the outputs from
the development process are decided through a process of negotiation during the
software development process
Plan-driven and agile specification
Technical, human, organizational issues
Are there cultural or organizational issues that may affect the system development?
Traditional engineering organizations have a culture of plan-based development, as this is the
norm in engineering
How good are the designers and programmers in the development team?
It is sometimes argued that agile methods require higher skill levels than plan-based
approaches in which programmers simply translate a detailed design into code
In XP, a customer or user is part of the XP team and is responsible for making
decisions on requirements.
User requirements are expressed as scenarios or user stories.
These are written on cards and the development team break them down into
implementation tasks. These tasks are the basis of schedule and cost estimates.
The customer chooses the stories for inclusion in the next release based on their
priorities and the schedule estimates.
A ‘prescribing medication’ story: case study
Examples of task cards for prescribing
medication
XP and change
Programming team look for possible software improvements and make these
improvements even where there is no immediate need for them
This improves the understandability of the software and so reduces the need for
documentation
Changes are easier to make because the code is well-structured and clear
However, some changes requires architecture refactoring and this is much more
expensive.
Examples of refactoring
The role of the customer in the testing process is to help develop acceptance tests
for the stories that are to be implemented in the next release of the system.
The customer who is part of the team writes tests as development proceeds. All
new code is therefore validated to ensure that it is what the customer needs.
However, people adopting the customer role have limited time available and so
cannot work full-time with the development team. They may feel that providing the
requirements was enough of a contribution and so may be reluctant to get involved
in the testing process.
Test case description for dose checking
XP testing difficulties
Programmers prefer programming to testing and sometimes they take short cuts
when writing tests. For example, they may write incomplete tests that do not check
for all possible exceptions that may occur.
Some tests can be difficult to write incrementally. For example, in a complex user
interface, it is often difficult to write unit tests for the code that implements the
‘display logic’ and workflow between screens.
It difficult to judge the completeness of a set of tests. Although you may have a lot
of system tests, your test set may not provide complete coverage.
Pair programming
It supports the idea of collective ownership and responsibility for the system
Individuals are not held responsible for problems with the code. Instead, the team has
collective responsibility for resolving these problems.
It acts as an informal review process because each line of code is looked at by at
least two people
It helps support refactoring, which is a process of software improvement
Where pair programming and collective ownership are used, others benefit immediately
from the refactoring so they are likely to support the process
Scrum
The Scrum approach is a general agile method but its focus is on managing
iterative development rather than specific agile practices
There are three phases in Scrum:
The initial phase is an outline planning phase where you establish the general objectives
for the project and design the software architecture
This is followed by a series of sprint cycles, where each cycle develops an increment of
the system
The project closure phase wraps up the project, completes required documentation such
as system help frames and user manuals and assesses the lessons learned from the
project
The Scrum process
The Sprint cycle
Once these are agreed, the team organize themselves to develop the software.
During this stage the team is isolated from the customer and the organization, with
all communications channelled through the so-called Scrum master
The role of the Scrum master is to protect the development team from external
distractions
At the end of the sprint, the work done is reviewed and presented to stakeholders.
The next sprint cycle then begins.
Teamwork in Scrum
The ‘Scrum master’ is a facilitator who arranges daily meetings, tracks the backlog
of work to be done, records decisions, measures progress against the backlog and
communicates with customers and management outside of the team.
The whole team attends short daily meetings where all team members share
information, describe their progress since the last meeting, problems that have
arisen and what is planned for the following day.
This means that everyone on the team knows what is going on and, if problems arise,
can re-plan short-term work to cope with them.
Scrum benefits
The product is broken down into a set of manageable and understandable chunks
Unstable requirements do not hold up progress
The whole team have visibility of everything and consequently team
communication is improved
Customers see on-time delivery of increments and gain feedback on how the
product works
Trust between customers and developers is established and a positive culture is
created in which everyone expects the project to succeed
Scaling agile methods
Agile methods have proved to be successful for small and medium sized projects
that can be developed by a small co-located team
It is sometimes argued that the success of these methods comes because of
improved communications which is possible when everyone is working together
Scaling up agile methods involves changing these to cope with larger, longer
projects where there are multiple development teams, perhaps working in different
locations.
Large systems development
Large systems and their development processes are often constrained by external
rules and regulations limiting the way that they can be developed.
Large systems have a long procurement and development time. It is difficult to
maintain coherent teams who know about the system over that period as,
inevitably, people move on to other jobs and projects.
Large systems usually have a diverse set of stakeholders. It is practically
impossible to involve all of these different stakeholders in the development
process.
Scaling out and scaling up
‘Scaling up’ is concerned with using agile methods for developing large software
systems that cannot be developed by a small team
‘Scaling out’ is concerned with how agile methods can be introduced across a
large organization with many years of software development experience
When scaling agile methods it is essential to maintain agile fundamentals
Flexible planning, frequent system releases, continuous integration, test-driven
development and good team communications.
Scaling up to large systems
For large systems development, it is not possible to focus only on the code of the
system. You need to do more up-front design and system documentation.
Cross-team communication mechanisms have to be designed and used. This
should involve regular phone and video conferences between team members and
frequent, short electronic meetings where teams update each other on progress.
Continuous integration, where the whole system is built every time any developer
checks in a change, is practically impossible. However, it is essential to maintain
frequent system builds and regular releases of the system.
Scaling out to large companies
Project managers who do not have experience of agile methods may be reluctant
to accept the risk of a new approach.
Large organizations often have quality procedures and standards that all projects
are expected to follow and, because of their bureaucratic nature, these are likely to
be incompatible with agile methods.
Agile methods seem to work best when team members have a relatively high skill
level. However, within large organizations, there are likely to be a wide range of
skills and abilities.
There may be cultural resistance to agile methods, especially in those
organizations that have a long history of using conventional systems engineering
processes.
Summary