7 ms·
I did a similar exercise recently when I needed to make a fairly basic rest API and CRUD frontend using 2 frameworks I wasn't particularly familiar with. I used
by invalidusernam3 3y ago
I did a similar exercise recently when I needed to make a fairly basic rest API and CRUD frontend using 2 frameworks I wasn't particularly familiar with. I used GPT4 to generate ALL the code for it. I'll write a blog post about it soon, but a quick overview was:
I suspect it was slower than just writing the code/referencing the docs, and would be much slower than someone could do if they were experienced with the two frameworks. I had to be very specific and write a few long and detailed prompts for the more complex parts of a the application. It took around 5 hours to make the application, with a lot of that time spent sitting waiting for the (sometimes painfully slow) ChatGPT output. In a framework I'm more familiar with I think I could have easily got it done in under 2 hours
It was definitely useful for making sure I was doing it the correct way, kind of like have an expert on call for any questions. It was also very useful for generating perfectly formatted boilerplate code (some frameworks have CRUD generation built in, but this one did not).
It was a fun experiment, and I found it useful as a learning/guiding/generation tool, but I won't be using it for general day to day development any more than I currently do. For most instances it's quicker to just learn the framework well and write the code yourself.
- _ea1k 3y ago> It was definitely useful for making sure I was doing it the correct way, kind of like have an expert on call for any questions. I've found it to be shockingly good at this. I end up asking a lot of questions like, "what is the best directory structure for a project on {foo} platform?" or "What is the idiomatic way to do {x} in {language y}?" It has the advantage of having seen lots of projects in every language, and for some questions that automatically leads to a good answer.
- Spivak 3y agoI use Sourcegraph a lot for this when GPT can't get a satisfying answer.
- dartos 3y agoI always get the classic “It really depends on your use case and neither pattern is exactly better than the other” when asking gpt about programming patterns
- sprobertson 3y agoPut something in your system prompt along the lines of "don't waffle"
- bfuller 3y agoit has such a completionist fetish, I have found it works much better when you basically tell it to pick a side and not go out of its way to be balanced.
- deleted 3y ago[deleted]
- Kiro 3y agoEven when it says that it always continues with "but" and gives me an answer.
- acedTrex 3y agothis is how exactly how i use gpt4, i find it very useful
- two_in_one 3y agoBe careful and don't trust all it says. Sometimes it invents API functions which are not there, or doesn't see existing. And always very confident till you point it.
- 1f60c 3y agoAnd then it’s like, “thank you for telling me about this, I’ll remember that for next time,” which is how a human ought to respond but not how ChatGPT actually learns.
- simonw 3y agoHah, yeah that's so frustrating. It's memory is reset every time you start a new conversation, but it doesn't make that at all clear to people.
- gverrilla 3y agoIt also resets inside a single conversation if you go beyond a certain number of tokens, and as far as I know there is no warning whatsoever to the user when it happens.
- taneq 3y agoThe obvious next thing to try would be to continuously fine tune the model on these conversations, so it actually fulfills the promises most of these models make about "learning continuously". I haven't yet seen any actual implementations of this, though. I'm sure someone's tried it, I wonder how it went.
- COAGULOPATH 3y ago>I had to be very specific and write a few long and detailed prompts for the more complex parts of a the application. This is my experience. You still have to understand programming: you're just typing it out in Natural English.
- bugglebeetle 3y agoConversely, doing so has helped me flesh out my thoughts on many occasions. As I ran into obstacles with errors or imprecise prompting, I realized my design had issues or edge cases I hadn’t take into account. Perhaps it would be better if I wrote out several paragraphs describing my intentions before taking up most coding tasks, but I hardly think my boss would be in support of this!
- jdironman 3y agoLike a rubber duck which provides feedback. but since it's coming from a rubber duck it's good to verify that duck knows what it's talking about.
- jprete 3y ago> Perhaps it would be better if I wrote out several paragraphs describing my intentions before taking up most coding tasks I often do things like this, and if the scale of the document was somewhat larger than you describe, it would be a design document.
- bugglebeetle 3y agoMy role unfortunately doesn’t allow for this. I do more “in the trenches” data science stuff. The value is quite obvious to me for a role where there is more space for this or in product planning.
- PeterisP 3y agoThat's a great fit for scenarios where you do know programming but don't know the particular language and framework on which you suddenly have to do some maintenance or improvement. For many things the available documentation is poor, and asking a bot is much more helpful.
- drcode 3y agoWhat I think you're overlooking is that most people can only do a few hours of hardcore coding at peak productivity a day (3hours for me, maybe) So you could spend 3hours babysitting GPT4 to write some code for you, but then you'd still have 3 hours of peak code productivity that day that you haven't "used up" yet
- _delirium 3y agoI’m the opposite, personally. I can code for 5 or 6 hours just fine if I’m “in the zone”, but I can’t deal with LLMs for more than an hour or two max, usually less. I find their sweet spot is when I need to ask one or two questions with one or two follow-ups, 5-10 minutes ideally. They can sometimes be a big win in small doses if you can keep it to that kind of interaction. But they are just draining to interact with for longer periods. For me they’re a lot like being a TA stuck in multi-hour office hours with undergrads once you get past a few questions. Just a really shitty slog.
- selcuka 3y agoIf it were me, babysitting GPT4 would still spend my peak code productivity credits, as it's basically coding (in natural language).
- kaba0 3y agoIt’s thinking either way. I would even wager that the trivial code that GPT writes may be easier to read for me, than some convoluted, human language description of the same thing, done with numerous corrections at every point. The relative uniformity of code is a positive for human understanding as well, e.g. a^2+b^2=c^2 is easier to parse/transmit the idea over any “spoken” version of the same thing.
- invalidusernam3 3y agoTrue. Although I did find the writing of prompts to be quite exhausting due to tedium and waiting for the output to be frustrating, so that would dig into my energy for peak coding. I would say it uses less concentration, but about the same amount or even more effort. But also it was a very narrow test, maybe for certain things (especially repetitive code or boilerplate code) it could be very beneficial.
- sundarurfriend 3y ago> I used GPT4 Do you use the ChatGPT Plus version or the API? If the API, what do you usually use to access it?
- marknutter 3y agoYou should actually time how long it takes you to write it yourself rather than guess. The results may surprise you.