Hacker News new | ask | show | jobs
by fhd2 1182 days ago
I'm fascinated by people saying they use GPT for boilerplate. Whenever I find myself doing simple/repetitive stuff, I tend to stop in my tracks and make that go away. Usually following the rule of three: If I do something for a second time, I don't generalise/generate just yet. If I need it a third time, I sit down and do it. Is that unusual? That said, I am mostly working with high level languages that make this generalisation relatively easy.
1 comments

Where I have found GPT and/or tools like that somewhat useful when playing with them is in writing tests.

Boilerplate code is usually refactor-able away, yes.

But tests are kind of intrinsically boilerplate by definition. There are test and fuzzing and provability systems that definitely help automate. But on the whole, writing a test harness + unit tests is often like writing the whole system over again.

I feel like this might be the one long term useful thing I get out of these coding assistants for my own work: read this interface and implementation I've written. Now write a boatload of negative test cases to verify correctness.