DEV Community

Cover image for Take away: Test-Driven Development: By Example - Kent Beck
Marcin
Marcin

Posted on • Originally published at pilsniak.com

2 1

Take away: Test-Driven Development: By Example - Kent Beck

I've just finished reading "Test-Driven Development: By Example" written by Kent Beck. It's a second time when I read this book, a few years ago on the Kindle, today as a paper-book.

If you need the recommendation to read it, you have mine. I could say that book is perfect for:

  • entry-level developers,
  • highly experienced developers who are afraid to write tests.

I'm sharing with you my notes, which I wrote during reading.

TDD is a recipe

1) Write a test
2) Write an implementation
3) Refactor the code

Hint: never mix writing implementation and refactoring in one step.
Hint: start with a simple test for simple functionalities.

Finish your day with not passing tests

Tomorrow, you will know where and how to start.

Warning: it doesn't apply if you are not working alone on the branch.

Small steps are not needed

Even if the book presents all changes as really atomic units, it doesn't mean you have to follow it. It explains that you should be able to make small steps, even if you don't need them right now.

TDD is a philosophy

You can apply it for E2E tests, integrations, database testing, and so on.

Scrum is about a fast feedback loop

TDD is as well. Conclusion? You are not able to make the Scrum if you don't do TDD.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay