3 ms·
TLDR but you actually end up reading even more than the original. I could be wrong and this might actually work and condense a big function but if that is true,
by wudangmonk 4y ago
TLDR but you actually end up reading even more than the original. I could be wrong and this might actually work and condense a big function but if that is true, why showcase such an example.
- vxNsr 4y agoIt’s helpful if you can read English but the code is difficult to understand. Most explanations of code are more verbose than the code they’re explaining because code is usually pretty terse compared to natural language. You can think of “too long” referring to the time it might take someone to reason out a particularly terse, dense line of code verse the actual length of the code.
- nso95 4y agoYes, but there's quite good chance the translation is wrong so you'll probably need to read the code anyway
- naniwaduni 4y agoSomething like this could be helpful if the stumbling block is the syntax. If the output consistently looks like the example, though, it's not going to be very much help explaining the longer tail of straightforward code that simply implements hard-to-understand logic, though. I can see something this functionality being useful to explain dense, ungooglable code, like regex, or maybe APL. That said, I couldn't really trust current-generation ML to actually produce a correct explanation instead of being confidently and wildly wrong.
- Zvez 4y agoin this particular example at least for me it is easier to read the original code. Even though I don't even know the language they use. And I'm pretty sure this is the case for the most developers with non-zero experience.