Home » Tag Archives: TDD

Tag Archives: TDD

Seeing Is Believing

Recently, I’ve done a management workshop on TDD. The audience was developmenet managers and team leads. Most of them did not know TDD. (Actually, most thought they knew what TDD was. But that’s a completely unrelated story.) During my session, I’ve walked them through an example (from Star Wars) and showed the thinking behind it, applying the steps to “real” software ...

Read More »

Never trust a passing test

One of the lessons when practising TDD is to never trust a passing test. If you haven’t seen the test fail, are you sure it can fail? Red Green Refactor Getting used to the red-green-refactor cycle can be difficult. It’s very natural for a developer new to TDD to immediately jump into writing the production code. Even if you’ve written the ...

Read More »

The Librarian: Introduction to Test-Driven Development

This will be a series of articles revolving around unit testing where I will work through examples and exploring various aspects of the craft. This is the first installment. The code associated with this article can be found on GitHub. Future and past installments can be found in The Librarian Archive. I will try to implement a few requirements for ...

Read More »

Mastering TDD

Two weeks ago I went to Paul Stringer’s course “Mastering TDD/BDD in iOS”. After the two days, I was exhausted… During the course, we looked at all the theory, completed some exercises. Paul gave us lots of links and books to read and, quite frankly, I was feeling overwhelmed. I saw myself in front of the computer, with all those ...

Read More »

We did it wrong, but not all was in vain

Yes, there was over engineering. Loads of it. Back in the mid 90s, when I started my career as a developer, the goal was to become an architect. No serious developer would dare writing a single line of code before selecting our preferred design patterns—we would then decide how the business requirements would fit into them. Yes, we would first ...

Read More »

Introduction in Java TDD – part 2

Hello again! In the previous blog post I explained TDD theory in general, without close reference to Java, but in this part we start a TDD practice. Our goal is to go through all phases of TDD: from requirement analysis to refactoring of tested code. All this we will do on example with Java, JUnit and ‘fake’ requirements. Requirements analysis ...

Read More »

Introduction in Java TDD – part 1

Welcome to an introduction in Test Driven Development (TDD) series. We will talk about Java and JUnit in context of TDD, but these are just tools. The main aim of the article is to give you comprehensive understanding of TDD regardless of programming language and testing framework. If you don’t use TDD in your project you are either lazy or ...

Read More »

Does TDD really lead to good design?

Recently I tweeted that TDD can’t lead to a good design if we don’t know what good design looks like. I was also saying that we probably should teach design before TDD (or at least, at the same time). This tweet led to a discussions with J.B. Rainsberger, Ron Jeffries, and a few others. J.B. and I ended up having ...

Read More »

TDD, Code review and Economics of Software Quality

To understand the value of Junits (developer tests), try maintaining, or worst, refactoring a code base that has none. The cost of  maintaining such code is so high, that in most cases, it gets replaced instead of being improved or enhanced. The developer tests leads to ease of  maintenance and thus enable change. They are now a critical part of ...

Read More »

Thoughts about TDD and how to use it for untested legacy code

Prologue My personal experiences with TDD mostly match with the others on the internet, in short, TDD is good. It helps you to write better code, create a clean and nicely tested architecture, make refactoring and design changes easier. It leads your design decisions, helps to think through every possible cases which you need to handle and many more. I ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns