2 ms·
> one thing it can do reliably is repeat a pattern Isn't this something we've built into every modern language(and arguably the entire point of languages)? If
by Xelynega 4y ago
> one thing it can do reliably is repeat a pattern
Isn't this something we've built into every modern language(and arguably the entire point of languages)? If you have multiple pieces of code that share code with tweaks(to test this or that case for example), shouldn't you parameterize the bulk of the code instead of getting autocomplete to parameterize it for you and dump it into your source file multiple times?
- adambard 4y agoOh shit, you're right, I forgot about loops. Guess I'll go uninstall copilot now.
- thornewolf 4y agoTesting best practices have the opposite philosophy for the most part. Avoid abstraction as much as possible. Do repeat yourself. Because a bug in tests is insidious, so you want to minimize that. One of the best ways to minimize bugs is to explicitly avoid abstraction.
- simonw 4y agoCopilot helps me write parametrized unit tests. You might find this example useful: https://til.simonwillison.net/gpt3/writing-test-with-copilot https://til.simonwillison.net/gpt3/writing-test-with-copilot