|
|
|
|
|
by hn_throw2025
295 days ago
|
|
I’m reaching the same conclusion…
I have been subscribing to LLMs for a couple of years, and trying to find the right balance and workflow that gets the best out of human and machine. I now think TDD can play a big part. I don’t have much of a background in unit testing.
For a recent TypeScript utility mini project, I took an outside-in approach using mocks where necessary.
This started as a prototyping and modelling phase, getting the design right before committing to implementation code. This was about refining the types and function signatures, and mocking the components that didn’t exist at that point.
The LLM didn’t have involvement at this stage, as it was about the problem domain, the shape and flow of the data.
Moving on from there, I was able to save a lot of time because SuperMaven in Cursor had enough context and understanding at that point to make very precise guesses about what I wanted, so I could tab autocomplete through a reasonable amount of boilerplate implementation code.
I was also able to get away with writing a couple of happy path tests for most components, and get the agentic LLM to generate sad path tests. Most of which I kept, including one that smoked out a flaw in my design. That’s essentially the process I’m gravitating towards. Human begins the process, models the design, sets the constraints, and then the LLM saves time in a limited and supervised way whilst being kept on a short leash. |
|