4 ms·
An interesting use-case of this capability is refactoring, which, for me, ChatGPT has been unmistakably good at. It's amazing how I can throw garbage code I wro
by shubhamjain 2y ago
An interesting use-case of this capability is refactoring, which, for me, ChatGPT has been unmistakably good at. It's amazing how I can throw garbage code I wrote at ChatGPT, ask it to refactor, and get clean code that I can use without worrying if it's going to work or not, because in 99% of cases it works without breaking anything.
- Sharlin 2y agoWhat language(s), out of interest?
- shubhamjain 2y agoI use node.js, but I think it will work for anything. I recommend trying small chunks first vs dumping your whole file.
- spacebanana7 2y agoI've had pretty good results dumping entire files in to Sonnet3.5. For example, "Here's my app.js file, please add an endpoint for one user to block another. Feel free to suggest schema changes. Please show me the full app.js with these changes implemented" The model seems to be great at figuring out frameworks and databases just by seeing the contents of a full app.js file. I do find this type of prompt works much better with Sonnet3.5 than GPT4o.
- Sharlin 2y agoNo, most other languages absolutely don’t work as well as JS, simply because there’s been less training material available. It’s useless with Rust, for example (hell, I’d be totally impressed if it has any idea how to appease the borrow checker!)