4 ms·
I can see this being helpful to people who are unfamiliar with a language's syntax/language learners. For someone who already understands the syntax of a langu
by okennedy 5y ago
I can see this being helpful to people who are unfamiliar with a language's syntax/language learners.
For someone who already understands the syntax of a language (or at least the syntax of a related language), there's little to be gained from seeing what the code is doing. Take part of the Python example from the linked page: "The code defines a function called isPerfectSquare. This function takes an input of x, and calculates the square root of x. The function then returns whether or not x * x is equal to x.". This guides me through the code, line-by-line.
A more valuable description is "The function returns true if the input is the square of an integer". In other words, the more useful question is why the code exists. Good comments, explanations of code, function/variable names etc... focus on the overall objective of the code. For example:
- What is the abstraction that the code is trying to capture?
- What makes the problem that the algorithm is solving difficult/non-obvious?
- What are the pre-conditions that a given segment of code assumes?
- What post-conditions does the segment of code ensure?
- allynjalford 5y agoYes, Exactly what you describe we are working on bring about a release for. The examples on the homepage are the from the first tools we are releasing. There are more tools to come related to: - What the code is doing - What the input/output of code is - What this line does And More, as we develop more and more tools based on user feedback. I would love to have you as part of the early access group and gain more insightful feedback like this that will ensure these tools are useful to you and the developer community. Cheers.
- skulk 5y agoBecause of Rice's theorem, I don't think there will ever be a tool that can do this even nearly as well as a human before AGI is realized. https://en.wikipedia.org/wiki/Rice%27s_theorem https://en.wikipedia.org/wiki/Rice%27s_theorem
- allynjalford 5y agoThe overall goal is to assist as much as possible. It's steps forward for us all.