I gave GPT-4 a bunch of code that had two regex functions to parse a given custom url. I also gave it in the same prompt an example of a url of what I wanted it to parse, and asked it to explain the code and tell me the answer.
It explained the code perfectly in moments and also gave me the correct answer.
Here was it's response -> https://pastebin.com/raw/CP9iZh7S
I would use this as an interview question, asking a junior dev to "reason" through the code, explain their thinking and without running it, tell me what they might think the answer would be. If I had to give them feedback for that answer, I would have commended their ability to "reason" about the problem. ¯\_(ツ)_/¯
(extra: The GPT-4 response knew to not bother with the second regex because it should only run the second if the first regex had a third part match, amazing...)
(side note: I can't wait until I can generate live documentation of every file in my code base)