v0                                             .1-                                                 al                     ...
Julien Biezemans     @jbpros
Who?
You happen to write code...
useless,
delivered (too) late,
fragile,
difficult to deploy,
impenetrable,
hard to maintain.
BDD
Dan North@tastapod
“BDD is a second-generation, outside-in, pull-based, multiple-stakeholder,multiple-scale, high-automation,agile methodolog...
“It describes a cycle of interactionswith well-defined outputs, resulting inthe delivery of working, testedsoftware that ma...
Test-DrivenDevelopment
Red, Green, Refactor
Where to start?
What to test?
Behaviour
From Test to Behaviour
Most important missing  behaviour today?
Business value
Story
As ...I want ...So that ...
Estimation
Acceptance criteria
Scenario
Context ➔ Event ➔ Outcome
Given ➔ When ➔ Then
Ubiquitous Language
BDD in Ruby/Rails
Stories + Scenarios           =Cucumber features
Cucumberhttp://github.com/cucumber
Full-stack, deliverable
Outside-in
Acceptance testsUnit testsCode
Run feature
Missing step definition         #fail
Write step definition
features/step_definitions/tamagotchi_steps.rb
bin/app.rb
Run feature
Missing code   #fail
RSpechttp://github.com/rspec
Write spec
spec/lib/tamagotchi_spec.rb
Run spec
Missing code   #fail
Make it pass
lib/tamagotchi.rb
Refactor
Repeat until the feature passes
Design
spec/lib/tamagotchi_spec.rb
spec/lib/tamagotchi_spec.rb
lib/tamagotchi.rb
lib/tamagotchi.rb
spec/lib/tamagotchi_spec.rb
Stubs
spec/lib/tamagotchi_spec.rb
lib/tamagotchi.rb
spec/lib/tamagotchi_spec.rb
spec/lib/tamagotchi_spec.rb
Spec everything yourstep definitions need
spec/lib/tamagotchi_spec.rb
lib/tamagotchi.rb
spec/lib/tamagotchi_spec.rb
lib/tamagotchi.rb
features/step_definitions/tamagotchi_steps.rb
Living documentation
Ruby on Rails
View ➔ Controller ➔ Model
From Programmer   to Developer
program v.To provide (a machine) witha set of coded workinginstructions.
develop v.To bring out the capabilitiesof; bring to a more advancedor effective state.
Deliberate discovery
Know whatyou don’t know
Know whatyou don’t knowyou don’t know
Learn the domains
Learn the tools
Know the people
Feedback
Real options
Practice
Your code is now...
useful,
delivered on time,
robust,
easily deployable,
intelligible,
maintainable,
A piece of software   that matters.
Don’t deliver features
Shipcapabilities!
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
The Behaviour-Driven Programmer
Upcoming SlideShare
Loading in...5
×

The Behaviour-Driven Programmer

3,175

Published on

An introduction to Behaviour-Driven Development, the second-generation agile methodology that aims at delivering software that matters.

Most of us know that BDD has something to do with tests and the way code is produced. But what is it exactly? How does it differ from Test-Driven Development?

We'll discover the technical principles and practices lying at the heart of BDD, as experienced from a naive programmer perspective.

But BDD is not only about writing better tests and code. It really holds higher purposes...

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

No Downloads
Views
Total Views
3,175
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
11
Embeds 0
No embeds

No notes for slide

The Behaviour-Driven Programmer

  1. 1. v0 .1- al ph a !"B"#$v%&r-Dr%v"( Pr&)r$**"rThe first steps of a Behaviour-Driven Developer
  2. 2. Julien Biezemans @jbpros
  3. 3. Who?
  4. 4. You happen to write code...
  5. 5. useless,
  6. 6. delivered (too) late,
  7. 7. fragile,
  8. 8. difficult to deploy,
  9. 9. impenetrable,
  10. 10. hard to maintain.
  11. 11. BDD
  12. 12. Dan North@tastapod
  13. 13. “BDD is a second-generation, outside-in, pull-based, multiple-stakeholder,multiple-scale, high-automation,agile methodology.”
  14. 14. “It describes a cycle of interactionswith well-defined outputs, resulting inthe delivery of working, testedsoftware that matters.”
  15. 15. Test-DrivenDevelopment
  16. 16. Red, Green, Refactor
  17. 17. Where to start?
  18. 18. What to test?
  19. 19. Behaviour
  20. 20. From Test to Behaviour
  21. 21. Most important missing behaviour today?
  22. 22. Business value
  23. 23. Story
  24. 24. As ...I want ...So that ...
  25. 25. Estimation
  26. 26. Acceptance criteria
  27. 27. Scenario
  28. 28. Context ➔ Event ➔ Outcome
  29. 29. Given ➔ When ➔ Then
  30. 30. Ubiquitous Language
  31. 31. BDD in Ruby/Rails
  32. 32. Stories + Scenarios =Cucumber features
  33. 33. Cucumberhttp://github.com/cucumber
  34. 34. Full-stack, deliverable
  35. 35. Outside-in
  36. 36. Acceptance testsUnit testsCode
  37. 37. Run feature
  38. 38. Missing step definition #fail
  39. 39. Write step definition
  40. 40. features/step_definitions/tamagotchi_steps.rb
  41. 41. bin/app.rb
  42. 42. Run feature
  43. 43. Missing code #fail
  44. 44. RSpechttp://github.com/rspec
  45. 45. Write spec
  46. 46. spec/lib/tamagotchi_spec.rb
  47. 47. Run spec
  48. 48. Missing code #fail
  49. 49. Make it pass
  50. 50. lib/tamagotchi.rb
  51. 51. Refactor
  52. 52. Repeat until the feature passes
  53. 53. Design
  54. 54. spec/lib/tamagotchi_spec.rb
  55. 55. spec/lib/tamagotchi_spec.rb
  56. 56. lib/tamagotchi.rb
  57. 57. lib/tamagotchi.rb
  58. 58. spec/lib/tamagotchi_spec.rb
  59. 59. Stubs
  60. 60. spec/lib/tamagotchi_spec.rb
  61. 61. lib/tamagotchi.rb
  62. 62. spec/lib/tamagotchi_spec.rb
  63. 63. spec/lib/tamagotchi_spec.rb
  64. 64. Spec everything yourstep definitions need
  65. 65. spec/lib/tamagotchi_spec.rb
  66. 66. lib/tamagotchi.rb
  67. 67. spec/lib/tamagotchi_spec.rb
  68. 68. lib/tamagotchi.rb
  69. 69. features/step_definitions/tamagotchi_steps.rb
  70. 70. Living documentation
  71. 71. Ruby on Rails
  72. 72. View ➔ Controller ➔ Model
  73. 73. From Programmer to Developer
  74. 74. program v.To provide (a machine) witha set of coded workinginstructions.
  75. 75. develop v.To bring out the capabilitiesof; bring to a more advancedor effective state.
  76. 76. Deliberate discovery
  77. 77. Know whatyou don’t know
  78. 78. Know whatyou don’t knowyou don’t know
  79. 79. Learn the domains
  80. 80. Learn the tools
  81. 81. Know the people
  82. 82. Feedback
  83. 83. Real options
  84. 84. Practice
  85. 85. Your code is now...
  86. 86. useful,
  87. 87. delivered on time,
  88. 88. robust,
  89. 89. easily deployable,
  90. 90. intelligible,
  91. 91. maintainable,
  92. 92. A piece of software that matters.
  93. 93. Don’t deliver features
  94. 94. Shipcapabilities!

×