Getting Started with TDD - Part 2

preview_player
Показать описание
What is TDD, what does it take to get started learning to do it, and how should you practice it? This Test Driven Development tutorial explores all of these ideas in the context of a demonstration of working on a simple Coding Kata, called FizzBuzz. It also demonstrates the best place for to start, TDD for beginners, if you want to get started.

In this episode Dave Farley of Continuous Delivery demonstrates the second part in the FizzBuzz exercise, and explores how to test inputs and outputs in TDD. Dave also shows the easiest way to begin with TDD and how it morphs into Test Driven Design, using the excellent practice tool Cyber Dojo. Cyber Dojo allows you to practice TDD in a wide variety of languages and technologies with almost zero setup. Dave demonstrates the use of Cyber-Dojo at the same time as describing some subtle and important aspects of basic TDD.

-------------------------------------------------------------------------------------

LINKS 🔗

-------------------------------------------------------------------------------------

📚 BOOKS:

📖 Dave’s NEW BOOK "Modern Software Engineering" is now available on
In this book, Dave brings together his ideas and proven techniques to describe a durable, coherent and foundational approach to effective software development, for programmers, managers and technical leads, at all levels of experience.

📖 "Continuous Delivery Pipelines" by Dave Farley

📖 The original, award-winning "Continuous Delivery" book by Dave Farley and Jez Humble

-------------------------------------------------------------------------------------
Also from Dave:

🎓 CD TRAINING COURSES
If you want to learn Continuous Delivery and DevOps skills, check out Dave Farley's courses

to get regular updates, advice and offers from Dave and Continuous Delivery!

-------------------------------------------------------------------------------------

CHANNEL SPONSORS:

Рекомендации по теме
Комментарии
Автор

thank you for publishing these two videos. I pulled so much from them. Part 1 was easy to follow. Part two demonstrated that separating concerns generally in involves more effort in coding (but not in testing). If I had a suggestion to improve part 2 I would suggest that there were opportunities to demonstrate more refactoring in the red/green/refactoring that you took. E.g., Renaming 'display' and 'render', perhaps with stronger verbs/nouns, would help us follow your TDD cycles.

Another suggestion: having a solution designed for part 2 ahead of writing any tests or codes misses the opportunity to demonstrate how TDD helps to get to a design. And as you point out, having a design in your head complicated your tests/code from the off.

thanks, again

video-carl
Автор

Might just be worth pointing out for any newbs that Python doesn't do static type checking so you were able to pass in "render" directly from the test. However, with Java or C# you would have had to create a new class for "render", which would have required you to think a little differnetly about the design.

tommysmith
Автор

A super lesson and Cyber Dojo looks great too. Thanks for taking the time to produce these videos.

tractorboy
Автор

Thank you for listening to our feedback.

emonymph
Автор

It's great that you are showing here one thing I believe TDD requires, self-discipline to not do much than the cycle requires. You have the design of the "working" code in your head and there is temptation to write it. But we need to see red! And that's the reason I have written working in quotes. We know that our code pass requirements when we first see red scenario/test before and green scenario after we write implementation.

bleki_one
Автор

My honest feedback....For the first part I was with you..very well done...for the second part you kind of lost me with these render/display tests. I just don't think this second part was described well enough. I kept asking myself..."what is he trying to accomplish here". And there is a lot of test code being written here to test this fairly simple function, thus making this whole thing seem overly complex and burdensome. That alone would turn off a lot of people from doing TDD based on this video. I completely understand the value of testing and using TDD but I just don't think the "Part 2" video helped the cause of TDD. Sorry I have to be honest.

jetmartin
Автор

I have not done proper TDD so far, fair to say I haven't done any. This and the part-1 seem really helpful.

krishnakrmahto
Автор

Love it! Thanks for this. This kind is content makes what you talk about in your other videos really tangible and concrete!

I'd love to see more like it.
Especially more about the refactor step.
For example why 'display' is passed in the initializer but 'render' is passed in each function call?

ranrubin
Автор

Your tutorials are unbelievably helpful, Thank you. Just one question, so If I am creating a project on my own.
First I have the project vision, I do my user story map, then I have created my backlog and decided what user stories to work on
I assume I would first write acceptance tests ?, Then Integration tests and then when I get into more detail the unit tests ?
Does this work ?

TheMyth.
Автор

Dave, What happened to your fb video?
Btw, I think 6 hours is not too bad.

Had a funny experience with TDD last night. All my tests in one module passed. I tried everything to make them fail: assert (1 =:= 2) -> passed. No chance. I've been using the test suites the same way since months, never a problem. I' was quite tired that time and so was my machine. When I was about to give up, there was a black out. The computer went off. The power wasn't completely off, my LED light bulb was flickering, other neon lights off. Scary. After an hour the power came back and my test failed as it was supposed to without changing the code in anyway. Weired thing. To cut a short story long: I like TDD! Thx, Dave!

dlabor
Автор

How does TDD fit with TBD? If I write the test first, the test will fail. If I merge this into the trunk, the CI pipeline will fail preventing any changes from making it to production until i merge the fixed / new code to trunk. As a practical matter, do you wrap your tests with feature flags, or mark them as skippable until the application code is ready for merge?

cdarrigo
Автор

Is there any way to make Cyber Dojo validate my solution?

ahmedsameh
Автор

What happened to the “What went wrong at Facebook?” Video? Was it good?

WildfireS
Автор

How do you deal with TDD when you don't really have any clear requirements?

lulululululu
Автор

Can't click the Informit link in the description, gotta go old school

Emerald
Автор

You should put link to the first video

askingalexandriaaa
Автор

this part 2 is absolutely horrible in comparison to part 1. Please delete it and record a new part 2 the way it should be.

sebastianwapniarski