Comment by kristiandupont
2 years ago
>the increase of boilerplate have been immersive
Has it really? Or are you worried that this is something that will happen?
Of course I don't know how other people use it but I find that it's very much like having a fairly skilled pair programmer on board. I still need to do a lot of work but I get genuine help. I don't find that I personally write more boilerplate code than before, every programming principle applies as it always has.
I wrote it in past tense, it's based on actual situations :) If you don't believe what I write, I guess it doesn't matter what I write now. Regardless.
One simple example that I've had to reject more than once.
- Function 1 does something
- Developer needs something like Function 1 but minor change
- Developer starts typing name of function which has a similar name to Function 1, but again, minor difference
- Copilot helpfully suggests copy-pasting Function 1 but with the small change incorporated
- Developer accepts it, commits and sends the patch my way
Rather than extracting the common behavior into it's own function and call that from both of them, refactors which Copilot doesn't suggest, the developers is fine with just copy-pasting the function.
Now we have to maintain two full slightly different functions, rather than 1 full functions + 2 minor ones.
Obviously a small example, and it wouldn't be worth extracting it the first time it happens or on a smaller scale. But once you have entire teams doing something like this, it becomes a bit harder to justify copy-paste approach, especially when you want the codebase not to evolve to complete spaghetti.
And finally, I'm not blaming the tool, it's not Copilots fault. But it does seem to have made developers who rely on it think less, compared to the ones that don't.