What's the best AI helper for juce coding?

When it works (in a non hallucinogenic way) ChatGPT can be great.
Being able to ask questions and getting good answers for specific scenarios, with an all encompassing knowledge of the framework is the way of the future IMO.
Does anyone have recommendations for AI’s that can help with JUCE development?
ChatGPT can be good, but often isn’t. But it’s a great start in term of what should be possible.
I’m not so much interested in it generating code itself, more of a mentor on specifics.

I have Github Copilot and Github Copilot Chat and here’s what I think about them:

Copilot can be extremely useful. It gives you suggestions nonstop based on a lot of code before the point where you are currently writing yours.

This video shows an example of it, where it creates a parameter layout for apvts based on what parameters it saw in the header.

Also another example of a moment where it did something quite magical was when I wrote some MIDI processor classes and it continuously came up with good ways to structure the required loops. I found that pretty cool, because MIDI processors always seem to be very inconsistent with each other when I write them and I had something more complicated in mind than what Copilot gave me that day.

Copilot Chat however halucinates a lot and generally is more of a smart sounding idiot than a helpful tool, or I just don’t know how to ask questions. I thought it would be better than ChatGPT, because it allegedly knows everything about your project or the files that you have opened, but I’d kinda expect better answers from it, if that was really true.

So just get the basic Copilot if you ask me. You can’t ask questions, but having a tool that just trys to understand your code directly is actually much more useful than a tool that first has to convert your natural language into the real problem.

1 Like

This forum, duh. :wink:

The code generation can be really good to have.
But what I’m really taken with is ChatGPT’s thorough knowledge of the framework classes and how to apply them. Best of all is how it can connect this knowledge with a context that you can describe to it, and for me to be able to learn from this exchange. Unfortunately there is very little evidence that it learns anything dynamically though. And when it outlines in detail how to apply non-existent class methods, then it is just plain sad.

Forum too slooow!
I want answers NOW :slightly_smiling_face:

Ask ChatGPT and you’ll get an instant answer :slight_smile:

1 Like

if you’re not happy what AI can give you rn, you might wanna travel into the future, in which these chatbots suddenly work very well. or you go code some on your own while waiting for it, if you can’t afford a time machine

I like chatgpt for ideas. Asking it things like “how can I improve this code?” And pasting in your work can be useful. Or if you are starting a new problem you haven’t dealt with before, it can give you some interesting angles to consider. I don’t think I’ve had it throw perfect code at me once though. It’s more a thing to bounce ideas off of, rather than something that does your work for you.

Copilot is great, every time you go to write a pretty standard boilerplate loop, it usually nails it and that code is done by hitting tab.

The latest release of Google Bard seems quite good for juce class knowledge, c++ and software engineering generally, currently testing it…
The small code snippets have been useful.
I was trying to understand why my forward declarations weren’t working, and it got horribly confused, but I persisted with my interactions, asked it to provide references, and it provided a link to a stackoverflow discussion which fully answered my issue.
It sometimes provides juce class methods with the wrong spelling or arguments, but going then to the documentation generally resolves the issue quickly.
If this is the worst it will ever be, the future is bright :sunglasses:

I just used ChatGPT to get a base64 string into an audio buffer. Not bad. Didn’t quite get it right but definitely helped set up the proper structure/boilerplate for that. Only thing it got wrong was the argument order of a MemoryBlock function.

But it’s definitely dangerous when not giving obviously wrong answers. Like randomly using static variables or doing bad stuff with arrays.

I started to use copilot in clion a few days ago, I am starting to think it may be telepathic. The suggested code snippets always seem to know what I wanted to do, but will require some tidying, often incorrect function names and parameter ordering, but the basic idea is there.

I have not tried chatGPT yet, but reading this thread has inspired me to go give it a try.

1 Like