this post was submitted on 01 Aug 2023
10 points (91.7% liked)

Programming

17374 readers
154 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
 

There are safer waters for coding assistance, but as you can see from this discussion, there are multiple factors at play and interplay that determine the usefulness. Using coding assistance tools effectively is a skill that is not simply learned from a training course or a blog post. It’s important to use them for a period of time, experiment in and outside of the safe waters, and build up a feeling for when this tooling is useful for you, and when to just move on and do it yourself.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 4 points 1 year ago

So, I haven't used Copilot or etc, but I use GPT pretty heavily in coding, and it's crazy to me that "please autocomplete this thing I typed part of" is the model for AI assistance.

In my experience, GPT functions best when you describe a problem, or a particular refactor ("make log() asynchronous, returning immediately but queueing up the provided string to be written to the log in the background") ("separate functions A, B, and C into their own separated class"), and then paste the segment of code you want it to operate on, and then paste its reply back into your code. Its generations aren't perfect, but it can save a ton of time and typing when used in this way; I can't really imagine that it works well if all the guidance you give it about the code it's operating on and the task you're trying to accomplish is what's currently under the cursor.

I guess most of the issue is that not a lot of the time I spend coding is literally typing code into a blank editor. I would say 90-95% of it is augmenting or fixing existing code with some particular goal in mind. If I were trying to design an effective AI assistant, it would have a sidebar with a class diagram of the currently-relevant classes and their methods, and you could toggle a little eyeball for which ones of them you wanted to "show" to the AI to give it context, and then a box where you could request in a couple sentences the modifications you wanted it to make to that specified code. And, if what you wanted to do was generate some new code, you could do that, but it wasn't designed around that as the central principle.

IDK, like I say, I haven't worked with Copilot and friends so I don't really know, but that's what I would do.