by losvedir · 3y ago · 0 comments
Naming is hard. I think it'd be pretty neat to write the code with a placeholder for the tricky names and then let an AI suggest them once it's done.
Suggest better variable and method names in the following Java code. Don't list the new code, only the changes, in the format "oldName" => "newName". You can also suggest multiple alternatives in the format "oldName" => "newName1" or "newName2"
In my experience, 90% of the proposed changes are bad, but occasionally it does have good ideas.
Of course, you shouldn't upload your company's code to OpenAI, but you can try it out on open source or experimental projects.