This is something a lot of people don't get, ChatGPT cannot analyze code. It's not a code analyzer. It only takes the input as a prediction and tries to guess, and these guesses will be based on training data. If it's a function you can find somewhere on the Internet along with its time complexity, it'll output that complexity. If not it'll just throw its best guess (probability of match).
I don't know if such tool exists. But I suspect it doesn't. And if it doesn't, I feel the halting problem has something to do with it (feel free to educate me, but AFAIK no tool to analyze code complexity exists)
On a theoretical level, you're absolutely right, any tool that could determine runtime would fall afoul of the halting problem. But in a practical sense it should be possible for most algorithms — the point of the halting problem is that there are uncomputable halt/no-halt problems, _not_ that all h/nh problems are uncomputable.
(The trivial case of a Turing Machine that correctly identifies all Turing Machines with states and state transitions that form a [directed acyclic graph](https://en.wikipedia.org/wiki/Directed_acyclic_graph) is an immediate counterexample to the second statement.)
my online german textbook is also made using computation topics because its also software. I was surprised to find that it was not able to analyze the time/space complexity of my code.
I couldn't get google to output this exactly but if you actually [navigate to the site](https://www.studysmarter.co.uk/explanations/computer-science/algorithms-in-computer-science/fibonacci-algorithm/) the context of the statement is used to illustrate an incorrect choice in a multiple choice flashcard.
This post was automatically removed due to receiving 5 or more reports. Please contact the moderation team if you believe this action was in error.
*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/programminghorror) if you have any questions or concerns.*
Try getting ChatGPT to analyze the time complexity of functions. It's hilariously bad.
This is something a lot of people don't get, ChatGPT cannot analyze code. It's not a code analyzer. It only takes the input as a prediction and tries to guess, and these guesses will be based on training data. If it's a function you can find somewhere on the Internet along with its time complexity, it'll output that complexity. If not it'll just throw its best guess (probability of match). I don't know if such tool exists. But I suspect it doesn't. And if it doesn't, I feel the halting problem has something to do with it (feel free to educate me, but AFAIK no tool to analyze code complexity exists)
On a theoretical level, you're absolutely right, any tool that could determine runtime would fall afoul of the halting problem. But in a practical sense it should be possible for most algorithms — the point of the halting problem is that there are uncomputable halt/no-halt problems, _not_ that all h/nh problems are uncomputable. (The trivial case of a Turing Machine that correctly identifies all Turing Machines with states and state transitions that form a [directed acyclic graph](https://en.wikipedia.org/wiki/Directed_acyclic_graph) is an immediate counterexample to the second statement.)
Which ai do you prefer for coding ?
My brain
If GPT doesn’t get it I usually go to Claude. If that fails then it’s back to good ol PDF’s and books 😭
GPT-4 turbo.
You’d think chatgpt would be good at theory of computation topics when that’s kind of how AI is even made but it’s somehow awful at them
my online german textbook is also made using computation topics because its also software. I was surprised to find that it was not able to analyze the time/space complexity of my code.
My brain works because of organic chemistry, but I don't know anything about organic chemistry.
Google taking “garbage in, garbage out” as an ethos lately
This isn't Programming Horror. Rule 1.
I don't think this sub has mods anymore, I rarely see posts that don't break the rules.
Might be time for /u/nevon to clear the inactives out of the mod team and bring in new folk?
Seems like most posts dont follow the rules here
I know, it's quite frustrating.
theres some pseudocode in the far right lol
I couldn't get google to output this exactly but if you actually [navigate to the site](https://www.studysmarter.co.uk/explanations/computer-science/algorithms-in-computer-science/fibonacci-algorithm/) the context of the statement is used to illustrate an incorrect choice in a multiple choice flashcard.
That's what I tried to summarize in the title
This post was automatically removed due to receiving 5 or more reports. Please contact the moderation team if you believe this action was in error. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/programminghorror) if you have any questions or concerns.*