to someone with crazy hair and a huge beard? • What can writing Ruby teach me about .NET? • An Intro to MSpec: "Poking the Tiger" • Get Drunk with Einstein
design • Often attributed to Uncle Bob Martin • Actually a mnemonic created by Michael Feathers • Michael Feathers is awesome so stop giving Martin all the credit!
• “We have to get this done as quickly as possible.” • “Our team doesn’t do testing that way.” • “Stop talking to me! We’re losing $75,000 a day and I need to find a new job!”
removing language noise and simplifying tests.” • Inspired by RSpec • Emphasis on grammar – Subject, Establish, Because, It • Plug-N-Play with mocking frameworks
noise in tests. You should generally only have one line in your It and Because statements... Context/Specification testing, while a rethinking of "classic" TDD, still abides by the rules of Arrange-Act-Assert. As such, it is preferable to keep the latter two as succinct as possible.”
a few friends are on holiday in Goeteborg, Sweden. After one round of starköl in the Nobel Bar you start to feel funny. So you make fun of people around you – loudly. As you spot someone who has that distinct Einstein-haircut you tell him that "only two things are infinite, the universe and your stupidity, and I’m not sure about the former". As it turns out this man is indeed Einstein celebrating after his nobel price acceptance speech – and now he is mad at you. To settle this issue like civilized gentlemen he proposes a little drinking game called "fizz-buzz". In order to leave the table without a serious alcohol poisoning but some of your pride left you decide to do what every person would do: Cheat!
The other person determines the next 3 numbers based on the following: o If the number is divisible by three, say "Fizz" o If the number is divisible by five, say "Buzz" o If the number is divisible by both, say "FizzBuzz" o If none of the above are met, repeat the number. If you’re wrong, you drink. If you’re right the other person drinks.
3 rules x, y, and z such that for a given input i o If x(i) and y(i) then z(i) o If x(i) and !y(i) then x(i) o If !x(i) and y(i) then y(i) o If !x(i) and !y(i) then i
Poking Tigers is dangerous but safer if you use interfaces. • Don’t make fun of Einstein until you’ve had some experience with BDD • Even guys with crazy beards and giant curly hair are occasionally useful.