Remix.run Logo
lausey 9 hours ago

I have used the approach where if it is more complex, then I write the code manually myself, make sure it does what I want etc. I then ask ChatGPT to have a look at it and see where the problems are. Rather than do a complete rewrite, it points out very specific problems which I can also evaluate myself. For example, identifying memory leaks and it shows me the actual changes. Where it can be done by parallel processing and what changes for that. You can look at it with experience and say, "Yes, that makes sense" and apply it as necessary. See it as a more iterative process, rather than expect AI to correctly do all the work. For trivial examples like what Terence has given, this will be very easy to code and you wouldn't expect AI. However, you could still say to AI, "Take a look at the code I have written. Can you identify how it can be done better?", and hopefully it comes back to you saying, "No, that looks pretty good to me." for such a trivial example. :-)