Agile development Flashcards
what is agile SW development
put software being developed first
acknowledge that use requirements change
respond to changing needs quickly
advocates for regular software releases - users respond to these releases
Agile manifesto key points
individuals and interactions over process and tools
working software over hella documentation
customer collaboration over contract negotiation
responding to change vs following a plan
12 agile principles
satisfy the customer give workers the support they need and trust them technical excellence welcome changing requirements face=to=face conversation simplicity self-organizing teams working software deliver frequently business peolpe and devs work together maintain constant pace reflect on how to be more effective and adjust behavior
Explain the 80/20 rule (Pareto’s Law)
80% of results come from 20% of your effor and focus on the important 20%
how to deal with requirements in agile
capture requirements at a high level and on a piecemeal basis
- just in time for each feature to be developed
-the minimum to enable development and testing
understand enough to determine the scope and for high level budget estimates
captured in collaborative workshops so taht all team members understand the requirements - allows everyone to contribute
what are user stories
represent each user requirement as a user story
- more light weight and simpler than use cases
simple statement about what the user wants to do with a feature
business language and understandable to everyone
form of user stories
As a (user role)
I want to (goal)
so i can (reason)
focus on who what and why NOT HOW
How long should requirements (tasks) take
less than 16 hours
preferably 8 hours so progress can be measured daily
three basic steps in agile life cycle
analyse
develop
test
benefits of agile approach
reduced risk
increased value
more flexibility
better cost management
What does DONE mean in agile
shippable
- unit tests passed
- code reviewed
- acceptance criteria passed
- non-functional requirements met
- functional tests passed
- product owner accepts user story
two main classes of prototypes
true prototype - test implementation to understand a problem before it is implemented for real
tracer bullets - intended to gradually turn into the final solution
continuous integration
continuously integrate changes - ensure that modules will fit together - product continues to work with all the changes
ensure that problems or regressions are caught early on
nightly builds
software should be rebuilt from scratch daily
and the result of the build should be an installable product image
build should include as many automated tests as possible to catch integration problems early
- if tests/build fail - fix first thing
- dont let anyone integrate changes after build succeeds again
- risk of bad changes accumulating
what is pair programming
programmers work in pairs, sit together to write every line of code - 2 coders and 1 computer - 1 person at keyboard and one suporting - pairs created dynamically egoless development
Advantages of pair programming
informal review process common ownership of code share responsibility spread knowledge motivates refactoring
how does pair programming affect productivity
similar productivity to two devs working independently - fewer false starts and less rework, less debugging
can help train inexperienced devs
pair for complex tasks
challenges of pair programming
scheduling constant communication different skill levels power dynamics no time for self rotation lead to context switching
challenge of code review
sloppy or superficial reviews
over reliance of developer on reviewer to catch minor issues
sunk cost - reluctant to tell devs to change something that they thought was already done
test driven development
programming technique that ensure that code is thoroughly unit tested
if a test fails - you know what is causing the problem and what to fix
increased confidence that system meets requirements
side effect of TDD
achieve 100% coverage test - every single line of code is tested
resulting tests are working examples for invoking the code - provides working spec for the code
how is testing done in agile
testing is integrated throughout the life cycle
does not have separate test phase
devs write automated repeatable unit tests - testing done as part of the build
these actions keep the software in a releasable condition throughout development
What is test first development
writing tests before code clarifies requirements that need to be implemented
tests are programs rather than data - executed automatically like Junit
what is the customer’s involvement in testing
help develop acceptance tests for the stories implemented int the next release of the system
all new code is therefore validated to ensure that it is what the customer needs
customers have limited time available:
- cannot work full-time with dev team
- may feel that providing requirements was enough
- may be reluctant to get involved in the testing phase
Test first development process
quickly add test for new feature - just enough for code to fail
run tests
update the functional code to make it pass new tests
run tests again
once tests are passed, start over
What is test driven development
TDD = TFD + refactoring
write tests before functional code
small steps and a small bit of code at a time
devs refuse to write new function unless there is a test that fails because the function isn’t present
TDD cycle steps
Think, test, code, refactor (code and refactor loop)
The rules of test driven development
write new code only when an automated test fails
eliminate any duplication
-
what makes good unit tests
run fast
run in isolation
use data to make them easy to read and understand
use real data when they need to - copies of production data
represent one step towards overall goal
what is refactoring
systematic process of improving code without creating new functionality that can transform a mess into clean code and simple design
benefits of refactoring code
improves design of the software
makes software easier to understand
helps find bugs
help you to program faster
categories of refactoring
composing methods moving features between objects organizing data simplifying conditional expressions making method calls simpler dealing with generalization