| Don't understand why people find tests important but not types. There's two popular ways to verify your programs. Types and tests. Types are EASIER then tests and types COVER more then tests. The ideal thing is to use both, but why spend so much time on unit tests over types is beyond me. Note that integration tests are a different beast. Why? Because you need to test things that aren't covered by either unit tests or types. In unit tests you mock out things that are external like IO, databases, and the like. In integration tests you need to test all of those things. Integration tests are THE most important thing to use to verify your program because it's an actual test to see if your code works. But unit tests vs. types? Types win. When I code. I never write a single unit test. Just types, and integration or end 2 end tests. It doesn't hurt to write a unit test and it's actually better. But the fact that I'm confident my code works without it shows the level of importance. |