Click here to Skip to main content
15,887,248 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Hmmm, Win 11 update seems to have broken something Pin
fd975016-Jul-23 20:46
professionalfd975016-Jul-23 20:46 
GeneralRe: Hmmm, Win 11 update seems to have broken something Pin
Graeme_Grant16-Jul-23 22:08
mvaGraeme_Grant16-Jul-23 22:08 
GeneralRe: Hmmm, Win 11 update seems to have broken something Pin
glennPattonWork316-Jul-23 22:51
professionalglennPattonWork316-Jul-23 22:51 
GeneralRe: Hmmm, Win 11 update seems to have broken something Pin
Choroid17-Jul-23 6:25
Choroid17-Jul-23 6:25 
GeneralRe: Hmmm, Win 11 update seems to have broken something Pin
glennPattonWork317-Jul-23 7:23
professionalglennPattonWork317-Jul-23 7:23 
GeneralRe: Hmmm, Win 11 update seems to have broken something Pin
Matt Bond17-Jul-23 4:04
Matt Bond17-Jul-23 4:04 
GeneralRe: Hmmm, Win 11 update seems to have broken something Pin
Vikram A Punathambekar17-Jul-23 6:13
Vikram A Punathambekar17-Jul-23 6:13 
GeneralIs ChatGPT worth the effort for a developer? Pin
Andre Oosthuizen15-Jul-23 23:21
mveAndre Oosthuizen15-Jul-23 23:21 
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<string> 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<string>. 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 at the psot, that you have to hammer the blue &^%$ out of it to return actual proper code. By hammering I mean that you ask question after question leading it into the expected answer until you can compile, test and run properly the desired returned code. The secret I think lies in the way or form the questions is submitted to ChatGPT, same as the way we Google for things. The better the question, the better the answer (there are many links on how to ask ChatGPT questions/give it instructions).

Problem is that we can see it in the Q&A (not all members mind you) where code is generated by ChatGPT, the user has no idea what the code means or why it does not work and they will post their question "It does not work!", "I'm new to programming", with a zillion lines of code posted, expecting a miracle working solution from other members. Confused | :confused:

So, to the question in the title - It is a great tool if you have a general idea of what the code should look like or function as. The time however in hammering it to return what is expected is just not worth the while, I can write the code, have a coffee, eat my lunch and then some in the same time trying to make ChatGPT work for me!. Is ChatGPT worth the effort for a developer? - IMHO, NO!

modified 16-Jul-23 5:36am.

GeneralRe: Is ChatGPT worth the effort for a developer? PinPopular
Slacker00716-Jul-23 1:06
professionalSlacker00716-Jul-23 1:06 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
Jeremy Falcon16-Jul-23 2:53
professionalJeremy Falcon16-Jul-23 2:53 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
Andre Oosthuizen16-Jul-23 8:12
mveAndre Oosthuizen16-Jul-23 8:12 
GeneralRe: Is ChatGPT worth the effort for a developer? PinPopular
Richard MacCutchan16-Jul-23 1:27
mveRichard MacCutchan16-Jul-23 1:27 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
Graeme_Grant16-Jul-23 1:34
mvaGraeme_Grant16-Jul-23 1:34 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
Jeremy Falcon16-Jul-23 2:55
professionalJeremy Falcon16-Jul-23 2:55 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
Gerry Schmitz16-Jul-23 5:18
mveGerry Schmitz16-Jul-23 5:18 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
honey the codewitch16-Jul-23 6:25
mvahoney the codewitch16-Jul-23 6:25 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
Andre Oosthuizen16-Jul-23 22:04
mveAndre Oosthuizen16-Jul-23 22:04 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
Graeme_Grant16-Jul-23 22:14
mvaGraeme_Grant16-Jul-23 22:14 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
honey the codewitch16-Jul-23 22:23
mvahoney the codewitch16-Jul-23 22:23 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
Graeme_Grant16-Jul-23 22:28
mvaGraeme_Grant16-Jul-23 22:28 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
Gerry Schmitz17-Jul-23 4:16
mveGerry Schmitz17-Jul-23 4:16 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
honey the codewitch17-Jul-23 4:17
mvahoney the codewitch17-Jul-23 4:17 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
Gerry Schmitz17-Jul-23 6:13
mveGerry Schmitz17-Jul-23 6:13 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
BillWoodruff16-Jul-23 21:27
professionalBillWoodruff16-Jul-23 21:27 
GeneralRe: Is ChatGPT worth the effort for a developer? Pin
Andre Oosthuizen16-Jul-23 22:11
mveAndre Oosthuizen16-Jul-23 22:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.