OpenAI Might Be Training AI to Replace Some Software Engineers: Report

I haven't used copilot, but I've been tinkering with ChatGPT, and it can do some pretty impressive stuff with refactoring.

Today I gave it some atrocious ruby code that metaprogrammed a bunch of methods by passing a list to define_method, and it was able to rewrite them as individual methods. It can also take a small class and scaffold up some tests for it.

What I like most about it is that it tries to put context around what it's doing. For instance:

These tests cover a few basic cases:
* A square with 4 points
* A triangle with 3 points
* A rectangle with 4 points

Each test instantiates a new Shape object with a set of points, and then uses the perimeter method to calculate the perimeter of the shape. The tests then use expect(...) to assert that the calculated perimeter matches the expected value.
It is important to test the perimeter of a different shapes in order to verify that the shoelace algorithm implementation is correct.

If Copilot can refactor and write tests for existing code, faster or more idiomatic than ChatGPT, it would be worth $10 a month to me, for sure. The extra context would be cool, but it wouldn't have a real target audience other than someone really new to coding.

/r/technology Thread Parent Link - businessinsider.com