Just figured out a trick for getting AI to write better code comments
I was stuck trying to understand some old code I wrote that had zero comments. So I used an AI tool to generate them, but it kept spitting out vague, useless notes. After a bit of trial and error, I found that breaking the code into small sections and asking for plain English explanations for each part made the AI give much clearer results. Now my code is way easier to follow, and it saved me hours of headache.