the art of being an agile programmer
DESCRIPTION
Programmers know good code. But in the context of today so competitive world of technology, this is not enough. We know this because good code has not saved us from doing overtime or getting bad performance reviews. What are we missing? We are forgetting about agile technical practices. In this presentation I am talking about how at MozaicWorks.com I have learned to use agile and XP technical practices for efficient quality product development.TRANSCRIPT
The art of being an agile programmer
Claudia Rosu
● Software developer at mozaicworks.com● 4 years experience in JEE development● 3 years experience with Agile practices● A girl working with the guys for making software development
better
Agenda● True story● The problems from the story● Root cause analysis for first problem● Technical practices to help us● Agile programmer at work● Joy of coding!
What was wrong?● Bugs discovered one day before ● Incomplete deployment instructions● Incomplete features
Root cause analysis
How to attack this nasty situation?How can we know we are doing the right thing?How can we know we are doing the things right?
Agile is about getting feedback as soon as possible in all phases of software development, not just when testing
Understand
Start with the User interface
● Build static html user interface according to mockup
● Validated it with the story owner
Acceptance Tests
● write integration tests as acceptance tests using code and business like language● they will ensure a common understanding of the story ● review them with a tester or/and the story owner● the implemented solution is complete if it passes all acceptance tests
Acceptance tests
@Testvoid newPrescriptionFormIsOpened() {
userOpesSubEncounter()userClicksOnWritePrescriptionActivity()assertNewPrescriptionFormIsOpened()
}
@Testvoid newPrescriptionIsCreatedWhenSaving() {
userEntersPrescriptionData()userSavesPrescription()assertNewPrescriptionHasBeenCreated()
}
Design and implement● design using code● write unit tests as a practice to reflect upon the code
● first advantage: you will write the minimal necessary amount of code for the logic that needs to be implemented
● second advantage: you are already testing your code, so less testing after
● Third advantage: you are already receiving feedback that your solution does what it is supposed to do
Refactoring
● Do this in order to polish the design● Do it step by step● Quite often, I have found bugs during refactoring● Take 30 minutes or 1 hour
to refactor old code also● Include this always while
implementing the story,
not after
Code review
● another check for bugs or flawed implementation
● a chance to do pair-programming, to learn from others
Early testing
● Start testing from analysis phase
● Continue during implementation
● Minimize the work not done
Automated tests
● sit back and watch how your automated tests are doing the manual testing for you
● they will also keep you away from entering regression bugs
Agile programminganalysis with acceptance tests and mockups
testing with acceptance tests and unit tests
design with unit tests
implementation with code, refactoring and code review
Agile programmer at work
● Use code to do analysis, design, implementation and testing● Write readable and maintainable code and tests● Strive for simplicity● Work in small and safe increments● Embrace change● Be creative● Communicate: give feedback and ask for feedback
[email protected]@claudia_rosu
Referenceshttp://mozaicworks.com/blog/5-tips-to-avoid-release-hell-as-scrum-master/
http://mozaicworks.com/blog/a-developer-in-test/
http://www.infoq.com/articles/atdd-from-the-trenches
http://xprogramming.com/what-is-extreme-programming/