|
If I were a trained professional software engineer who found joy in writing tests and TDD, maybe I'd feel differently, but I write software to help with basic scientific analysis, and ChatGPT has been an absolute game changer for writing tests. I personally find writing tests to be soul-crushing, boring, work. I never really learned it properly, and when I have a well-documented function, CGPT typically does a decent job making a rough draft. I often have to work on the test function, fix some things, but the final product is way better than the PoS I would have put together: my guess is it has saved me hundreds of hours. I have developed a decent understanding of fixtures, mocking, sharing fixtures across modules, etc, all with the help of ChatGPT. It "understands" my project and how it is organized, and makes suggestions based on this understanding. Yes, it sometimes gets stuck in local minima and I have to kick it out, which can be frustrating. But even that is a learning process, as I often go to SO or other people's code bases to find good examples, and feed them to ChatGPT to get it unstuck. It's like the ultimate rubber duck paired programming partner. I tell it what I'm working on, and that's intrinsically helpful. But the rubber duck has really good feedback, because it has read the entire internet. It's made writing tests for my code fun, for the first time ever. The people I know personally who refuse to use CGPT are typically very good software developers, somewhat arrogant and have a chip on their shoulders, and honestly I think in 20 years we'll look back at them like people who thought the internet was a passing phase in the mid 1990s. I also think many of them don't understand how LLMs work, and how powerful they can be when prompted correctly |
I find it interesting that when people describe to me how they use LLMs to write code it's either short throwaway scripts or to write the kind of code that would make me retch (e.g. tests stuffed full of horrible mocks, spaghetti boilerplate).