# Type Driven Development

🤔 Test Driven Development is great, but should it be the first thing you do ?

🧬 Data is harder to change than behavior, so instead try Type Driven Development - define the types and interfaces first.

🧭 Then, define the expected behavior with tests.

🛠️ Finally, write the implementation and don't forget about logs and error handling.

In pure Test Driven Development you should define the types/interfaces while you are writing the tests. The difference may seem small but it isn't - due to the complexity of data IMHO defining types should be done as a stand alone step.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blog.devcrisis.com/software-atoms/type-driven-development.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
