Oddbean new post about | logout
 Last night I attempted, but was unsuccessful at getting chatgpt to help me with a coding challenge.

I feel like I was getting some useful bits, but inadequate info to bring it all together.

Is brute force trial and error the best way here? 
 Share more of your code with it. I've found it needs more of the full scope of the code to adequately help you. 

Also, it will try to answer a question even if it's illogical. For example, I asked it to help me do something that my server already did automatically, but I didn't know that. So instead of saying "your server does that automatically" it tried to answer the question with code and resulted in all kinds of bugs. 

It can't really think outside of the scope of your question right now. Still limited, but still useful. 
 I treat it the exact opposite. I do all of the design and planning and have it crank out code, syntax, and comments smaller pieces at a time.

My typical prompts look like this.

-Write me a function that takes these input params and has these returns. Remember to use functions x, y, and z that we wrote earlier in your solution.

-update this function to change it in this way.

I find asking it bigger picture questions or for bigger changes at once leads to more useless responses.

Also, try claude 3.5. I like the claude 3.5 code context in kagi far more than gpt 4o for code.

Forces me to not spaghetti everything this way and if you add it to your context it will comment as it goes. Both are nice bonuses. 
 Good tips, thanks! 
 Someone told me Claude is better for coding 
 Claude is supposed to be much better for coders.  🤷🏻‍♂️ 
 Replit
Open Agents 

Your welcome. 
 This looks amazing.  Does it work well for you? 
 Both are fairly new, replit is a beast. Small errors, but the best I've used so far. 
 Great!  I will check it out.