Login
You're viewing the functional.cafe public feed.
  • Mortendrgroftehauge@sigmoid.social
    Nov 18, 2026, 11:33 AM

    @david_chisnall AI really is the litmus test for test driven development (I thought it was a bad idea even before AI code assistants)

    💬 1🔄 0⭐ 1

Replies

  • Nov 18, 2026, 12:08 PM

    @drgroftehauge

    I find TDD one of those things where there are good ideas (new features should come with tests, implementation should be guided by tests, writing tests first encourages you to test desired behaviour rather than properties of the implementation), but it's very easy to take to extremes and provide an implementation that overfits for the solution. A test-first methodology also has an advantage that is lost when you use LLMs: Writing tests first makes me think about the things where I expect to make mistakes, which often means I end up moving to an implementation strategy that avoids those corner cases entirely.

    💬 1🔄 1⭐ 11
  • Mortendrgroftehauge@sigmoid.social
    Nov 18, 2026, 2:36 PM

    @david_chisnall Writing tests first means you don't forget to write tests rather than do tests once you've written the code. That's certainly a good thing. But it also encourages behaviour like "if 5 pixels tall then" which I am not particularly fond of.

    💬 1🔄 0⭐ 1
  • 💬 0🔄 0⭐ 2