4 ms·
I am not a programmer and i don't use Linux. I've been working on a python script for a raspberry pi for a few months. Chatgpt has been really helpful in showin
by jccalhoun 2y ago
I am not a programmer and i don't use Linux. I've been working on a python script for a raspberry pi for a few months. Chatgpt has been really helpful in showing me how to do things or debug errors.
Now I am at the point that I am cleaning up the code and making it pretty. My script is less than 300 lines and Chatgpt regularly just leaves out whole chunks of the script when it suggests improvements. The first couple times this led to tons of head scratching over why some small change to make one thing more resilient would make something totally unrelated break.
Now I've learned to take Chatgpt's changes and diff it with the working version before I try to run it.
- Tostino 2y agoVersion control inside an IDE helps with noticing these types of changes, even if you aren't a programmer
- sidpatil 2y agoYou can try asking ChatGPT to rewrite the original script to include the improvements.
- genewitch 2y agoChatgpt can output a straight diff, too, that you can use with patch. That's how aider commands the models to reply, for example.
- IanCal 2y agoThat's not quite right. The models are pretty bad at generating a proper diff, so there are two common formats used. The main one is a search and replace, and the search is then done in quite a fuzzy manner.
- IanCal 2y agoTo be clear the diff they generate is something you or I could apply manually and wouldn't notice an issue. It's things like very minor whitespace issues, or more commonly the count saying how large the sections are - nothing that affects the meat of the diff, they're fine with the hard part but then there's small counting errors.
- genewitch 2y agothanks, i didn't know how to respond to this as i never diff or use patch, but i know what they look like (@22,8 -/+ sort or whatever), and aider was outputting the green and red lines inverse video the same way github looks. It's a reasonable facsimile of "diff output", but i shouldn't have asserted it was diff output.
- apwell23 2y agoyea its great at toy projects
- consumer451 2y agoIn my experience, a tool like Windsurf or Cursor (w/ Sonnet) is great at building a real project, as long the guardrails are clearly defined. For example, starting a SaaS project from something like Refine.dev + Ant Design, instead of just a blank slate. Of course, none of what I build is even close to novel code, which helps.
- pks016 2y agoSame. I used Claude to write script for my lab experiment. I had to review and edit some stuff but it worked mostly.