My 2c: I've been an eng for around 15 yrs. I semi-recently had a brain injury so haven't been able to dedicate anywhere near as much mental cognition to programming recently. That's why I've been unable to maintain full-time work.
I started using chatgpt around 3 months ago. Initially skeptical, I started giving it fun and weird logical/semantic puzzles to satisfyingly "prove" my intuition that it was insufficient to solve any true problems (and that we humans are still needed!). However, I soon became humbled to its capabilities. There are many many things it cannot do, but I've been amazed at the things it can do if given nuanced and detailed enough prompts. I've realised that, if I prompt it well enough, and use my existing knowledge from those accrued 15yrs, I can get awesome results. I'm working on a small project right now and it's written about ~70% of the code. I've had to make various corrections along the way, but I've found that I can focus on content and larger 'macro' domain logic than annoying (tho intriguing) procedural coding.
It's been so incredibly empowering and freeing to be able to dedicate more brain to _what_ I want to build instead of _how_ I want to build it. My normal build process is now something like this:
- state problem and what you desire, with good specificity
- [optional] give it your current working code, specifying frameworks, rough file structure
- confirm it understands and clarify/correct it if necessary
- [important] ask it to ask _you_ questions for clarification
- ask it for an overview of how it would solve the problem
- (for big tasks, expect a macro rundown)
- (for small tasks, expect or ask for the actual code)
- [important] make specific requests about lang/module/algorithms
- [important] ask it to write test suites to prove its code works and paste in any errors or assertion failures you encounter. It'll surprise you with its advice.
It doesn't replace my need to code, but OMG it makes it so much less burdensome and I'm learning a tonne as well : )
That’s super interesting. I’m recovering from burnout and other health issues and I’ve found it to be occasional helpful in the way you are describing. For me, it can smooth out the process and “lower the intensity” of accomplishing any particular task, especially if it is something where I don’t know how to do it off the top of my head (what libs / functions to use, how to call them, etc). I can then pretty easily correct any mistakes, and I didn’t have to spend 20 mins googling, reading docs, and so on in order to solve the problem.
If you don’t mind, do you have any good examples of how you prompt it? Your process looks pretty nice / robust, it would be cool to see it in action.
Also, have you used gpt-4 much or can you get away with using 3.5 sometimes?
Yeh same. It's got pretty good overview of what libraries are available. I tend to ask it for an npm module to do x and it always has a couple options, and can list pros/cons, and give/modify code to use them.
> have you used gpt-4 much or can you get away with using 3.5 sometimes?
Ah so I _always_ use gpt4. It's in a whole other ballpark IMHO.
> If you don’t mind, do you have any good examples of how you prompt it?
E.g. I would say something like "show me precisely how to set-up, code and deploy a nextjs app that lets a user "...". It tends to be really good at doing simple standalone stuff like todos/colorpickers/blah apps, but you'd be surprised how far it can get with a more advanced problem domain. E.g. I just entered this and it's really impressed me with its output: "Can u show me how to set-up, code and deploy a nextjs app that lets users input a set of sentences into a textarea and receive back clustered sets of sentences (based on semantic similarity) with different colors of the hsl spectrum indicating that similarity." - try it! It gives complete react components, endpoints using tensorflow, and shows how to vary hsl based on weights. I reckon I'd have to make around 20 mins changes to get it working and deployed.
Maybe I expect more or work on different standards but every time I've tried it it gives low quality code with issues that I rather write it myself. Sometimes it'd give completely wrong answers.
It's just not code I'd commit or let pass a code review.
It's funny to me that you have such an incredibly thoughtful series of prompts and responses to yield optimal results as if you are truly leveraging AI and I am just yelling at it like it's a junior dev on a Slack that I don't like. "Chat! Take this code and make it do X instead! I wanna do Y, do it. Nah, not like that, do it with this thing here."
Yeah, it’s (3.5 and 4) good at writing code overall. I’ve had it write me entire programs (of smaller size) and mostly I just have to correct for library usage (because it’s built on outdated docs) or small things like explicit casting in a language like Python where that’s needed.
...and makes your code public domain (you just admitted here that you're using it)- if anyone accesses app developed by you, they can use it freely without any license.
Worst thing - you're feeding potentially not your code into GPT. That'd be a fireable offense to me (and a very expensive lawsuit for at least couple places I know). Not an issue if you're lone wolf, though.
It's a dystopian thought, but I wouldn't be surprised if Microsoft (which provides such services), when it knows you're using service to create public domain code, could just copy it one-to-one, because hey - free lunch, right?
See sibling poster for general information. There's also matter of "injecting" copyleft code from generator into your own codebase [1], e.g. GPL3 or AGPL.
Few companies are blocking their employees from using it [2] quoting various reasons, and I know some that aren't big enough to matter in the news, but have done it too.
In any case, no one is going to deploy purely AI-generated code in the near future, which would be non-copyrightable. In practice any generated code will be edited by the human developer, and it doesn't take that much creative human input to make the result copyrightable.
Derivative works aren't as easily re-copyrightable. And we're considering context where programmer copy-pasted code from GPT, so probably it won't be rewritten in most chunks.
There's also other part - if there's proof that partial code (even like 10%) is made using non-copyrightable solution it would be very hard to prove that the rest 90% is.
Until the laws address those issues using any code from generator is a huge liability.
> if anyone accesses app developed by you, they can use it freely without any license.
This is simply incorrect on every level, starting with the fact that (in the US, anyway), you can't place your works in the public domain even if you wanted to.
That's not true in at least one case: if you work for the US federal government, all of your works are automatically in the public domain. Of course, they may also be barred from disclosure for other reasons.
You're correct, that's the one exception. Although you could argue that it's not really an exception -- it's that when you're producing IP in the course of your employment, your employer owns the copyright. And if you work for the federal government, your employer is the American people, so in a real sense we collectively hold the copyright. Which is the same as being in the public domain.
My 2c: I've been an eng for around 15 yrs. I semi-recently had a brain injury so haven't been able to dedicate anywhere near as much mental cognition to programming recently. That's why I've been unable to maintain full-time work.
I started using chatgpt around 3 months ago. Initially skeptical, I started giving it fun and weird logical/semantic puzzles to satisfyingly "prove" my intuition that it was insufficient to solve any true problems (and that we humans are still needed!). However, I soon became humbled to its capabilities. There are many many things it cannot do, but I've been amazed at the things it can do if given nuanced and detailed enough prompts. I've realised that, if I prompt it well enough, and use my existing knowledge from those accrued 15yrs, I can get awesome results. I'm working on a small project right now and it's written about ~70% of the code. I've had to make various corrections along the way, but I've found that I can focus on content and larger 'macro' domain logic than annoying (tho intriguing) procedural coding.
It's been so incredibly empowering and freeing to be able to dedicate more brain to _what_ I want to build instead of _how_ I want to build it. My normal build process is now something like this:
- state problem and what you desire, with good specificity
- [optional] give it your current working code, specifying frameworks, rough file structure
- confirm it understands and clarify/correct it if necessary
- [important] ask it to ask _you_ questions for clarification
- ask it for an overview of how it would solve the problem
- (for big tasks, expect a macro rundown)
- (for small tasks, expect or ask for the actual code)
- [important] make specific requests about lang/module/algorithms
- [important] ask it to write test suites to prove its code works and paste in any errors or assertion failures you encounter. It'll surprise you with its advice.
It doesn't replace my need to code, but OMG it makes it so much less burdensome and I'm learning a tonne as well : )