ColdFenix ( @ColdFenix@discuss.tchncs.de ) 45•7 months agoThe trick is to split the code into smaller parts.
This is how I code using ChatGPT:
- Have it analyze how to structure the program and then give me the code for the outline with not yet implemented methods and functions.
- Have it implement the methods and functions one by one with tests for each one.
- I copy the code and test for each method and function before moving on to the next one So that I always have working code.
- Despair because my code is working and I have no idea how it works and I have become a machine that just copies code without an original thought of my own.
This works pretty well for me as long as I don’t work with obscure frameworks or in large codebases.
DeathsEmbrace ( @DeathsEmbrace@lemmy.ml ) 13•7 months agoThis is exactly how you forget coding.
averyminya ( @averyminya@beehaw.org ) 2•7 months agoYou’d search it anyway.
HurlingDurling ( @HurlingDurling@lemm.ee ) English13•7 months agoActually, that’s the trick when writing code in general, and also how unit tests help coding an application.
Tathas ( @Tathas@programming.dev ) 6•7 months agoTo be fair, you’re also describing working with other people.
Hazzia ( @Hazzia@discuss.tchncs.de ) 44•7 months agoSaw an article on getpocket while at work by an alleged programmer that was “mourning the art of coding” because ChatGPT was doing such a good job that his non-coder friend was able to setup a webpage.
To be fair I couldn’t tollerate reading past the first paragraph, but it definitely felt like the dude didn’t know the difference between funtional code and good code. Like, sure ChatGPT may be able to make a website, but good luck getting it to formulate anything non-generic.
Thorned_Rose ( @Thorned_Rose@kbin.social ) 31•7 months agoAs an ex webdesigner/dev, Squarespace, Weebly and the like killed my income well before ChatGPT did.
stebo02 ( @stebo02@sopuli.xyz ) 27•7 months agoI never copy code from chatgpt. It’s not my code and it probably doesn’t work. However it is great at making suggestions on how to tackle a problem or how to improve your code. Use ChatGPT like Stack Overflow, with instant replies.
Railcar8095 ( @Railcar8095@lemm.ee ) 13•7 months agoThis. I always use that example, ChatGPT is stack overflow or a very eager intern. Review and make test cases
tweeks ( @tweeks@feddit.nl ) 4•7 months agoPlain copy paste without a critical view is not recommended, but it surely provides good pieces of code from time to time. Especially in obscure frameworks/languages, compared to what can be googled.
ChatGPT 4 is a really big difference with 3.5 though. What took me hours together with the 3.5, was fixed in a few minutes with 4.
Empathy [he/him] ( @Empathy@beehaw.org ) 16•7 months agoCo-pilot can write some small very simple functions for me, sometimes saving me the need to look at documentation. It will still often fail at those, in my experience, and will consistently fail at anything more complex.
It will get better, but currently it’s only a small help.
voxel ( @vox@sopuli.xyz ) 4•7 months agoit really helps with the boring parts and takss that require doing the same thing over and over;
for example, i use it to generate mapping functions (like in my (abandoned) gba emulator project, function that maps arm instruction type enum to function pointers was generated almost entirely by chatgpt)
Aabbcc ( @Aabbcc@lemm.ee ) 7•7 months agoI’ve been having a great time with copilot
CanadaPlus ( @CanadaPlus@lemmy.sdf.org ) 3•7 months agoYeah, that’s the way to go. Copilot or similar to automate the simple stuff, while you still do all the architecting and check whatever it suggests.