this post was submitted on 15 Jun 2023
48 points (98.0% liked)

Experienced Devs

3950 readers
1 users here now

A community for discussion amongst professional software developers.

Posts should be relevant to those well into their careers.

For those looking to break into the industry, are hustling for their first job, or have just started their career and are looking for advice, check out:

founded 1 year ago
MODERATORS
 

I trialed GitHub Copilot and used ChatGPT for a bit, but recently I found myself using them less and less.

I've found them valuable when doing something new(at least to me), but for most of my day-to-day it seems to have lost it's luster.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 1 year ago* (last edited 1 year ago)

I set up CoPilot with neovim and am using it on a few projects. The domain and architectural style of these projects isn't common. Asking it to generate entire functions seems not very useful.

But, when asked to either suggest the next line of code or complete a partially-typed line, it has been pretty useful if it is following a pattern established in the code already. Here are two examples:

Testing:

test "record creation" do

  record = create_record("Pat", "This is a description of Pat")

  expect(record.name).to eq("Pat") # I typed this
  expect(record.description).to eq("This is a description of Pat") # CoPilot suggested this
end

It's pretty good at this part of it as long as there is a pattern

Repetitive stuff based on common things:

COLORS = [
  "red", # I typed this
  "orange", # CoPilot suggested this
  "yellow", # CoPilot suggests this after I accept the previous line

  # and so forth

So, asking it to come up with something out of thin air is usually worthless, but it has been helpful at automating repetitive tasks that are somewhat small and not really places where a library or abstraction would be better.