Speaker : Maha,Thoughtworks
It was on pair programming and Test Driven Development(TDD).A live demo was shown using JUnit.
The advantage point of view is that “You are fully comitted towards your job and you dont take personal calls,dont chat etc”
There had many scenarios on which test cases were built:
Scenario 1:
We should be able to put money into the wallet
—>Test cases were generated using this test case.Also,just for checking the functionality , neagtive money was put into the wallet(Damn,Is this possible?)
Scenario 2:
As a wallet owner , you would like to take out money from the wallet
—>Test case was developed for this scenario
—>Now what happens,if you try to take out more money from the wallet than what you have?
Scenario 3:
As a account owner , I would like to draw more money from the account than what I have?
—>This is in contrast with the test case 2 hence revamp of the existing code 🙂
Scenario 4:
As an account owner,I should be notified through email when I overdraw my money
—>This means every owner has an account associated with him.
—>Create a new method to notify the owner of the account,through email
Test Driven Development:
- Written test first
- Tests should fail and fail fast
- Tests protect functionality
- Test encourages fearless refactoring
- Test First Development(TFD) forces you to design well
- RDD improves design
- TDD supports evolutionary design
- Need driven development
Pair Programming:
- Ping Pong Programming
- Brain Storming
- Ongoing code review
- Driver thinks tactically and navigator strategically
- Two people are more pragmatic than one
- Knowledge sharing between pairs