3 ms·
The first time I encounter TDD, I was a bit surprised because it encourages you to write tests (client code) first. Well, I started my professional career witho
by sdevonoes 4y ago
The first time I encounter TDD, I was a bit surprised because it encourages you to write tests (client code) first. Well, I started my professional career without knowing about TDD, but I did know that usually it's best to start writing the client code first. E.g., you write your main.c/Main.java/main.go first, referencing classes/code that do not exist yet, and wiring everything together. Then you move on to the next layer, write code that should exist but still relying on future code that doesn't exist yet. Eventually you end up writing the whole thing. Sometimes the other approach works equally well (e.g., starting from the small blocks and going up).