Agile Software Development: 5.1 Coping With Change
Agile Software Development: 5.1 Coping With Change
Agile Software Development: 5.1 Coping With Change
com
Software Engineering [15CS42]
The objectives of prototyping should be made explicit from the start of the process.
These may be to develop a system to prototype the user interface, to develop a system
to validate functional system requirements, or to develop a system to demonstrate the
feasibility of the application to managers.
The next stage in the process is to decide what to put into and, perhaps more
importantly, what to leave out of the prototype system.
The final stage of the process is prototype evaluation.
Developers are sometimes pressured by managers to deliver throwaway prototypes,
particularly when there are delays in delivering the final version of the software.
However, this is usually unwise:
1. It may be impossible to tune the prototype to meet non-functional
requirements, such as performance, security, robustness, and reliability
requirements, which were ignore during prototype development.
They identify which of the services are most important and which are least important
to them.
Once the system increments have been identified, the requirements for the services to
be delivered in the first increment are defined in detail and that increment is
developed.
During development, further requirements analysis for later increments can take place
but requirements changes for the current increment are not accepted.
Incremental delivery has a number of advantages:
1. Customers can use the early increments as prototypes and gain experience that
informs their requirements for later system increments. Unlike prototypes,
these are part of the real system so there is no re-learning when the complete
system is available.
2. Customers do not have to wait until the entire system is delivered before they
can gain value from it. The first increment satisfies their most critical
requirements so they can use the software immediately.
3. The process maintains the benefits of incremental development in that it
should be relatively easy to incorporate changes into the system.
4. As the highest-priority services are delivered first and increments then
integrated, the most important system services receive the most testing. This
means that customers are less likely to encounter software failures in the most
important parts of the system.
However, there are problems with incremental delivery:
1. Most systems require a set of basic facilities that are used by different parts of
the system. As requirements are not defined in detail until an increment is to
be implemented, it can be hard to identify common facilities that are needed
by all increments.
2. Iterative development can also be difficult when a replacement system is being
developed. Users want all of the functionality of the old system and are often
unwilling to experiment with an incomplete new system. Therefore, getting
useful customer feedback is difficult.
3. In the incremental approach, there is no complete system specification until
the final increment is specified. This requires a new form of contract, which
large customers such as government agencies may find difficult to
accommodate.
5.3.1 Testing in XP
XP includes an approach to testing that reduces the chances of introducing
undiscovered errors into the current version of the system.
The key features of testing in XP are:
* Test-first development,
* Incremental test development from scenarios,
* User involvement in the test development and validation, and
* The use of automated testing frameworks.
Fig 5.6 is a shortened description of a test case that has been developed to check that
the prescribed dose of a drug does not fall outside known safe limits.
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.
Test automation is essential for test-first development.
Tests are written as executable components before the task is implemented.
These testing components should be standalone, should simulate the submission of
input to be tested, and should check that the result meets the output specification.
An automated test framework is a system that makes it easy to write executable tests
and submit a set of tests for execution.
Test-first development and automated testing usually results in a large number of tests
being written and executed.
However, this approach does not necessarily lead to thorough program testing.
There are three reasons for this:
1. Programmers prefer programming to testing and sometimes they take
shortcuts when writing tests. For example, they may write incomplete tests
that do not check for all possible exceptions that may occur.
2. Some tests can be very 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.
3. It’s difficult to judge the completeness of a set of tests. Although there are lot
of system tests, the test set may not provide complete coverage. Crucial parts
of the system may not be executed and so remain untested.
5.3.2 Pair Programming
Another innovative practice that has been introduced in XP is that programmers work
in pairs to develop the software.
They actually sit together at the same workstation to develop the software.
The use of pair programming has a number of advantages:
* It supports the idea of collective ownership and responsibility for the system.
* It acts as an informal review process because each line of code is looked at by
at least two people. Code inspections and reviews are very successful in
discovering a high percentage of software errors.
* It helps support refactoring, which is a process of software improvement. The
difficulty of implementing this in a normal development environment is that
effort in refactoring is expended for long-term benefit. An individual who
practices refactoring may be judged to be less efficient than one who simply
carries on developing code. Where pair programming and collective
ownership are used, others benefit immediately from the refactoring so they
are likely to support the process.
Scrum does not prescribe the use of programming practices such as pair programming
and test-first development.
It can therefore be used with more technical agile approaches, such as XP, to provide
a management framework for the project.
There are three phases in Scrum.
The first 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.
Finally, 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.
A Scrum sprint is a planning unit in which the work to be done is assessed, features
are selected for development, and the software is implemented.
At the end of a sprint, the completed functionality is delivered to stakeholders. Key
characteristics of this process are as follows:
1. Sprints are fixed length, normally 2–4 weeks. They correspond to the
development of a release of the system in XP.
2. The starting point for planning is the product backlog, which is the list of work
to be done on the project. During the assessment phase of the sprint, this is
reviewed, and priorities and risks are assigned. The customer is closely
involved in this process and can introduce new requirements or tasks at the
beginning of each sprint.
3. The selection phase involves all of the project team who work with the
customer to select the features and functionality to be developed during the
sprint.
4. Once these are agreed, the team organizes themselves to develop the software.
Short daily meetings involving all team members are held to review progress
and if necessary, reprioritize work.
5. At the end of the sprint, the work done is reviewed and presented to
stakeholders. The next sprint cycle then begins.
Advantages:
* The product is broken down into a set of manageable and understandable
chunks.
* Unstable requirements do not hold up progress.
* The whole team has 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.
medical staff, hospital managers, etc. are also stakeholders in the system. It is
practically impossible to involve all of these different stakeholders in the
development process.
There are two perspectives on the scaling of agile methods:
1. A ‘scaling up’ perspective, which is concerned with using these methods for
developing large software systems that cannot be developed by a small team
2. A ‘scaling out’ perspective, which is concerned with how agile methods can
be introduced across a large organization with many years of software
development experience.
It is difficult to introduce agile methods into large companies for a number of reasons:
* Project managers who do not have experience of agile methods may be
reluctant to accept the risk of a new approach, as they do not know how this
will affect their particular projects.
* 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. Sometimes, these are
supported by software tools (e.g., requirements management tools) and the use
of these tools is mandated for all projects.
* 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, and people with lower skill levels may not be
effective team members in agile processes.
* There may be cultural resistance to agile methods, especially in those
organizations that have a long history of using conventional systems
engineering processes
Principles:
* Highest priority is to satisfy the customer through early and continuous
delivery of valuable software
* Welcome changing requirements, even late in development. Agile processes
harness change for the customers competitive advantage
* Deliver working software frequently, from a couple of weeks to couple of
months, with a preference to the shortest timescale
* Business people and developers must work together daily throughout the
project.
* Build projects around motivated individuals. Give them the environment and
the support they need, and trust them to get the job done
* The most efficient and effective method of conveying information to and
within a development team is face-to-face conversation
* Working software is the primary measure of progress
* Agile processes promote sustainable development. The sponsors, developers
and users should be able to maintain a constant pace indefinitely
* Continuous attention to technical excellence and good design enhances agility
* Simplicity – the art of maximizing the amount of work not done – is essential
* The best architectures, assignments and designs emerge from self organizing
teams.
* At regular intervals the team reflects on how to become more effective, then
tunes and adjusts its behavior accordingly.