5 ms·
No don't do this. Once I asked chatgpt to make some obfuscated+minified js readable for me. It did. I was blown away by how well it chose the variable names.
by mkoryak 3y ago
No don't do this.
Once I asked chatgpt to make some obfuscated+minified js readable for me. It did. I was blown away by how well it chose the variable names.
I started looking at this code to find the prod bug, but I found other bugs that I wasn't expecting...
I took a closer look and realized that the code it made was almost right, but also 5% wrong.
I wouldn't have noticed the incorrectness if I wasn't debugging for several hours before and had some general idea of what the pretty printed code did and did not do.
- drxzcl 3y agoYou can get better results by setting up a test harness that compares to the original and feeding back the results. But then you are doing boring work and letting the llm do the fun work, which is not the point the whole thing.
- pjerem 3y agoMaybe you can get achieve it by asking it to just give you the name correspondances in a table and do the renaming yourself. That’d be hardly useful in a full file with colliding names but on a single function that may be useful.