3 ms·
I was disappointed to see this is just a cheap joke. I'd actually be interested to see how well one of the new LLMs does, if you give it a description and some
by losvedir 4y ago
I was disappointed to see this is just a cheap joke. I'd actually be interested to see how well one of the new LLMs does, if you give it a description and some of the code and ask it to name the class for you.
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.
- karmakaze 4y agoThe reason naming is hard is because the author didn't know what they were making as they were making it. For the AI to name it well it would first have to rewrite it and separate distinct salient concerns which spans both the implementation and real-world domain spaces.
- gs17 4y agoI could see it operating on a natural language description of what you're going to write. I just tested this with ChatGPT and it was able to give me a set of design pattern-based classes that would probably fit in enterprisey Java codebases.
- lbalazscs 4y agoHere's a tested ChatGPT prompt: 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.