zlacker

[parent] [thread] 5 comments
1. Keyfra+(OP)[view] [source] 2024-02-14 13:10:57
I kind of gave up completely on coding questions. Whether it's GPT4, Anthropic, or Gemini - there's always this big issue of laziness I'm facing. Never do I get a full code, there are always stubs or TODOs (on important stuff) and when asked to correct for that.. I just get more of it (laziness). Has anyone else faced this and is there a solution? It's almost as annoying, if not more, as was incomplete output in the early days.
replies(2): >>buggle+S3 >>Curiou+5h
2. buggle+S3[view] [source] 2024-02-14 13:41:18
>>Keyfra+(OP)
The solution, at least for GPT-4, is to ask it to first draft a software spec for whatever you want it to implement and then write the code based on the spec. There are a bunch of examples here:

https://github.com/mckaywrigley/prompts

3. Curiou+5h[view] [source] 2024-02-14 14:54:53
>>Keyfra+(OP)
If you can't get GPT4 to do coding questions you're prompting it wrong or not loading your context correctly. It struggles a bit with presentational stuff like getting correct HTML/CSS from prompts or trying to generate/update large functions/classes, but it is stellar at producing short functions, creating scaffolding (tests/stories) and boilerplate and it can do some refactors that are outside the capabilities of analytical tools, such as converting from inline styles to tailwind, for example.
replies(1): >>Keyfra+Py
◧◩
4. Keyfra+Py[view] [source] [discussion] 2024-02-14 16:07:59
>>Curiou+5h
so, mundane trivial things and/like web programming? I got it eventually to answer what I needed but it always liked to skip part of the code, inserting // TODO: important stuff in the middle, hence 'laziness' attribute. Maybe it is just lazy, who knows. I know I am since I'm prompting it for stuff.
replies(2): >>Curiou+dF >>antonv+Aqf
◧◩◪
5. Curiou+dF[view] [source] [discussion] 2024-02-14 16:43:52
>>Keyfra+Py
I wouldn't say mundane/trivial as much as well trodden. I get good code for basic shaders, various compsci algorithms, common straightforward sql queries, etc. If you're asking for it to edit 500 line functions and handle memory management in a language that isn't in the top20 of the TIOBE index you're going to have a bad time.

The todo comments can be prompted against, just tell it to always include complete runnable code as its output will executed in a sandbox without prior verification.

◧◩◪
6. antonv+Aqf[view] [source] [discussion] 2024-02-19 11:38:10
>>Keyfra+Py
Fyi, I've never encountered what you're describing, whether with GPT 3.5 or 4.

It may be that you're expecting it to do too much at once. Try giving smaller requests.

[go to top]