Why I code test-after now

On my front-end side-projects I mostly did test-first development and it worked pretty well. But for my new job that I began recently I found myself struggling really hard to do TDD, and eventually gave up and coded test-after.

I thought about what’s going on a bit, and I think it’s because I’m not that fluent yet in the new environment.

I think TDD is to coding what is ballet to walking. It’s essential to be able to walk well, run, jump, and generally be in a good shape before taking take ballet courses. And similarly, I think it’s essential for me to first get know well the development environment, language, conventions, and tooling before starting to do test-first coding.

This accentuates the idea that when I’m trying to learn something new, especially something that I find difficult, it’s easier to work on it separately.

For example, trying a new programming language — and at the same time — a new versioning system is hard because my attention gets split. Learning them separately is easier: I can focus.