Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Is ChatGPT worth the effort for a developer?

Is ChatGPT worth the effort for a developer?

Scheduled Pinned Locked Moved The Lounge
csharpcssdatabasecomperformance
32 Posts 12 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H honey the codewitch

    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

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #16

    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

    H 1 Reply Last reply
    0
    • L Lost User

      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

      H Offline
      H Offline
      honey the codewitch
      wrote on last edited by
      #17

      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

      L 1 Reply Last reply
      0
      • B BillWoodruff

        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

        J Offline
        J Offline
        jochance
        wrote on last edited by
        #18

        Is that only an update away for someone lagging behind in version but with a standard ReSharper license?

        B 1 Reply Last reply
        0
        • A Andre Oosthuizen

          As a quick answer, Yes and No! Their are tons of articles on it's worth, it's unworthiness etc. etc. There is a Q&A from this morning that turned out quite interesting IMO - How to take specific element from the first list , second list and those specific element add into third list[C#][^] Richard MacCutchan and Graeme_Grant posted respective solutions, both of them works as a solution. Graeme did an excercise in using ChatGPT (as he mentioned in his post, just for fun and interest sake) and it actually returned a correct answer, for a change! I then did a fun check by asking CHATGPT to check both blocks of code and show which block is - 1) The fastest generated output 2) Using the least performance 3) Is the most efficient The returned answer were that it's own generated code were the worst performer. Richard's code were Block2 and Graeme's ChatGPT code were Block1 -

          Quote:

          Block 2 will run faster and use less performance compared to Block 1. In Block 1, you are using a List to combine the elements from two lists (a1 and a2) into a single list (combinedList). The code iterates over the length of the longer list (maxLength) and checks if the current index is within the bounds of each list before adding the element to the combinedList. Finally, it uses string.Join to concatenate the elements in combinedList into a single string. In Block 2, you are using a StringBuilder (output) to build the combined string directly. The code iterates over the length of a1 and adds each element to the output. It also checks if the current index is within the bounds of a2 and adds its corresponding element. Finally, it prints the output using Console.WriteLine. Block 2 is more efficient because it eliminates the need for an additional list (combinedList). It directly builds the string using StringBuilder, which is more efficient for concatenating multiple strings compared to repeatedly appending to a List. Additionally, it does not involve the overhead of checking list bounds for every iteration, as it directly uses the lengths of a1 and a2 in the loop condition.

          We do from time to time make use of ChatGPT, more as an exercise than a solution and we found, as mentioned in my comment

          M Offline
          M Offline
          Matt Bond
          wrote on last edited by
          #19

          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

          B 1 Reply Last reply
          0
          • H honey the codewitch

            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

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #20

            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

            1 Reply Last reply
            0
            • J jochance

              Is that only an update away for someone lagging behind in version but with a standard ReSharper license?

              B Offline
              B Offline
              BillWoodruff
              wrote on last edited by
              #21

              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

              1 Reply Last reply
              0
              • M Matt Bond

                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

                B Offline
                B Offline
                BillWoodruff
                wrote on last edited by
                #22

                Given the complexity of speech to text alone ... your project sounds ... impossible. Have you done a feasibility study ? Good luck with that ! :~ :omg:

                «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

                M 1 Reply Last reply
                0
                • A Andre Oosthuizen

                  As a quick answer, Yes and No! Their are tons of articles on it's worth, it's unworthiness etc. etc. There is a Q&A from this morning that turned out quite interesting IMO - How to take specific element from the first list , second list and those specific element add into third list[C#][^] Richard MacCutchan and Graeme_Grant posted respective solutions, both of them works as a solution. Graeme did an excercise in using ChatGPT (as he mentioned in his post, just for fun and interest sake) and it actually returned a correct answer, for a change! I then did a fun check by asking CHATGPT to check both blocks of code and show which block is - 1) The fastest generated output 2) Using the least performance 3) Is the most efficient The returned answer were that it's own generated code were the worst performer. Richard's code were Block2 and Graeme's ChatGPT code were Block1 -

                  Quote:

                  Block 2 will run faster and use less performance compared to Block 1. In Block 1, you are using a List to combine the elements from two lists (a1 and a2) into a single list (combinedList). The code iterates over the length of the longer list (maxLength) and checks if the current index is within the bounds of each list before adding the element to the combinedList. Finally, it uses string.Join to concatenate the elements in combinedList into a single string. In Block 2, you are using a StringBuilder (output) to build the combined string directly. The code iterates over the length of a1 and adds each element to the output. It also checks if the current index is within the bounds of a2 and adds its corresponding element. Finally, it prints the output using Console.WriteLine. Block 2 is more efficient because it eliminates the need for an additional list (combinedList). It directly builds the string using StringBuilder, which is more efficient for concatenating multiple strings compared to repeatedly appending to a List. Additionally, it does not involve the overhead of checking list bounds for every iteration, as it directly uses the lengths of a1 and a2 in the loop condition.

                  We do from time to time make use of ChatGPT, more as an exercise than a solution and we found, as mentioned in my comment

                  D Offline
                  D Offline
                  David On Life
                  wrote on last edited by
                  #23

                  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.)

                  B 1 Reply Last reply
                  0
                  • B BillWoodruff

                    Given the complexity of speech to text alone ... your project sounds ... impossible. Have you done a feasibility study ? Good luck with that ! :~ :omg:

                    «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

                    M Offline
                    M Offline
                    Matt Bond
                    wrote on last edited by
                    #24

                    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

                    B 1 Reply Last reply
                    0
                    • M Matt Bond

                      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

                      B Offline
                      B Offline
                      BillWoodruff
                      wrote on last edited by
                      #25

                      Show me proof of concept, and i'll stop laughing :omg:

                      «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

                      M 1 Reply Last reply
                      0
                      • D David On Life

                        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.)

                        B Offline
                        B Offline
                        BillWoodruff
                        wrote on last edited by
                        #26

                        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

                        1 Reply Last reply
                        0
                        • B BillWoodruff

                          Show me proof of concept, and i'll stop laughing :omg:

                          «The mind is not a vessel to be filled but a fire to be kindled» Plutarch

                          M Offline
                          M Offline
                          Matt Bond
                          wrote on last edited by
                          #27

                          GitHub - umgc/summer2023: Using ChatGPT/Bard to help short-term memory loss affected individuals.[^] Neither the class nor the project is done yet, but we are well on our way. Currently, the backend team is not done their part, so the back and front ends are not wired up yet. Should be fixed within a week.

                          Bond Keep all things as simple as possible, but no simpler. -said someone, somewhere

                          1 Reply Last reply
                          0
                          • A Andre Oosthuizen

                            As a quick answer, Yes and No! Their are tons of articles on it's worth, it's unworthiness etc. etc. There is a Q&A from this morning that turned out quite interesting IMO - How to take specific element from the first list , second list and those specific element add into third list[C#][^] Richard MacCutchan and Graeme_Grant posted respective solutions, both of them works as a solution. Graeme did an excercise in using ChatGPT (as he mentioned in his post, just for fun and interest sake) and it actually returned a correct answer, for a change! I then did a fun check by asking CHATGPT to check both blocks of code and show which block is - 1) The fastest generated output 2) Using the least performance 3) Is the most efficient The returned answer were that it's own generated code were the worst performer. Richard's code were Block2 and Graeme's ChatGPT code were Block1 -

                            Quote:

                            Block 2 will run faster and use less performance compared to Block 1. In Block 1, you are using a List to combine the elements from two lists (a1 and a2) into a single list (combinedList). The code iterates over the length of the longer list (maxLength) and checks if the current index is within the bounds of each list before adding the element to the combinedList. Finally, it uses string.Join to concatenate the elements in combinedList into a single string. In Block 2, you are using a StringBuilder (output) to build the combined string directly. The code iterates over the length of a1 and adds each element to the output. It also checks if the current index is within the bounds of a2 and adds its corresponding element. Finally, it prints the output using Console.WriteLine. Block 2 is more efficient because it eliminates the need for an additional list (combinedList). It directly builds the string using StringBuilder, which is more efficient for concatenating multiple strings compared to repeatedly appending to a List. Additionally, it does not involve the overhead of checking list bounds for every iteration, as it directly uses the lengths of a1 and a2 in the loop condition.

                            We do from time to time make use of ChatGPT, more as an exercise than a solution and we found, as mentioned in my comment

                            A Offline
                            A Offline
                            Arthur Humphrey
                            wrote on last edited by
                            #28

                            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.

                            B V 2 Replies Last reply
                            0
                            • A Arthur Humphrey

                              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.

                              B Offline
                              B Offline
                              BillWoodruff
                              wrote on last edited by
                              #29

                              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 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 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 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 { this }; } // Method to add an instance public void Add(IRxAI instance) { // Add the i

                              A 1 Reply Last reply
                              0
                              • B BillWoodruff

                                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 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 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 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 { this }; } // Method to add an instance public void Add(IRxAI instance) { // Add the i

                                A Offline
                                A Offline
                                Arthur Humphrey
                                wrote on last edited by
                                #30

                                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.

                                1 Reply Last reply
                                0
                                • A Arthur Humphrey

                                  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.

                                  V Offline
                                  V Offline
                                  Vikram A Punathambekar
                                  wrote on last edited by
                                  #31

                                  Arthur Humphrey wrote:

                                  Unfortunately the language of AI is not as clearly defined as, say, C X| B X| L

                                  Why, why, why would you use *that* language as an analogy?

                                  Cheers, Vikram.

                                  A 1 Reply Last reply
                                  0
                                  • V Vikram A Punathambekar

                                    Arthur Humphrey wrote:

                                    Unfortunately the language of AI is not as clearly defined as, say, C X| B X| L

                                    Why, why, why would you use *that* language as an analogy?

                                    Cheers, Vikram.

                                    A Offline
                                    A Offline
                                    Arthur Humphrey
                                    wrote on last edited by
                                    #32

                                    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 |.

                                    1 Reply Last reply
                                    0
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes


                                    • Login

                                    • Don't have an account? Register

                                    • Login or register to search.
                                    • First post
                                      Last post
                                    0
                                    • Categories
                                    • Recent
                                    • Tags
                                    • Popular
                                    • World
                                    • Users
                                    • Groups