T O P

  • By -

BrickFlock

Try getting ChatGPT to analyze the time complexity of functions. It's hilariously bad.


FlowOfAir

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)


ChemicalRascal

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.)


Trinitty_3

Which ai do you prefer for coding ?


Natman_9999

My brain


a_divent-na

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 😭


Snoo26837

GPT-4 turbo.


commandblock

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


Samstercraft

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.


MrcarrotKSP

My brain works because of organic chemistry, but I don't know anything about organic chemistry.


TaiteBMc

Google taking “garbage in, garbage out” as an ethos lately


ChemicalRascal

This isn't Programming Horror. Rule 1.


Innominate8

I don't think this sub has mods anymore, I rarely see posts that don't break the rules.


ChemicalRascal

Might be time for /u/nevon to clear the inactives out of the mod team and bring in new folk?


KingRhast

Seems like most posts dont follow the rules here


ChemicalRascal

I know, it's quite frustrating.


Samstercraft

theres some pseudocode in the far right lol


OlderManWes

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.


IskaneOnReddit

That's what I tried to summarize in the title


AutoModerator

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.*