Understand TDD by asking one simple question

You know what TDD is and why you want to do it… but how do you actually do it? That part still escapes you. Red-Green-Refactor, yeah yeah yeah, you’ve heard it a million times before… but that still doesn’t help you with the HOW.

Believe it or not, understanding TDD is as simple as asking one simple question: “Does the software… X?”

Does the software…

Every single test you write is actually a question: does the software…X? And the answer to that question is whether or not the test passes.

How do you do TDD? You ask a question, that you know the answer to. You ask a question, where the answer is no. And then you change the software until the answer is yes. Then you ask your next question.

Try not to think about TDD in terms of testing (even though it has “test” in the name, and you write lots of tests!).

Think of it as if you were telling someone about a program you’re working on, and they started asking you questions: “Does the software…X?”

Getting started with TDD is really simple. Just ask a question. Turn your question into a test. Change the answer. Then, ask another question.

"How do I become a better Ruby developer?"

Blogs, books, and bootcamps all promise to make you a better Ruby developer, but end up confusing you more.

What if you had step-by-step instructions on how to become a better Ruby developer?

Enter your name and email below and I’ll show you how to...

  • get better at Ruby in just five minutes each day
  • use testing, OOP, and refactoring to write professional-level Ruby
  • identify and learn new programming skills quickly