TDD - do increasing and save...

249 views

Published on

My presentation to PHP & Symfony User Group (January 31, 2014)

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
249
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

TDD - do increasing and save...

  1. 1. TDD – do increasing and save...
  2. 2. Who I am? Programmer at Wargaming.net ~ 5 years php experience
  3. 3. Disclaimer
  4. 4. TDD - ?...
  5. 5. TDD this is...
  6. 6. ...or this?! Do you know it?
  7. 7. Expectations...
  8. 8. Reality...
  9. 9. Why not?... TDD? And who will pay for it? Good thing! But we release very soon TDD does not work everywhere
  10. 10. Stress-free! 12 10 8 Plain TDD 6 4 2 0 0 1 2 3 4 5 6 7
  11. 11. Why is that?... - Start immediately - Test First - SOLID/Patterns - Less coupled systems - Stress control. Results are obvious ...
  12. 12. Test First...
  13. 13. SOLID Single Responsibility Open/Closed Liskov Substitution Interface Segregation Dependency Inversion
  14. 14. Single Responsibility: Test Data - What does know? - Relations between objects? Behavior - What problems resolve? - Services?
  15. 15. Open/Closed: Test - No need to change working code
  16. 16. Liskov Substitution: Test - Tests can use to check the heirs instead ancestors - In case of violation of unit tests are complicated
  17. 17. Interface Segregation: Test - Tests help to split the interfaces - Mocks dictates API
  18. 18. Dependency Inversion:TDD - Service Locator or Dependency Injection? - Mocks in TDD create abstractions - Setting tests easier with Dependency Injection
  19. 19. TDD +/- Confidence in the code to run - No code to Thrash - New solutions approves more quickly - New lever of your skills - Slow refactoring - Tests are difficult - Doesn't work everywhere - Tests refactoring - TDD for bad smells code
  20. 20. FAQ... - How many tests must be written? - TDD for existing projects - Must read
  21. 21. Books... - Kent Beck "Test Driven Development By Example" - Martin Fowler "Refactoring: Improving the Design of Existing Code" - Joshua Kerievsky "Refactoring To Patterns" - Michael Feathers "Working Effectively with Legacy Code"
  22. 22. Questions?

×