Chapter #3
Agile Software
Development
Exercises
Question: 3.1. At the end of their study program, students in a software engineering course
are typically expected to complete a major project. Explain how the agile methodology may be very
useful for the students to use in this case.
Answer:
The way I see it, Agile is the future and the skills learned in using it right are valuable in the
future (and they already are, though not all companies still use them effectively).
It can. Agile methodologies teach to do small steps and demonstrate success at each step, have
a clear definition of done, write automated test cases, and prioritize the most important things.
All of those principles are very helpful when a single person is doing a large project.
Also, if taught right, the Agile approaches will also make the project more manageable to do.
Working in small slices, a test at a time, is a good way to bite into the problem, but it also
requires that the students are taught those techniques in their studies. You can learn them on
your own, but I don’t think that would be responsible education.
Team centered, assisting with interaction.
Phase release, showing updates as they work
Specification, design, and implementation are interleaved.
No detailed system spec and design docs is minimized.
Question: 3.2. Explain how the principles underlying agile methods lead to the accelerated
development and deployment of software.
Answer:
Agile methods:
Agile methods develop the system in increments by using the incremental development
processes. These methods made the change of the system in the small increments depending on
the requirements of the customer. In this, the customers are included in the development
process. The agile methods focus on the software of the system instead of designing and
documentation. These methods allow the developers to deliver the software quickly to the
customer.
The principles of agile methods has contributed to the accelerated development and
deployment of software in the following ways:
1. Incremental delivery: In this process, the software is delivered in small increments to the
customer. Depends on the customer feedback and requirements, the developers made the
increments in the system. In every increment, the new functionalities are developed and
deployed into the system.
2. Customer involvement: The customers are involved in the development process of the
system. The agile methods involve regular discussions with the customer. As the development of
the system is done in small increments, the customer must involve in the development process
to provide the requirements of the new features in the system.
3. People, not process: One of the important principle to develop efficient software is to
recognize the technical skill of the people working in the development process of the system. It is
necessary to implement and deliver the product quickly with high quality.
4. Embrace change: As technology is developing, the changes must be done to the existing
system. The system must be designed as per the requirements of the changes to deploy the new
features in the system.
5. Maintain simplicity: As the changes in the system done frequently in small increments, the
code used in the system must be simple. If changes are required for the system, the existing
code must be restructured as per the requirements of the changes. The simplicity of the code
and the development process must be maintained without any complexity in the system.
Question: 3.3. Extreme programming expresses user requirements as stories, with each
story written on a card. Discuss the advantages and disadvantages of this approach to requirements
description.
Answer:
Extreme programming (XP) is perhaps the best known and most widely used of the agile method.
The name was coined by Beck because the approach was developed by pushing recognized good
practice.
Advantages of stories:
They represent real situations that commonly arise so the system will support the most
common user operations.
It is easy for users to understand and critique the stories.
They represent increments of functionality – implementing a story delivers some value to the
user.
Disadvantages of stories :
They are liable to be incomplete and their informal nature makes this incompleteness
difficult to detect.
They focus on functional requirements rather than non-functional requirements.
Representing cross-cutting system requirements such as performance and reliability is
impossible when stories are used.
The relationship between the system architecture and the user stories is unclear so
architectural design is difficult.
Question: 3.4. In test-first development, tests are written before the code. Explain how the
test suite may compromise the quality of the software system being developed.
Answer:
Test-first development:
Test-first development is the most important innovation in XP.
• Test-first development requires there to be a clear relationship between system
requirements and the code implementation.
• Writing tests first implicitly define the both an interface and specification of behaviour for the
functionality being developed.
• It is a test-first programming of the process of the writing tests and in the production of the
system requirements.
• Problems of requirements and interface misunderstanding are reduced.
Yes, Test-first development helps the programmer to develop a better understanding
of the system requirements:
• Test-first development helps with understanding the requirements to discover what is intended.
• Writing tests are sometimes impossible because the requirements are impossible.
• Writing tests before code clarifies the requirements to be implemented.
• Tests are written as a program that has to be executed correctly.
• In test-first development, each scenario is assessed and breaks down as tasks; each task
represents the feature of the system.
• It was very useful to compare the effort spent on the program by the programmers at the time
of debugging.
• If some bugs pop-up on debugging, the same test can be useful to capture that again and
again.
So, test-first development supports the programmer to develop a well kind of the system
requirements.
Difficulties with test-first development:
• Some of the difficulties are comes up with the programmers, they prefer programming to
testing and sometimes they take shortcuts when writing tests.
• While programming, it is difficult to predict how long debugging will take place, sometimes
the debugging efforts are wasted.
• Also, when the user fixes the bug in a debugging, sometimes the analysis is essentially lost.
• It is difficult to write tests, it leads to complex user interface that decreases the workflow of the
program in a system.
• Developers writing tests for better encoding to testing at times they use shortcuts.
o For example, if developer may not write complete tests, then do not check to all exception
cases.
• To write the incremental test development is very hard in sometimes. May not be reach
customer needs in less time.
• Test-first development is tough to justice the comprehensiveness of a set of tests. While
these tests not possible to coverage to entire cases of system.
• So, if the tests are not reviewed and further tests written after development, then undetected
bugs may be delivered in the system release.
The main problem with the test-first development is, some tests are very difficult to write
because it requires the system infrastructure is needed before anything can be tested.
Question: 3.5. Suggest four reasons why the productivity rate of programmers working as a
pair might be more than half that of two programmers working individually.
Answer:
A pair of developers would produce half as much code as two individuals working alone and
productivity with pair programming seems to be comparable with that of two people working
independently. And the best way to pair program is to just sit side by side in front of the monitor.
Slide the key board and mouse back and forth. Both programmers concentrate on the code being
written.
Reasons:
1. Pair programming makes the code less defective.
2. It increases the communication in discussing the software before development result in fewer
false starts and less rework. The number of errors avoided by the formal inspection is such that
less time is spent to repairs bugs in the testing phase.
3. All code to be sent into production is created by two people working together at a single
computer. Pair programming increases software quality without impacting time to deliver. It is
counter intuitive, but 2 people working at a single computer will add as much functionality as two
working separately except that it will be much higher in quality.
4. Pair programming encourages refactoring. The code is prone to be edited and enhanced to
increase effectiveness and testing the code will output in a non biased result.
Question: 3.6 Compare and contrast the Scrum approach to project management with
conventional plan-based approaches as discussed in Chapter 23. Your comparison should be based on
the effectiveness of each approach for planning the allocation of people to projects, estimating the
cost of projects, maintaining team cohesion, and managing changes in project team membership.
Answer:
Scrum Approach: Conventional plan-based Approaches:
Best for small-medium sized Best for Large security and safety
Effectiveness applicability: projects. required projects.
Planning allocation of people to The whole team is involved in the A manager will break down the work
projects: project. No project managers. parts and assigns the parts to teams of
Planning is participated by members involved.
everyone.
Easier to estimate costs as the
Determined during initial planning
project develops throughout the
phases. Cost is difficult to determine
increments of software
due to the amount of time needed and
Estimating Cost on projects: development, as the amount of
product feasibility being
time needed for development can
undeterminable.
be predicted easily.
Teams are always working
together on the same increment Teams are working on different parts of
and everything is visible to a system, therefore smaller teams work
Maintaining team cohesion: everyone. Frequent meetings held together as opposed to one large team
and tracks backlog of work. working together, not knowing what
other teams are doing.
Lesser number of members in the
project team due to all everybody Requires larger amounts of members to
Managing changes in project
working together. ensure the teams have sufficient
team membership:
members.
Question: 3.7. To reduce costs and the environmental impact of commuting, your company
decides to close a number of offices and to provide support for staff to work from home. However, the
senior management who introduce the policy are unaware that software is developed using Scrum.
Explain how you could use technology to support Scrum in a distributed environment to make this
possible. What problems are you likely to encounter using this approach?
Answer:
Difficulties:
The difficulties that may arise with this policy if making employees work from home are:
1. The benefits obtained through agile methods will be less effective.
2. Communication gap between the members of a team.
3. The benefit of error detection and evaluation through pair programming is lost.
4. Pair programming is not possible.
5. Due to sudden changes in the teams, the project development may be slowed down.
Measures:
The measures that can be taken to get around such difficulties are:
1. Rather than completely closing some offices and asking people to work from home,
employees can be moved to some offices and accommodated.
2. Communication within the members of the team must be improved and must communicate
regularly.
3. Information regarding project should be shared and communicated.
Question: 3.8. Why is it necessary to introduce some methods and documentation from
plan-based approaches when scaling agile methods to larger projects that are developed by
distributed development teams?
Answer:
Plan based approach of agile methodology
For stream lining the SDLC, the development methodology used is known as agile methodology.
The plan based approach is a part of agile methodology.
Project planning is often essential when developing software with larger teams to (a) ensure that
the right people are available when they are needed to be involved in the development process and
(b) ensure that the delivery schedules of different parts of the system developed by different teams
are aligned. This means that if Part A depends on Part B, the schedule should ensure that Part B is
developed before Part A.
Requirements analysis and documentation is important to decide how to distribute the work across
teams and to ensure that each team has some understanding of what other teams are doing.
Design documentation especially interface specifications are important so that teams can develop
independently without having access to software that is under development.
Risk management may be required to ensure that all of the teams understand the risks faced and
can organize their work to minimize these risks. Risk management may also be useful to cope with
different delivery schedules used by different teams.
Question: 3.9. Explain why agile methods may not work well in organizations that have
teams with a wide range of skills and abilities and well-established processes.
Answer:
This is mainly because the agile method involves the use of procedures which usually lack
concrete steps.
The agile methods may not work well in organizations that have teams with a wide range of skills
and abilities and well-established processes mainly because the agile method involves the use of
procedures which usually lack concrete steps.
While the so called companies are usually guided by various concrete steps in their mode of
functions/operation.
Question: 3.10. One of the problems of having a user closely involved with a
software development team is that they “go native.” That is, they adopt the outlook
of the development team and lose sight of the needs of their user colleagues. Suggest
three ways how you might avoid this problem, and discuss the advantages and
disadvantages of each approach.
Answer:
Faced problems on user involvement with the development team:
The following are the advantages and disadvantages that need to be corrected to recover from
the “go-native” problem:
Validating the suggestions given by the user with the different users:
The suggestions given by the user must be validated with the suggestions given by any different
user.
Advantage:
• By discussing the suggestion of users helps to check the user suggestions independently.
Disadvantage:
• If the suggestions are discussed in independent manner then it slows down the process of
software.
• If the project gets delayed then it leads to extra cost for the project.
Getting the suggestions from multiple users:
Multiple users must be involved in development team to get the suggestions.
Advantage:
• By multiple suggestions, the multiple perspective views from different users can be obtained
for specific problem.
• The probability of having any typical user will decrease.
Disadvantage:
• There may be a possibility of correlation on suggestions from different users.
• If the correlation rises, then it makes extra cost to complete the project.
Changing the member from the team:
If any of the user suggestion creates a problem in team. Then, change the user from the team.
Advantage:
• By multiple suggestions, the multiple perspective views from different users can be obtained.
• By discussing the suggestion of users helps to check the user suggestions independently.
Disadvantage:
• It is possible that the new user is not aware of the system. So, he/she will take time to
understand the system to give suggestions.
• Checking the user’s suggestions independently leads to increase the productivity time of the
project.
• If the project gets delayed then it leads to extra cost for the project.