2 ms·
On the other end of the spectrum, I'm finding ChatGPT is helping reduce the friction of adding unit tests, getting started with docstrings (I usually need to do
by linsomniac 3y ago
On the other end of the spectrum, I'm finding ChatGPT is helping reduce the friction of adding unit tests, getting started with docstrings (I usually need to do a lot of work on them though), and type annotations. Plus I've had some luck with handing code to ChatGPT and asking it to suggest clearer ways of writing it.
For example, a few months ago I was rewriting some particularly tricky, opaque code from Ansible having to do with the conversion of symbolic "chmod" strings into numeric. Because I was coming from code that was so hard to reason about (a bug in it took me a couple days to understand and fix), I wanted something really obvious and well tested. ChatGPT helped with that. https://github.com/linsomniac/symbolicmode/blob/main/src/symbolicmode/__init__.py https://github.com/linsomniac/symbolicmode/blob/main/src/sym...
- pylua 3y agoI think unit tests are suppose to induce friction to a certain extent. Using ai to do it seems like it is just checking a box.
- linsomniac 3y agoThe amount of boiler-plate, and in particular getting mocks right, are friction that can go away.