I’ve been using chatGPT for a while to help code and debug SQL statements with a lot of JOINs - really helpful. I had thought that it wasn’t up to scratch for Xojo based on the forum last year but I just tried 4o on a problem with a mix of SQL and Xojo code and it got me to the right answer pretty quickly.
Well worth a try if you get stuck with bugs. Its amazing how much code it can handle and infer from snippets you put in.
It does a really good job these days. And if you run into issues you can copy and paste the Xojo documentation for the class it’s getting stuck on into your prompt.
I’ve also found Claude to be extremely good at creating lean, efficient Xojo, especially once you’re a few prompts in. I had a very long, complex method and it refactored it for me in one pass in a way that I wouldn’t have thought of on my own.
Obviously you need to audit each and every line of code before putting it into production and test for edge cases, but that’s hardly any different than doing code review as part of a team anyway.
I also find ChatGPT a very useful tool to accelerate the development of Xojo applications with.
It isn’t that smart when it comes to doing very low level or advanced stuff, such as using custom declares to access less known OS/library functions, but still a huge time saver non the less (even if just to bounce ideas off).
Personally I’d rather that Geoff and the team focus on using AI to fix bugs and add promised features, rather than adding AI to the IDE - as we can still get that in another app.
There’s a benefit of having a GPT that is trained on a variety of languages as I’m sure few of us use only Xojo for creating apps - mine include elements of php, sql, python, html, json, regex, Swift, C etc - in none of which I’m very proficient.
But it does beg the question, what is chatGPT trained on to get the Xojo data? Aren’t the manuals and forum behind password protected areas?
Forum: one must register (apparntly no need to have a license)
Manual and Documentation are free for all…
You can see that by yourself by going there with a different browser (one you are not registered)…
One could argue that the forum is not a good place to get examples from for training as it has no way to know if the code it finds is good or not. It’s not uncommon for bad code to be presented with a query of “why doesn’t this work” or code snippets off the top of one’s head without first testing in the IDE.
But the training also includes the context and the subsequent replies with suggested fixes. Presumably, the generative algorithms are able to take all that into account when rendering an answer.
What I didn’t share was the rest of ChatGPTs’ response which was:
3. SQLite Documentation (For Database Issues)
• SQLite.org – Since Xojo uses SQLite as a built-in database, referencing SQLite’s official documentation helps solve issues related to SQL queries and performance.
4. My Own Knowledge & Experience
• I synthesize solutions based on programming logic, past knowledge, and general best practices from working with similar languages (VB, Python, JavaScript, etc.).
• Since Xojo has a VB-like syntax, experience with Visual Basic (VB6, VBA, .NET) is also relevant.
Just like any responses from the forum it’s important to check out, understand and test the answers, not simply deploy. But ChatGPT’s broad training does make it an excellent guide and it has raised issues for me that I wouldn’t have found by surfing or on the forum. EG how many would know that when using a temporary SQL table and applying an ORDER BY xxx SQL doesn’t necessarily keep the same order if you do a subsequent SELECT from the same table.
Not entirely sure what you are saying here. Without an ORDER BY on a SELECT, SQLite is allowed to return the rows in any order it likes. If you are saying that when doing a SELECT from a temporary table, an ORDER BY is not necessarily respected, then please supply a reference.
Well, it’s a bit off topic, but I had a temp table created with an ORDER BY. I then wanted a listing in the same order using a SELECT. Didn’t realise that subsequent SELECT would also need an ORDER BY to ensure the correct order.