|
I agree, remember when we Google became the thing that contained all answers to the universe. We all had to learn how to search by using the right keywords and we just got better at it, same with ChatGPT.
|
|
|
|
|
I find that you need to know what you are doing to handle iffy code when it happens, even when the queries that you input are of quality. Sometimes it helps, other times you spend more time trying to fix the code it generated, taking your focus away from trying to do it yourself.
Where I do find it useful, is using it as a babelfish[^], ie, translating from one language to another. Not always perfect, however, it's better at this task than reliably generating code. But same conditions apply, do not trust it and if too fishy, don't get bogged down in what it generates.
Graeme
"I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee
|
|
|
|
|
I wouldn't know firsthand. My colleague has found it helpful. As far as coding goes, he knows enough to be dangerous. He can work it out, but the result is usually a (thankfully somewhat procedurally structured at least) mess. So for him, he can kinda tell what things do even though he gets things like & and | confused sometimes.
It has worked for him in the past. I don't know how often he relies on it. That's all I got.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
|
|
|
|
|
Hence why I said "you need to know what you are doing" which he obviously does. You don't ask a Cessna pilot to fly a Space Shuttle. ChatGPT for code is the same, dangerous in the hands of novices.
Graeme
"I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee
|
|
|
|
|
ChatGPT will keep the mediocre, mediocre. The less motivated will accept whatever it offers and will never attempt a better solution, or accept there is "no solution" (when in fact there is; it just needs exploring).
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
I don't agree with that, as I see my colleague improving in his coding endeavors, though to be fair he doesn't use ChatGPT exclusively. He has used it to unstick himself, which is how I suggested it be employed.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
|
|
|
|
|
I was referring to people who "call" themselves programmers. I got the sense your colleague is using it properly (and is not a "programmer").
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
imho: yes ... when you take into account:
1) you are using relatively new code tools/encyclopedias that are rapidly evolving.
2) you learn/adapt/master the queries/prompts that give better results.
i'm using the new JetBrains ReSharper beta AI assistant (EAP 9), tuned for, of course, programming. It works in Visual Studio with no glitches.
Look for an article/tip-trick from me soon on how to use it as a "secretary" which transforms bare-bones schema into boiler plate code
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
modified 18-Jul-23 4:04am.
|
|
|
|
|
Great idea on an article Bill. Agree 100% on both your points, especially point 2.
|
|
|
|
|
Is that only an update away for someone lagging behind in version but with a standard ReSharper license?
|
|
|
|
|
Hi,
I think you can just join the EAP program by downloading/installing the latest EAP, and that, beginning with EAP 7, the "AI Assistant beta" is available. [^] ... EAP 9:
"023.2 EAP9 build 2023.2.0.9
Released: July 14, 2023
No subscription required"
also see: [^]
But, please, check with JetBrains/ReSharper for latest news.
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
For my capstone course for my master's degree, our group project is to create a mobile app that can record conversations, use speed-to-text with diarisation (distinguish different speakers), and then send the conversation to ChatGPT to get reminders, a summary, or some other function. We refer to these functions as transmogrifiers, in homage to Cavin & Hobbies. See the linked definition, which aptly also describes the results from ChatGPT. The app is suppose to help people with short-term memory loss or high short-term memory demands (like waitstaff).
So I can see how using ChatGPT makes creating an app like this a lot easier because the programmer doesn't need to deal with parsing the text. That functionality is offloaded to an API that is designed to parse natural text.
Bond
Keep all things as simple as possible, but no simpler. -said someone, somewhere
|
|
|
|
|
Given the complexity of speech to text alone ... your project sounds ... impossible. Have you done a feasibility study ?
Good luck with that !
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
Oh, we are just using AWS's speech to text. We aren't doing that ourselves. Basically, this app is a broker between several API's.
Bond
Keep all things as simple as possible, but no simpler. -said someone, somewhere
|
|
|
|
|
Show me proof of concept, and i'll stop laughing
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
|
Short answer: it depends on what you're doing. If you can easily and completely describe what you need or break it down into pieces that it can handle, it can be a real asset. However, I don't even try to use it for lots of things where I figure telling it what I need/want to do is going to be harder than just doing it myself (or where I need to make lots of little changes in a lot of places, like refactoring).
Chat GPT (and GitHub CoPilot) have written a lot of code for me. It writes new code much faster than I could and sometimes better (I once removed some 'excess code' Chat GPT added, and then had to turn around and put it back, other times it's thought of things I didn't, yet).
It's also written incorrect code or poorly written code and changes styles on me at times. Typically, I can get it to correct its own work faster than I can do it myself; however, I'm always running up against the token limit.
However, most of the issues I'm hitting are just growing pains. It's going to get a lot better and quickly. (I've already figured out how to make it better, but I'll probably wait for someone else to do it.)
One thing that might help (for now) is to have some standard text you add to each prompt about code quality, efficiency or the style that you prefer. Or you can just ask Chat GPT to make it better. For example, in your example, did you try asking Chat GPT to rewrite the code it gave you to be more efficient? Or you might ask it if there's a way to make the other code (block 2) more efficient? Clearly it understood enough to know which was more efficient, so it probably knows how to write more efficient code, you just have to let it know that's important to you. (If you use the Chat GPT API directly you can provide standard context information, so you could plug in things you want it to consider there.)
|
|
|
|
|
we agree on several things ... that's something. i have experimented with almost all the techniques you mention.
now that ReSharper hosts a tuned AI from OpenAI, that's where i will be using it.
i hope my article or tip in progress will alert some other C# devs to what can be done now.
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
I haven't used ChatGPT, yet, but could there be an analogy between the current AI tools and high level languages when they were first introduced? The language of the high level language had to be learned before you could generate correct code. Even with the correct language the compiler often generates machine code that an assembler programmer would reject.
Unfortunately the language of AI is not as clearly defined as, say, COBOL. Devs are teaching it the language. In five years it may have evolved to the point where you can describe and get exactly the code you need.
|
|
|
|
|
Hi Arthur,
inho, we are all struggling to "frame" an interesting new phenomena that suddenly challenges what we thought AI based on massive LLM's could do.
Tipping Point, Inflection Point, Paradigm Shift, Black Swan Event ?
If i start with this:
Quote: write a public interface named IRxAI with fields DateCreated, DateModified,
Name, Comments, List<irxai> Instances
with methods
write a public class named RxAIDemo that implements IRxAI
write constructor with all parameters and five minutes later, after a few prompts have this:Quote: using System;
using System.Collections.Generic;
// Define the IRxAI interface
public interface IRxAI
{
// Get-only property for the creation date
DateTime DateCreated { get; }
// Get-only property for the modification date
DateTime DateModified { get; }
// Get-only property for the name
string Name { get; }
// Get and set property for the comments
string Comments { get; set; }
// Get-only property for the list of instances
List<irxai> Instances { get; }
// Method to add an instance
void Add(IRxAI instance);
// Method to remove an instance
void Remove(IRxAI instance);
// Method to delete an instance
void Delete();
}
// Define the RxAIDemo class that implements the IRxAI interface
public class RxAIDemo : IRxAI
{
// Get-only property for the creation date
public DateTime DateCreated { get; private set; }
// Get-only property for the modification date
public DateTime DateModified { get; private set; }
// Get-only property for the name
public string Name { get; private set; }
// Get and set property for the comments
public string Comments { get; set; }
// Get-only property for the list of instances
public List<irxai> Instances { get; private set; }
// Constructor for the RxAIDemo class
public RxAIDemo(string name, string comments)
{
// Set the creation and modification dates to the current date and time
DateCreated = DateTime.Now;
DateModified = DateCreated;
// Set the name
Name = name;
// Set the comments
Comments = comments;
// Initialize the list of instances and add the current instance to it
Instances = new List<irxai> { this };
}
// Method to add an instance
public void Add(IRxAI instance)
{
// Add the instance to the list of instances
Instances.Add(instance);
}
// Method to remove an instance
public void Remove(IRxAI instance)
{
// Remove the instance from the list of instances
Instances.Remove(instance);
}
// Method to delete an instance
public void Delete()
{
// Implement your delete logic here
}
} are you impressed ?
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch
|
|
|
|
|
I am impressed. I'm just trying to find a paradigm I can use to approach this technology. It's easier to adopt if I'm coming from somewhere familiar.
---
I just spent the last two hours playing with ChatGPT and I'm even more impressed. I am building a personal-use application for wine making. In that 2 hours I got further along than I had in two days of conventional programing. It didn't take long to learn that the secret is telling it what you want rather than how to do it.
The most important thing is to be able to describe your requirements in unambiguous terms. That's something we've been trying to get our users to do as long as programming has been around. The role of dev may evolve to that of translator but will take on much more importance because bad translation may affect hundreds of thousands of lines generated code.
I'm not a convert. At least not yet. But for small projects I see the potential and will continue to study the catechism.
modified 18-Jul-23 18:14pm.
|
|
|
|
|
Arthur Humphrey wrote: Unfortunately the language of AI is not as clearly defined as, say, C B L
Why, why, why would you use that language as an analogy?
Cheers,
Vikram.
|
|
|
|
|
To give a vague indication of my age and to show how far I need to go. For a long time my learning curve was like this / but I dropped out for a couple of years. Now my learning curve is like |.
|
|
|
|
|
I've only just discovered "Peek definition"* - it opens a "floating window" into the code where that object is actually defined. Wow, but that's handy - I've been using "Go to Definition" for years and it's a pain because it opens in another window if it's in a different file (or you can use Window Split if it's in the same file).
How long has that been there? Probably years ...
* Right click any class, variable, field, property, or method and select "Peek Definition" or use ALT+F12
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
VS 2019
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." ― Gerald Weinberg
|
|
|
|
|