Posts

Showing posts from October, 2023

The importance of design for TDD

Image
Stop me if this sounds familiar. You've read multiple articles about the importance of TDD (test driven development) and unit tests. You understand the basics of unit tests and frameworks for mocking up data and examples. Maybe you've created unit tests that helped you in refactoring, or finding issues in the service methods, so you understand the value of good unit tests. But you can't help feeling like you're missing something in how you're doing TDD. Your unit tests are so simple they feel useless, like a test that mocks some data for a repo and then verifies that it got the mocked data. Or maybe you don't even know what unit tests to create, so you start in on your implementation and add unit tests after the fact to cover your code. What's missing? It's possible you aren't doing enough design work to fully understand the problem you're trying solve, and without understanding the problem you can't effectively test the problem. Once you und...

How To Do Something

Image
Found this in my notes recently, it's a flowchart of how to be productive at work that I created years ago. Looking at it now, I think it still holds up well. Created a PlantUML diagram as a visualization.