4 ms·
I work on very complex software, and am basically using ChatGPT all day. I have somewhat stopped figuring how to do things like read from a file, serialize data
by ldjkfkdsjnv 4y ago
I work on very complex software, and am basically using ChatGPT all day. I have somewhat stopped figuring how to do things like read from a file, serialize data, etc. Focussing on high level logic, and have chatgpt give me the code snippets I assemble together. Its still difficult, but its pretty clear software development is going to change
- ThorsBane 4y agoI can see myself using ChatGPT as a search assistant to help me with proof of concepts and snippets, but I would still manually write all of the code that I'm putting into production. So far I've not found a reliable predictable way to incorporate ChatGPT or Copilot into my daily workflows as a pair programmer or code generator. But for generating templates or snippets or helping me with documentation for proof of concepts...or being an amazing search friend with great abilities to format data for me, absolutely an amazing friend to have onboard.
- worrycue 4y ago> I have somewhat stopped figuring how to do things like read from a file, serialize data, etc. Shouldn’t that stuff be in a library or API call with examples a quick google search away?
- raincole 4y agoYes. And in my experience Bing Chat/Copilot are simply faster.
- scrubs 4y agoFor chuckles I asked ChatGPT to write me a sort function on integers. It dutifully served up code to call a library sort function. Technically correct, but I am and remain unimpressed.
- nomel 4y agoI think that’s more of a prompt problem. It answered in a realistic, and I would even claim “correct” way. You should not be writing a sort by hand in 2023. If you don’t want it to use a library, ask it to not use any library calls. And, of course, ChatGPT 4 gives much better results.
- ChatGTP 4y agoThis is where I think problems will start, people will stop using libraries and leaning on this, unleashing spaghetti wars.
- nomel 4y agoI used ChatGPT4 daily, for coding. I’m not seeing this. More often than not, it will hallucinate libraries and functions within them. I’ve never seen it write out anything tedious. It’s based on reality, after all. It’s hard to find a hand rolled sort, in code, these days.
- aix1 4y agoThis got me curious and I asked ChatGPT/GPT-4 to write a sorting function for integers. It came up with the following along with a verbal explanation of how it works: def quick_sort(arr): if len(arr) <= 1: return arr pivot = arr[len(arr) // 2] left = [x for x in arr if x < pivot] middle = [x for x in arr if x == pivot] right = [x for x in arr if x > pivot] return quick_sort(left) + middle + quick_sort(right) # Example usage: arr = [3, 6, 8, 10, 1, 2, 1] print("Unsorted array:", arr) sorted_arr = quick_sort(arr) print("Sorted array:", sorted_arr) I then asked it to make the code more efficient. To this, it offered "a more efficient in-place implementation [...] using the Lomuto partition scheme". The code was reasonable but had an off-by-one error. It took me about thirty seconds to find and fix the error. Since ChatGPT said that "the Lomuto partition scheme is generally less efficient than the Hoare partition scheme, but it is easier to implement and understand", I asked it to show the code for the Hoare scheme. The code was correct and was accompanied by an explanation that "this version of quick sort is more efficient because it performs fewer swaps on average compared to the Lomuto partition scheme." I asked it about the average number of swaps for both schemes. It gave some answers. However, since I didn't know the correct answers off the top of my head and couldn't be bothered to work them out, I couldn't just take ChatGPT's at face value (but I suspect that one was the correct while the other wasn't). Finally I asked "What's the worst-case input for these three implementations?" Here things went completely off the rails. It repeated the same answer for all there snippets. The answer happened to be correct for the last two schemes but for the first it read: <quote> Basic Quick Sort (with middle element as pivot): The worst-case input for this implementation is a sorted or reverse-sorted array. Since the pivot is chosen as the middle element, the partitioning will be unbalanced, and the algorithm will have a time complexity of O(n^2). </quote> This is clearly nonsense.
- mountainriver 4y agoI find it wild people say this, I’ve really tried using chat gpt for a bunch of different problems and 9 times out of 10 it was a waste of time and I would get to a better answer faster by googling it or reading the docs. This stuff will be amazing in coming years but I’m shocked people say they use it all day
- kerpotgh 4y ago[dead]
- turdprincess 4y agoMy flow with ChatGPT lately is like this: 1. I get stumped and ask it “can I do thing X with technology Y?” 2. It always says “yes, here is how” 3. A majority of the time, it’s lying and you can’t actually do whatever I asked it. It’s incredibly frustrating - it’s like it doesn’t know how to say “no”. Granted, I am usually asking it pretty niche stuff about iOS development, but so far it’s proving to be a waste of time. I guess it does feel good to feel like you have a lead on some problem you’ve been beating your head against for hours, but then the harsh reality of actual reality comes quick.
- spokeonawheel 4y ago> its like it doesnt know how to say "no" chatGPT is basically a junior dev. Does grunt work, gets it wrong from time to time, and doesnt ever say no even when its appropriate
- adave 4y agoor like an intern who can google snippets of code from previously known solutions and is sometimes out of context or outright false.
- bakuninsbart 4y agoThis might be an issue of phrasing though: ChatGPT isn't good if it has too many options, in my experience it helps a lot to narrow down tech and specs as much as possible. In addition, if you know how to do X in Z, you can usually quite effectively ask it how to do X in Y in line with Z.
- up-n-atom 4y agoKeep seeing these types of replies and I often ask myself what industry do they work in? because the Embedded Software Engineering and R&D I am currently apart of is full on NDA on top of NDA. And I suspect that is true for a lot of people working in other software fields. ChatGPT is only a curiosity and I doubt will ever make an impact in the hard/soft world where IP rules the roost.