0. Preface
What Is This Blog About?
This blog is about applying TDD and BDD for real.
By “for real,” I mean that instead of using simple examples commonly found in TDD/BDD introductions—login forms, calculators, string processing, or coding katas—we’ll develop a real-world application involving a meaningful level of complexity, such as:
- A web user interface
- Networking and web APIs
- An agent-server architecture
- Multithreading, multiprocessing, and synchronization
- Database integration
- Secure coding practices
These kinds of challenges are often absent from introductory TDD/BDD material.
What Is the Goal of This Blog?
The goal is simple: If TDD/BDD proves effective and worthwhile for developing a real-world application like this, adopt it. Otherwise, discard it.
Who Is This Blog For?
This blog is for people who already know what TDD/BDD is but are not satisfied with the toy examples. They want to know whether TDD/BDD really works when applied to a non-trivial, real-world application. If you are one of them, this blog is for you.
With that in mind, I won’t spend too much time explaining basic TDD concepts or BDD’s Gherkin syntax. Instead, I’ll focus on how we actually use them to develop the application.
If you want to master the fundamentals of TDD/BDD first, there are plenty of excellent resources available online.
Who Is the Author?
My name is Cheng-Wei Lin (or Chengwei Lin, without the hyphen).
I have worked in software development for over 30 years. I earned my bachelor’s degree in Computer Science and Information Engineering from National Taiwan University and my master’s degree in Computer Science from the University of Southern California.
Over the course of my career, I have worked on embedded systems at Accton, firmware development kits for IC chips at ADMtek, and cybersecurity software at Trend Micro.
I have studied and practiced TDD/BDD for more than a decade. During my career, I advocated TDD/BDD within my company, led study groups, and developed Visual Studio extensions to support TDD.
What Book Inspired the Author?
The book that has inspired me the most in TDD is Growing Object-Oriented Software, Guided by Tests by Steve Freeman and Nat Pryce.
The book provides valuable insights through its compelling example of applying TDD to a substantial system. Reading it was an eye-opening experience for me.
I consider it essential reading for anyone who wants to take TDD seriously—and a book worth returning to again and again.
Many of the practices described in this blog are directly or indirectly inspired by the ideas in this book.
What About AI Assistance?
No, we won't cover AI-assisted coding or AI-assisted TDD/BDD in this blog. Maybe in the next one.
AI can assist with TDD/BDD, but it can’t replace foundational knowledge. Without a firm grasp of TDD/BDD, it’s difficult to know how to prompt AI effectively—or, more importantly, how to recognize when its output is wrong or needs to be modified.
That’s why I believe it’s important to first become comfortable with TDD/BDD yourself: the core process, Gherkin syntax, patterns, and principles. Once you can evaluate and refine the code yourself, you can use AI to accelerate your workflow rather than being led by it.
This blog is about taking that first step—becoming comfortable with TDD/BDD before relying on AI.
If you're interested in why I take this approach to AI-assisted development, this video provides a good illustration of the problem: AI Made Coding Worse...
Comments
Post a Comment