ANDRII DATSENKO <ASDatsenko@luxoft.com>
SOFTWARE ENGINEER
February 18, 2016
TEST DRIVEN DEVELOPMENT
QUALITY IS THE KEY
![](http://www.luxoft.com/static/images/luxoft/luxoft-logo-retina.png)
![](http://www.luxoft.com/upload/iblock/36a/lxft_training_banner_ci.jpg)
REQUEST
![](https://s3.amazonaws.com/media-p.slid.es/uploads/66414/images/4437281/the-car.png)
ARCHITECTURE
![](http://in2gpu.com/wp-content/uploads/2015/02/engine-wallpaper-4.jpg)
DEVELOPMENT
![](http://www.rodmatthews.com.au/_assets/images/blog/Positional%20Images/Complexity%20Small%20Version.jpg)
TDD STEPS
Navigation List
Test First
Assert First
Fail First
NAVIGATION
-
Create view
-
Validate form inputs
-
Show errors
-
Redirect on submit
Write NAVIGATION MAP for your current/next task at project
TEST FIRST
describe('Service', function() {
it('should capitalise words', function() {
});
});
ASSERT FIRST
describe('Service', function() {
it('should capitalise words', function() {
sut.capitalise('hello world')
.should.equal('Hello World');
});
});
FAIL FIRST
![](https://s3.amazonaws.com/media-p.slid.es/uploads/66414/images/2245641/Screen_Shot_2016-02-18_at_1.15.45_AM.png)
PROCESS
![](https://s3.amazonaws.com/media-p.slid.es/uploads/andreykucherenko/images/907293/tdd.jpg)
PROS
-
Requirements are met
-
Correctness
-
Improved code
-
Code as documentation
-
Safe refactoring
-
Coverage
- No extra code
TDD ARTIFACTS
Pomodoro
Pair Programming
Continuous Integration
POMODORO
![](http://lifeiscrafted.savvysassyshe.com/wp-content/uploads/2013/04/pomodorproduct-timer-steps.jpg)
PAIR PROGRAMMING
![](https://s3.amazonaws.com/insights-images-prod/1020ways20pair20programming203_7a4eac1abfb725cdba521e485086d3ea.png)
CI
![](https://instagram.fdnk1-1.fna.fbcdn.net//t51.2885-15/e35/11261270_1493739560947619_2054069941_n.jpg?ig_cache_key=MTA2NTk2Njg5OTA0NzIzOTc0OQ%3D%3D.2)
![](https://instagram.fdnk1-1.fna.fbcdn.net/t51.2885-15/e35/12135335_1636947259921450_2014926581_n.jpg?ig_cache_key=MTA4Njk1ODEyODE3NDc4OTQwMQ%3D%3D.2)
FIX IT LATER
![](https://inkflesh.files.wordpress.com/2011/03/hurricane_ike_broken_windows_highrise2.jpg)
At each step in time, the following transitions occur:
- Any live cell with < 2 live neighbours dies, as if caused by under-population.
- Any live cell with 2 or 3 live neighbours lives on to the next generation.
- Any live cell with > 3 live neighbours dies, as if by over-population.
- Any dead cell with exactly 3 live neighbours becomes a live cell, as if by reproduction.
A.K.A. B3/S23
CONWAY`S GAME OF LIFE
Novice
- Use ping-pong technique
- Code without conditional statements
Advanced
- Use immutable approach
- Implement infinite board
- Implement hexadecimal board
Expert
- Implement healing board
- Implement async board
ACHIEVEMENTS
Q&A Time
ANDRII DATSENKO <ASDatsenko@luxoft.com>
SOFTWARE ENGINEER
February 18, 2016
TEST DRIVEN DEVELOPMENT
QUALITY IS THE KEY
TDD Code Session
By Andrew Dacenko
TDD Code Session
Luxoft TDD Code Session at 2 Feb 2016
- 1,175