Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


What language(s), out of interest?


I use node.js, but I think it will work for anything. I recommend trying small chunks first vs dumping your whole file.


I'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.


No, 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!)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: