1.fundamentals of Agile
1.fundamentals of Agile
1.fundamentals of Agile
FUNDAMENTALS OF AGILE
The timeline above contains some key moments in the history of agile, and some other
interesting events taking place at that same time for reference.
1970 – Waterfall Model was created (by Winston W Royce.) Interestingly enough some
of the risks he called out have been realized and are much of the reason we saw agile
come into existence.
“I believe in this concept, but the implementation described is risky”.
“The required design changes are likely to be so disruptive that the software
requirements upon which the design is based and which provides the rationale for
everything…. are violated. Either the requirements must be modified, or a substantial
change in the design is required. In effect the development process has returned to the
origin and one can expect up to a 100-percent overrun in schedule and/or costs.”
1970 – Also, Gas is 36 cents per gallon. Wut?!
1990 – Jeff Sutherland and Ken Schwaber conceived the Scrum process in the early 90’s.
1991 – Also, the release of Nirvana’s Nevermind signified the start of the Grunge era that
would dominate the music scene up to the mid-90’s.
1995 – Scrum is codified in 1995 in order to present it at a conference in Austin, Texas
(US) and published the paper “SCRUM Software Development Process”.
Scrum was first tried and refined at Individual, Inc., Fidelity Investments, and IDX
(now GE Medical). These weren’t simply startups with greenfield development
efforts.
1995 – Also, OJ Simpson was found NOT GUILTY!
2001 – In February 2001, Jeff and Ken were amongst 17 software development leaders
creating the Manifesto for Agile Software Development. – Their goal was to take all the
good things they’ve learned and create a “charter” for others to use. By this time there
had been many variations of agility that evolved. The manifesto was taking the best of
the best and boiling it down to principles rather than a framework or methodology.
2001 – Also, Lord of the Rings comes out in Theaters.
For more information about the 4 values of agile software development, read our overview of the
4 agile values.
The 12 Agile Principles
In addition to its 4 values, The Agile Manifesto also outlines 12 principles for agile development
practices. These 12 principles emphasize things like “early and continuous delivery of valuable
software” and “continuous attention to technical excellence.” Ready for more? Read our
full overview of the 12 agile principles.
The 4 Agile Manifesto Values
Agile software development is built on these four values, which also serve as priority areas for
teams to concentrate their efforts-
1) Individuals and Interactions over Processes and Tools- The first value focuses on the
people, which is at the heart of the Agile process. The best procedures and resources can be used
to aid your projects, but they won't be effective unless your staff members are giving it their all.
Your crew is your most important asset. Here, communication is crucial because it allows people
to share ideas and produce better goods when they do so frequently.
2) Working Software Over Comprehensive Documentation- Teams would spend hours
producing lengthy documents containing technical specs, needs, and more before Agile
techniques were completely embraced. These lists would be created before programmers began
writing the code, which meant that the entire process would be delayed because it would take so
long to generate the documentation.
The goal of the Agile methodology is to condense the content in such documents into user
stories. The developer can begin working on the software and make it ready for release using the
information provided in these stories. The goal is to hasten the product launch and make early
adjustments to the product in order to enhance the software in subsequent iterations.
3) Customer Collaboration over Contract Negotiation- The Agile Manifesto's third value
recognizes the significance of customer collaboration. Contrary to contract negotiation, which
entails discussing product requirements with the client before the project begins and then
renegotiating those deliverables at a different stage, this is regarded as being preferable.
Customers are not involved in the development process, which causes teams to miss out on user
feedback that could improve the product.
You can routinely solicit feedback from your clients and consider their suggestions when you
involve them in the development process. While the programme is still being developed,
developers may learn a lot about users' unique demands and use that information to build the best
possible user experience.
4) Responding to Change over Following a Plan- Traditional approaches favoured as slight
change as possible since they understood that major changes may require a lot of time and
money. The goal was to develop a thorough plan that had a clear, linear course and avoided
obstructions whenever possible.
This inflexible approach is turned on its head by the Agile philosophy, which contends that
change can be advantageous to the software development process. By accepting change, you
make yourself more receptive to new opportunities and methods to grow. Agile teams can react
rapidly and make changes continuously because they operate in brief, iterative cycles. In the end,
this produces quality products.
Join our Agile Programme Management course to learn more about Agile Project
Management!
The 12 Agile Manifesto Principles
1) Satisfy Clients through Early and Continual Delivery-
Original Formulation- “Our highest priority is to satisfy the customer through early and
continuous delivery of valuable software.”
What is the most important piece of software development advice? Keep your client satisfied.
Instead of making your users wait for a single, large delivery, try to give software to them
frequently during the course of the project.
2) Welcome Fluctuating Requirements-
Original Formulation- “Welcome changing requirements, even late in development. Agile
processes harness change for the customer's competitive advantage.”
Software engineers should be able to manage project changes made at the last minute. They
ought to be adaptable enough to swiftly transform these adjustments into enhancements,
reducing delays and ensuring a constant flow of work.
3) Deliver Value Persistently-
Original Formulation- “Deliver working software frequently, from a couple of weeks to a couple
of months, with a preference to the shorter timescale.”
Agile teams divide lengthy projects into manageable timeframes to ensure regular delivery.
These time frames are referred to as sprints in the Scrum methodology, and they typically last
between one and four weeks.
4) Communicate Better for Better Synchronization-
Original Formulation- “Business people and developers must work together daily throughout the
project.”
As discussed, Collaboration is essential to Agile Project Management. Daily communication
among project stakeholders reduces the possibility of misunderstanding and guarantees that
everyone's objectives stay congruent.
5) Reduce Micromanagement-
Original Formulation- ‘Build projects around motivated individuals. Give them the environment
and support they need and trust them to get the job done.”
The project is more likely to succeed if you have the correct individuals for the job. Choose the
ideal team carefully, give them the tools they require, and have faith in their ability to produce
outstanding results.
6) Communicate in Person-
Original Formulation- “The most efficient and effective method of conveying information to and
within a development team is face-to-face conversation.”
When teams can communicate face-to-face, barriers can be quickly broken. Co-locating teams is
a smart idea whenever it can help with communication and information flow. Zoom is an
excellent alternative to phone or email in a remote workplace, allowing employees to
communicate more effectively via video.
7) Produce a Working Software-
Original Formulation- “Working software is the primary measure of progress.”
You must produce top-notch software if you want to keep your clients happy. Your top priority
and success metric should be that; everything else is just a side note.
8) Maintain a Sustainable Working Rate-
Original Formulation- “Agile processes promote sustainable development. The sponsors,
developers, and users should be able to maintain a constant pace indefinitely.”
Agile teams must retain their speed and consistency throughout the whole project life cycle. This
indicates that they are resilient to delays in an environment that is continually changing.
9) Consistent Excellence Enhances Agility-
Original Formulation- “Continuous attention to technical excellence and good design enhances
agility.”
Agile emphasises continual improvement and innovation rather to merely producing one
excellent product and calling it a day. Every iteration ought to provide some form of new
improvement, feature, or update.
10) Simplicity is Vital-
Original Formulation- “Simplicity — the art of maximizing the amount of work not done — is
essential.”
The agile methodology emphasises meeting requirements and doing just enough to finish a task
without overcomplicating things. Avoid wasting time on extra stages that don't actually improve
your product.
11) Self-managing Teams Create More Value-
Original Formulation- “The best architectures, requirements, and designs emerge from self-
organizing teams.”
Why supervise teams when they are capable of working independently? You give ideas greater
room to grow and eventually provide better results by letting them operate within their own
structures.
12) Regularly Reflect at your Work Progress-
Original Formulation- “At regular intervals, the team reflects on how to become more effective,
then tunes and adjusts its behaviour accordingly.”
Regular performance reviews allow you to identify problems before they become serious and
potential areas for development. Self-reflection is an important part of a good Agile team since it
enables them to stop using unhealthy practices and develop new ones.
OVERVIEW OF SCRUM
Scrum is a simple process model that is mainly used in software development. It focuses
on people, collaboration and self-managing. Reflecting, learning and adapting play an
important role. The goal is to deliver usable product increments regularly, to deal with
unpredictability, to solve complex problems and to become better and better. Scrum is based on
specific values, principles and practices. Below you will find an overview of the Scrum
Framework with its Roles, Artifacts and Events.
Th
e Scrum Framework as described in the Scrum Guide 2020
The Scrum Framework
Scrum is simple and consists only of a few elements. However, these must be applied
consistently for Scrum to be successful. In the above overview you can see the essential elements
of Scrum, which are also briefly described in the Scrum Guide. These are then described in a
summary below but in detail in the in my comprehensive book about Agile Project
Management and Scrum.
A Scrum project is carried out in successive, short work cycles (iterations) with the same
duration of a maximum of 30 days. These cycles are called Sprints in Scrum. In Sprints,
requirements from the Product Backlog, which is the prioritized collection of all requirements,
are converted into a potentially shippable Product Increment. This means that every Sprint
produces executable, tested and documented software that is of benefit to the customer..
Before the Scrum project can start, the requirements for the first Sprints must first be defined.
The requirements are usually described in user stories and each user story then represents
a Product Backlog Item (PBI). These are then filled and prioritized in the Product Backlog. New
requirements can be added to the Product Backlog at any time during project execution, existing
requirements can be changed or omitted.
At the start of each Sprint, the Sprint Planning is carried out. The Developers select so many of
the high prioritized items from the Product Backlog that they can implement in a Product
Increment in the Sprint. These requirements then define the Sprint Backlog. Then the Developers
start and realizes the requirements in the Sprint. The Daily Scrum takes place every day at the
same time and at the same place. This is a short meeting where the Developers exchanges ideas,
coordinates the work and identify impediments.
At the end of the Sprint, the results are reviewed by the Scrum Team and the stakeholders in
the Sprint Review and future adjustments are defined. After the Sprint Review, the Sprint
Retrospective takes place, in which the Scrum Team reflects on the collaboration, workflows and
impediments and defines improvement measures for the following Sprints.
The 3 Roles in Scrum
Scrum defines three roles, their tasks and accountabilities. The roles are:
Product Owner
Developers
Scrum Master
All three roles together are called Scrum-Team. In addition to these three “official” Scrum roles,
there are other important roles or stakeholders: Users, management, business and IT
representatives.
The 5 Scrum Events
Five events are defined in Scrum. These are activities and meetings related to the Sprint. The
following events are listed in the Scrum Guide:
Sprint
Sprint Planning
Daily Scrum
Sprint Review
Retrospective
With the exception of the Sprint, which serves as a container for all other events, each Scrum
event is a formal opportunity to inspect and adapt something. These events are specifically
designed to enable critical transparency and inspection.
The 3 Scrum Artifacts
Besides the three roles and five events, Scrum also defines three artifacts. Artifacts are products
that are developed as intermediate or final results in software development. In Scrum, the
purpose of these is to provide maximum transparency about the key information in the project
and to structure the collaboration. The artifacts represent business value or work. They will help
the Scrum Team and all participants in the project with gaining the same understanding of the
information. These artifacts are the:
Product Backlog
Sprint Backlog
Shippable Product Increment
Besides the three artifacts described in the Scrum Guide, there are others that have proven
themselves in Scrum practice. These are, for example:
Product Vision
Release Plan
Taskboard
Impediment Backlog
Burndown Chart
Team Backlog
Velocity Chart
Rules for Collaboration
Themes and Parking Lot
In the Scrum Guide, you will find the chapter “Artifact Transparency” with the “Definition of
Done”. This is about the transparency of the defined artifacts regarding information, decisions,
quality and completion
EXTREME PROGRAMMING
Extreme programming is a software development methodology that’s part of what’s collectively
known as agile methodologies. XP is built upon values, principles, and practices, and its goal is
to allow small to mid-sized teams to produce high-quality software and adapt to evolving and
changing requirements.
What sets XP apart from the other agile methodologies is that XP emphasizes the technical
aspects of software development. Extreme programming is precise about how engineers work
since following engineering practices allows teams to deliver high-quality code at a sustainable
pace.
Extreme programming is, in a nutshell, about good practices taken to an extreme. Since pair-
programming is good, let’s do it all of the time. Since testing early is good, let’s test before the
production code is even written.
A Brief History of Extreme Programming
XP’s origin dates back to the 90s when Kent Beck — who would later become one of the authors
of the Agile Manifesto — created it when hired to lead Chrysler’s Comprehensive Compensation
System team.
The project had started in 1993 and by 1996 hadn’t progressed much. Since Beck was new to
managing a team, he decided the best course of action would be to teach his team members the
techniques and practices that worked for him. They started applying practices such as pair
programming and TDD with great success. Ron Jeffries — a friend of Beck and another author
of the Agile Manifesto — was brought in to coach C3’s team.
In 1999, Kent Beck formalized the practices, principles, and values of XP in his book Extreme
Programming Explained: Embrace Change.
How Does Extreme Programming (XP) Work?
XP, unlike other methodologies, is very opinionated when it comes to engineering practices.
Besides practices, XP is built upon values and principles.
Values provide purpose to teams. They act as a “north star” to guide your decisions in a high-
level way. However, values are abstract and too fuzzy for specific guidance. For instance: saying
that you value communication can result in many different outcomes.
Practices are, in some ways, the opposite of values. They’re concrete and down to earth, defining
the specifics of what to do. Practices help teams hold themselves accountable to the values. For
instance, the practice of Informative Workspaces favors transparent and simple communication.
Principles are domain-specific guidelines that bridge the gap between practices and values.
XP Values
The XP values: communication, simplicity, feedback, courage, and respect. Let’s look at each
one of them in more detail.
Communication: Lack of communication prevents knowledge from flowing inside a team. Often,
when there’s a problem, someone already knows how to solve it. But lack of communication
prevents them from learning about the problem or contributing to its solution. So, the problem
ends up being solved twice, generating waste.
Simplicity: Simplicity says you always strive to do the simplest thing that works. It’s often
misunderstood and taken as the simplest thing, period, ignoring the “that works” part.
It’s also crucial to remember that simplicity is highly contextual. What’s simple for one team, is
complex for another depending entirely on each team’s skills, experience, and knowledge.
Feedback: Feedback in more traditional, waterfall-like software development methodologies
often is “too little, too late”.
XP, however, embraces change and XP teams strive to receive early, constant feedback. If there
is a need to course-correct, XPers want to know that as soon as possible.
Feedback comes in many shapes and sizes. When you’re pair programming, the comments of
your peer are vital feedback. So are the opinions from other team members about an idea,
including the customer who, ideally, is a member of the team.
Tests are another source of precious feedback that go beyond the test results. Whether writing
tests is easy or hard is feedback too. If you’re having a hard time writing tests, your design is
probably too complex. Listen to the feedback and simplify your design.
Something that sounds like a great idea might not work that well in practice. So, finished code is
also a source of feedback, as is a deployed product.
Finally, bear in mind that there’s such a thing as too much feedback. If a team generates more
feedback than it can handle, important feedback may drop off the radar. It’s essential to then
slow down and figure out what causes the feedback excess and fix it.
Courage: Kent Beck defines courage as “effective action in the face of fear.” As a software
engineer, you have plenty to be afraid of and therefore plenty of opportunities to show courage.
It takes courage to speak the truth, especially unpleasant ones — for instance, honest estimates.
Giving and receiving feedback also takes courage. And it takes courage to avoid falling into
the sunk cost fallacy and discard a failing solution that received substantial investments.
Respect: A fundamental premise of XP is that everyone cares about their work. No amount of
technical excellence can save a project if there’s no care and respect.
Every person is worthy of dignity and respect, and that includes, of course, the people affected
by a software development project. When you and your team members respect and care about
each other, the customer, the project, and its future users, everyone gains
XP Principles
Principles provide more specific guidance than values. They’re guidelines that illuminate the
values and make them more explicit and less ambiguous.
For instance, based on the value of courage alone, you could conclude that it’s advisable to
tackle a big change at once in the program. However, the principle of Baby Steps tells us that big
changes are risky. So, you want to favor tiny ones instead.
Humanity: Humans create software for humans, a fact that’s often overlooked. But taking human
basic needs, strengths, and weaknesses into account creates products humans want to use. And a
work environment that gives you the opportunity for accomplishment and growth, the feeling of
belonging, and basic safety, is a place where you more easily take others’ needs into account.
Economics: In XP, teams heed the economic realities of software development all the time, they
constantly assess the economic risks and needs of the project.
For instance, they’d implement user stories according to their business value rather than
technical concerns.
Mutual Benefit: Following XP, you avoid solutions that benefit one party to the detriment of
another. For instance, extensive specifications might help someone else understand it, but it takes
you away from implementing it, and it delays it for your users.
A mutually beneficial solution is to use automated acceptance tests. You get immediate feedback
on your implementation, your colleagues get precise specifications in code, and users get their
features sooner. Plus, all of you get a safety net against regressions.
Self-similarity: If a given solution works at a level, it might also work at a higher or lower level.
For instance, obtaining early and constant feedback is at play at various levels in XP.
at the developer level, programmers receive feedback from their work using the test-first
approach;
at the team level, the continuous integration pipeline integrates, builds, and tests the code
several times a day;
at the organization level, the weekly and quarterly cycles allow teams to get feedback and
improve their work as needed.
Improvement: According to the principle of improvement, teams don’t strive for perfection in an
initial implementation but for a good enough one, and to then learn and improve it continuously
with feedback from real users.
Diversity: You and your coworkers benefit from a diversity of perspectives, skills, and attitudes.
Such diversity often leads to conflict, but that’s okay.
Conflict and disagreement are opportunities for better ideas to arise when everyone plays by the
values of courage and respect. Courage to express opposing points of view, respect to expressing
those in a civil and empathetic way. And all of this is an exercise in effective communication.
Reflection: Great teams reflect on their work and analyze how to be better. XP offers plenty of
opportunities for that. Not just in its weekly and quarterly cycles, but in every practice it
promotes.
Feelings are important to consider in addition to logical analysis. Your gut can inform you before
you can reason about something. And so can talking to non-technical people, they can ask
questions that open up entirely new possibilities.
Flow: Traditional software development methodologies have discrete phases, which last for a
long time and have few feedback and course correction opportunities. Instead, software
development in XP occurs in activities that happen all of the time, in a consistent “flow” of
value.
Opportunity: Problems are inevitable in software development. However, every problem is an
opportunity for improvement. Learn to look at them that way and you’re far more likely to come
up with creative, goal-oriented solutions that also serve to prevent them from happening again.
Redundancy: The redundancy principle says that if a given problem is critical, you must employ
many tactics to counter it.
Take defects. There isn’t a single tactic that can prevent all defects from escaping to production.
So XP’s solution is to stack a bunch of quality measures. Pair programming, tests, continuous
integration. Each a single line of defense, together a virtually impenetrable wall.
Failure: Failure isn’t waste when it results in knowledge. Acting and quickly learning what
doesn’t work is way more productive than inaction caused by indecision in choosing between
many options.
Quality: Often people think there’s a dilemma between quality and speed.
It’s the opposite: pushing for quality improvements is what makes you go faster.
For instance, refactoring — changing the structure of the code without altering its behavior — is
a practice that makes the code easier to understand and change. As a result, you become less
likely to introduce defects to the code, which allows you to deliver more value sooner by not
having to fix bugs.
Baby Steps: Big changes are risky. XP mitigates that risk by doing changes in tiny steps, at all
levels.
Programmers write code in tiny steps using test-driven development. They integrate their code to
the mainline several times a day, instead of only every few weeks or even months. The project
itself occurs in short cycles rather than long-lasting phases.
Accepted Responsibility: In XP, responsibility should be accepted, never assigned.
Responsibility should be accompanied by the authority to make decisions on what you’re
responsible for. The reverse also applies. You don’t want people making decisions if they don’t
have to live with their consequences.
Similarities and Differentiators
How does XP differ from traditional, non-agile methodologies?
Extreme programming, being part of agile, it’s all about embracing and welcoming change rather
than following rigid plans. It’s about iterative design rather than a big design upfront.
XP differs dramatically from traditional methodologies — i.e. waterfall — by avoiding long-
lasting phases.
Instead of a planning phase, in XP you plan at the start of each development cycle which
usually lasts just a week.
Instead of testing episodes, you test your application as soon as you can: that is before the
actual code is implemented.
Instead of implementing features in isolation during long implementation phases and then
struggling to merge your contributions to the main line, you work in small chunks and
integrate those chunks as often as possible.
Eliminating the Waste: To identify and eliminate wastes e.g. unnecessary code, delay in
processes, inefficient communication, the issue with quality, data duplication, more tasks in
the log than completed, etc. regular meetings are held by Project Managers. Which allows
team members to point out faults and suggest changes in the next turn.
Fast Delivery: Previously long time planning used to be the key success in business, but in
the passage of time it is found that engineers spend too much time on building complex
systems with unwanted features. So they came up with an MVP strategy which resulted in the
building products quickly that included a little functionality and launch the product to market
and see the reaction. Such an approach allows them to enhance the product on the basis of
customer feedback.
Amplify Learning: Learning is improved through ample code reviewing, meeting that is
cross-team applicable. It is also ensured that particular knowledge isn’t accumulated by one
engineer who’s writing a particular piece of code so paired programming is used.
Builds Quality: LSD is all about prevent waste, keeping an eye on not sacrificing quality.
Developers often apply test-driven programming to examine the code before it is written. The
quality can also be gained to get constant feedback from team members and project managers.
Respect Teamwork: LSD focuses on empowering team members, rather than controlling
them. Setting up a collaborative atmosphere, keep perfect balance when there are short
deadlines and immense workload. This method becomes very much important when new
members join a well-established team.
Delay the Commitment: In traditional project management it often happens when you make
your application and it turns out to be completely unfit for the market. LSD method
recognizes this threat and makes room for improvement by postponing irreversible decisions
until all experiment is done. This methodology always constructs software as flexible, so the
new knowledge is available and engineers can make improvements.
Optimizing the whole system: lean’s principle allows managers to break an issue into small
constituent parts to optimize the team’s workflow, create unity among members, and inspire a
sense of shared responsibility which results in enhancing the team performance.
Weakness in LSD :
Make it scalable as other frameworks since it strongly depends on the team involved.
It is hard to keep pace so it is not easy for developers to work with team members as
conflict may occur between them.
It leads to a difficult decision-making process as it is mandatory for customers to clearly
set their requirements for the development not to be interrupted.
Lean Software Development is one of the proactive approaches that drives your body through
productivity and cleanliness. It closely connects to Agile methodology, knowledge-sharing
experience, fast product delivery. All processes and stages of development are accurately built
to deliver the end product at minimum cost in a timely manner.
TDD is a programming technique that enables the developer to take a small step during building
software. It gives a way to think through one's requirements or design before the developer
writes functional code. Consider an example, developer write some code, then compile it, and
then test it. Maybe there are chances of failure. In this case, it becomes easy to find and fix those
defects if a developer had written two new lines of code than a thousand. TDD is most efficient
and attractive way to proceed in smaller steps.
Below are the benefits of TDD
Development expenses are reduced
Improved Code Quality
Quality is enhanced
Shortened Time to Market
More productive as compared to attempting to code in giant steps.
Fewer Bugs.
Higher quality software.
Focus on single functionality at a given point in time.
RPA is an automation technology in which RPA developers automate repetitive, manual
business processes through different RPA tools. Source: RPA Testing Methodology
How it works?
Firstly, add a test.
Run all the tests and see if any new test fails.
Update the code to make it pass the new tests.
Rerun the test and if they fail, then refactor again and repeat.
Test Driven Development Workflow
It promotes the idea of each test case testing one piece of functionality at a time. The workflow
of it is as follows –
Write a concise, minimal test for a new piece of functionality. This test will fail since the
functionality isn’t implemented yet (if it passes, one knows that the functionality either already
exists or that the test isn’t designed correctly).
Implement the new functionality and run all tests, both the new and pre-existing ones. Repeat
until all tests pass.
Clean up the code and ensure that all tests still pass, then return to step 1.
Why it is important?
Requirements - Drive out requirement issues early (more focus on requirements in depth).
Rapid Feedback - Many small changes Vs. One significant change.
Values Refactoring - Refactor often to lower impact and risk.
Design to Test - Testing driving good design practice.
Tests as information - Documenting decisions and assumptions.
It helps the programmer in several ways, such as -
Improve the code.
Side by side, increasing the programmer’s productivity.
Using Test Driven Development concept in one's programming skills -
It will save the developer's time which is wasting rework.
Able to identify the error/problem quicker and faster.
The programmer will write small classes focused only on a single functionality instead of writing
the big classes.
Whenever the code base gets more prominent, it becomes tough to change and debug the code.
Moreover, there is a high chance of mess up of the code.
But, if developers are using its technique -
Means developers have automated tests.
Writing the test cases for the program is a safe side for the programmers.
It becomes easy to view what the error is, where it is and how it is paralyzing one's code.
Need for Test Driven Development
Ensures quality – It helps in ensuring the quality by focusing on requirements before writing the
code.
Keeps code neat and tidy – It assists in keeping the code clear, simple, and testable by breaking it
down into small achievable steps.
Maintains Documentation – It provides documentation about how the system works for anyone
coming into the team later.
Repeatable Test and rapid change – It builds a suite of repeatable regression tests and acts as an
enabler for rapid change.
Test-Driven Development in Python is an approach in which we build a test first, then fail the
test, and finally refactor our code to pass the test. Source: TDD in Python
CONTINUOUS INTEGRATION
Continuous Integration Continuous Integration (CI) is the process of taking features from the
Program Backlog and developing, testing, integrating, and validating them in a staging
environment where they are ready for deployment and release. CI is the second aspect in the
four-part Continuous Delivery Pipeline of Continuous Exploration (CE), Continuous Integration
(CI), Continuous Deployment, and Release on Demand (Figure 1). Figure 1. Continuous
integration in the context of the continuous delivery pipeline. Details Continuous integration is a
critical technical practice for each Agile Release Train (ART). It improves quality, reduces risk,
and establishes a fast, reliable, and sustainable development pace. With continuous integration,
the “system always runs,” meaning it’s potentially deployable, even during development. CI is
most easily applied to software solutions where small, tested vertical threads can deliver value
independently. In larger, multi-platform software systems, the challenge is harder. Each platform
has technical constructs, and the platforms must be continuously integrated to prove new
functionality. In complex systems comprised of software, hardware, and components and
services provided by suppliers, CI is harder still. But the fact remains: integrating and testing
components together frequently is the only practical way to fully validate a solution. As a result,
teams need a balanced approach, one that allows them to build quality in and receive fast
feedback on their integrated work. For purely software-based solutions, continuous integration is
relatively easy to achieve with modern tools. For more complex systems composed of hardware
and software, a ‘continuish integration’ approach is required (see the Enterprise Solution
Delivery article) to balance the economic trade-offs between frequency, the scope of integration,
and testing. The Four Activities of Continuous Integration As illustrated in Figure 2, SAFe
describes four activities associated with continuous integration: Develop describes the practices
necessary to implement stories and commit the code and components to version control Build
describes the practices needed to create deployable binaries and merge development branches
into the trunk Test end-to-end describes the practices necessary to validate the solution Stage
describes the practices necessary to host and validate the solution in a staging environment
before production Figure 2. Four activities of continuous integration Develop the Solution
Developing the solution refers to the implementation of stories by refining features from the
Program Backlog as may be needed and then coding, testing, and committing the work product
into the source control system. Testing in this activity tends to focus on unit and story-level
testing and most times requires test doubles (see Test-Driven Development) to replicate other
components or subsystems. Seven practices are associated with developing the solution: Break
features into stories – Splitting features into stories enables continuous delivery via small batches
and smooth integration. This may include creating user story maps to ensure that workflows are
designed to meet customer needs. Behavior-Driven Development (BDD) –BDD is a process
Product Owners and teams use to more thoroughly understand requirements and improve quality
by creating acceptance criteria and acceptance tests, and often automating them, before the code
is even written. BDD works with TDD and is more fully described here. Test-Driven
Development (TDD) – TDD involves writing the unit test first, then building the minimal code
needed to pass the test. This leads to better design, higher quality, and increased productivity.
TDD works with BDD and is more fully described here. Version control – Effective version
control allows teams to recover quickly from problems and to improve quality by making sure
the right components are integrated together. Aggregating assets under version control is a
leading indicator of continuous integration maturity. Built-in quality – Built-In Quality
prescribes practices around flow, architecture & design quality, code quality, system quality, and
release quality. Application telemetry – Application telemetry is the primary mechanism that
acquires and then uses application data to help determine the results of relevant hypotheses.
Threat modeling – In addition to the threat modeling done in the Architect activity of continuous
exploration, attention should be given during system design to possible vulnerabilities that may
be introduced into the system. Build the Solution During the build phase, teams continuously
integrate new code. This can be accomplished by automating the build and test tools to run upon
code commit. Passing versus not-yet-passing and broken automated tests are the real indicators
of progress. Automating code building enables teams to fix problems quickly, before they affect
larger parts of the system. Addressing a broken build should be the highest priority. A ‘gated
commit’ ensures software has passed the gate (e.g. unit tested, performance tested, and free of
known defects, etc.) before being checked into the main codebase or trunk. Code that passes the
gate is automatically integrated into the trunk; which removes the complications of managing
multiple branches. This trunk-based development helps to ensure the code can be reliably
released on demand without the need for costly code freezes or hardening iterations. There are
five practices which can help build the solution: Continuous code integration – Code commit
should automatically trigger compilation and testing of changes. Ideally, this happens on each
commit but should happen at least several times a day. Build and test automation – The
compilation process should be automated and include unit- and story-level tests to verify the
change. These tests often use test doubles to replicate other parts of the systems and enable fast
builds. Trunk-based development – Long-lived branches must be avoided. Teams should merge
back as quickly as they can, at least once per day, and all teams should work off a single trunk.
Gated commit – Committing to a single trunk is risky, as broken changes can impact many
teams. This is why only the changes that have been validated through the build and test process
are merged into the trunk. Application security – Code analysis tools inspect the code and third-
party packages for known vulnerabilities. Test the solution end-to-end While critical, automated
local story and component testing aren’t enough. In order to thoroughly test features, system-
level integration and testing are required. With the support of the System Team, the work of all
teams on the ART must be frequently integrated to assure that the solution is evolving as
anticipated, as Figure 3 illustrates. Figure 3. Integrating the work of all teams on the ART
System-level testing happens as frequently as possible during the iteration, ideally after every
commit. However, whatever the circumstances, such full-system integration must be
accomplished at least once per iteration. Otherwise, the late discovery of defects and issues
reflects back to earlier iterations, causing substantial rework and delays. There are five practices
which can help in end-to-end system testing: Test and production environment congruity –
Environment congruity assures that testing exercises the solution as it would behave in front of
live users and decreases the probability that defects will escape into production. Test automation
– Many types of tests need to be run: functional testing, integration testing, regression testing,
etc. The Agile Testing article details a testing matrix of what can and should be automated. Test
data management – To create stability, tests must be consistent and realistic, replicating
production as much as possible, and under source control. Service virtualization – Different
kinds of testing require different environments. Service virtualizations allow teams to simulate a
production environment without the costs and effort associated with creating and managing real
environments. Testing nonfunctional requirements (NFRs) – system attributes such as security,
reliability, performance, maintainability, scalability, and usability must also be thoroughly tested.
Continuous integration with suppliers – Suppliers bring unique contributions that can have a
significant impact on lead-time and value delivery. Their work must be continuously integrated
as well. It helps to adopt a shared integration cadence and establish objective evaluation
milestones. Validate on Staging Finally, the entire solution must be validated on a staging
environment, based on the following practices: Maintain a staging environment –A staging
environment, which matches production provides the place for such validation. Blue/Green
deployment – The blue/green pattern involves two environments–live (production) and idle
(staging). Changes flow continuously to the idle environment where they are staged until ready
to deploy to production. At that point, a switch is flipped (a load balancer is updated for
example), and the idle environment becomes the live environment, while the previous live
environment becomes the new idle environment. This enables continuous delivery, zero-
downtime deployment, and fast recovery from failures. System demo – This is the event where
stakeholders evaluate a solution’s readiness to be deployed to production. Enabling a Culture of
Continuous Integration Continuously integrating large and complex systems is a time-consuming
journey. The following section provides some suggestions for building a successful CI culture
and practice. Integrate often – The more frequently teams integrate, the quicker they find
problems. And the harder it is to do, the more often they need to do it—eliminating impediments
and adding automation along the way. This results in faster learning cycles and less rework.
Make integration results visible – When the integration process breaks, everybody should know
it broke and why. When it’s fixed, new tests should be added to detect the problem earlier and
prevent it from happening again. Fixing failed integrations is a top priority – Teams that just
keep working through integration failures fall short of the values and culture associated with
building a system that can be released into production at any time. To create the right sense of
urgency and importance needed to fix integration problems, teams often use flashing lights or
other notifications to draw attention to a broken build, and establish visible indicators displaying
the percentage of the time the system remains broken. Establish common cadence – Integration
points are more accessible when all the teams are moving at the same consistent rhythm. If full
CI can’t be accomplished during the course of an iteration, teams can make near-term trade-offs
on what can be integrated, while continuously improving their techniques and infrastructure
toward this goal. Develop and maintain proper infrastructure – Effective continuous integration
depends on the availability of test and staging environments. Infrastructure is, of course, an
investment. But Lean-Agile Leaders take the long view and make the investments necessary
today to increase velocity for the marathon ahead. Apply supportive software engineering
practices – Continuous integration is easier when the system is designed with those concerns in
mind. Test-first development and designing for testability call for more modular solutions and
separation of concerns, as well as using primary interfaces and physical test points. Enabling
Continuous Integration with DevOps Continuous integration involves crucial ‘development’
activities that originally inspired the ‘Dev’ in DevOps. These activities are focused on solution
development and pipeline flow through pre-production environments. Applying DevOps
thinking, practices, and tooling in this segment of the value stream enables rapid development,
frequent code integration, and built-in quality and compliance. As illustrated in Figure 4,
continuous integration is enabled by SAFe’s CALMR approach to DevOps (center) as well as
several practice domains (inner rings). Each of the four activities (in green) is a collaborative
effort that draws upon DevOps expertise from multiple domains to maximize delivery speed and
quality. Figure 4. DevOps enables continuous integration As an example, building solutions in
the continuous delivery pipeline crosses multiple DevOps domains. Checking code into version
control triggers the deployment pipeline to invoke automated merge, quality and security checks,
then to apply configurations stored as code to build shippable, full-stack binaries. Using DevOps,
this process typically turns source code into tested, deployable solutions in a matter of minutes.
All four continuous integration activities are enabled by DevOps, though with different
combinations of technical practices and tooling. For more detailed guidance on DevOps and how
it enables the continuous delivery pipeline, see the DevOps article series.
REFACTORING
Code refactoring is a process that involves restructuring a computer code base without adding new
features or changes to its external behavior. It generally consists of carrying out a series of small
changes to the code base that are minor enough to avoid introducing new errors. In other words, with
refactoring, you can simplify not from a functional point of view to increase software performance
and reduce potential errors but from a visual point of view. Refactoring improves the design of
existing code.
Why is it important?
There is a rule for all programmers - the code must be concise, well-structured and understandable to
the developers working with it. Even after a successful software development project, it is still
necessary to keep improving the system in order to provide new features and solutions. It so often
leads to code complexity as the enhancements are applied in a way that makes it harder to make
changes. Source code refactoring can help improve the code's maintainability and provide more
excellent readability. It can also help avoid standardization problems caused by the number of
developers contributing their own code. Besides that, refactoring helps minimize the amount of
technical debt that developers accumulate as a result of not taking advantage of opportunities to
improve the code.
Technical debt is the price a company will pay later for choosing a simpler, faster, yet less reliable
option today. Any compromise you make to release products or features faster in the present will
accumulate a greater volume of work to do in the future:
What are the benefits of code refactoring?
The indisputable benefits of refactoring:
Improving the objective readability of the code by reducing or restructuring it.
Encouraging developers to write software more thoughtfully, following a given style and criteria.
Preparing a springboard for creating reusable pieces of code.
Making it easier to find bugs in a large amount of code.
When to refactor
When adding features
The best time for refactoring is before adding new features or updates to existing code. Doing so can
help improve the product's quality. By cleaning the code base before adding new features or updates,
it helps to make the product more robust and easier to use in the future.
Rule of Three
1. When you are doing something for the first time, just get it done.
2. The second time around, you may be a bit faster, but the code still won't be as clean as it should be.
3. When you do something for the third time, start refactoring.
During a code review
This is the last chance to clean up the code before the product is launched. Doing so can help you
identify areas of the code that are worth fixing.
It's also a good time to start refactoring after the product has been launched. Since many developers
start working on code refactoring after the product has been released, it allows them to get more work
done before going on to the next project.
PAIR PROGRAMMING
Pair Programming Definition
Pair programming is a technique wherein two individuals collaborate on a single program. The
“driver” writes the code, while the “navigator” checks each line of code for errors.
Pair programming is a software methodology in agile in which two programmers work together
on a single workstation.
While one programmer, called the developer, writes the code, the other programmer, called the
observer or navigator, reviews every code line as it gets typed.
If the two programmers work together efficiently, it can significantly reduce
the development time, improve code quality, and decrease human error.
The programmers may also swap roles every few minutes to keep things fresh and lively in pair
programming.
It also helps the programmers share their knowledge by providing continuous feedback and
insights on the code. (Tap here to learn more about Chisel, the best product management
software.)