← Back to context

Comment by capableweb

2 years ago

I've worked with teams that used Copilot. They claim it's great "Hey, now I don't have to actually spend any time writing all this boilerplate!" while for me, the person who has to review their code before releasing stuff, easier ways of writing boilerplate is not a positive, it's a negative.

If writing boilerplate becomes effortless, then you'll write more of it, instead of feeling the pain of writing it and then trying to reduce it, because you don't want to spend time writing it.

And since Copilot was accepted as a way to help the developers on the teams, the increase of boilerplate have been immersive.

I'm borderline pissed, but mostly at our own development processes, not at Copilot per se. But damn if I didn't wish it existed somehow, although it was inevitable it would at one point.

I feel ya. If your job is to kick back bad code, and now there is a tool that generates bad code, how does this not make your job more important?

Why not get some of the freed up, Copilot augmented developer labor budget moved to testing and do more there or build more tools to make your personal, boilerplate, repetitive tasks more efficient?

If the coders are truly just dumping bad code your way, that's an externality and the cost should be called out.

I use github copilot on a daily basis and it improves my time from thinking to code.

Often I have times where I'm think about a specific piece of code that I need and I have it partially in my head and github copilot "just completes" it. I press tab and that's it.

I'm not talking about writing entire functions where you have to mentally strain yourself to understand what it wrote.

But I've never seen any autocompleter do it so good then github copilot. Even for documentation purposes like JSdoc and related commenting system it's amazing.

It's a tool I pay for now since it's proven to be a tool that increases my productivity.

Is it gonna replace us? I hope not, but it does look promising as one of those tools people will talk about in the future.

It would be helpful if people could include in their assessment roughly how much time they've personally spent using these tools.

Helping write boilerplate is to Copilot what cropping is to Photoshop.

Some of the ways I've found Copilot a powerful tool in my toolbox: Writing missing comments (especially unfamiliar code bases), "translating" parts of unfamiliar code to a more familiar language, suggesting ideas for how to implement a feature (!) in comments.

>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.