‹ BackHN Continuity

Thread

If AI coding is lowering your code quality, you're not managing quality right

129 points · 169 comments · bucket2015

  1. rgoulter · · focus · HN ↗
    > Unit tests at >95% coverage

    Eh. I wouldn't focus on unit test coverage.

    I think it's true that good, well tested code will have higher code coverage than crappy code.

    But, above a certain point (which will vary from codebase to codebase), unit tests aren't meaningfully increasing confidence that the code is working.

    I'd recommend focusing instead on the code being written in a pure 'functional core, imperative shell' to the extent that's possible. For that pure/functional part, 100% code coverage is attainable (& so not worth remarking on). For the impure parts, unit tests are probably using "mocks" just to get the code to compile anyway.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.