← Back to context

Comment by vonunov

5 months ago

Yeah, I tried Copilot for the first time the other day and it seemed to be able to handle this approach fairly well -- I had to refine the details, but none of it was because of hallucinations or anything like that. I didn't give it a chance to try to handle the high-level objective, but based on past experience, it would have done something pointlessly overwrought at best.

Also, as an aside, re "not a real programmer" salt: If we suppose, as I've been led to believe, that the "true essence" of programming is the ability to granularize instructions and conceptualize data flow like this, and if LLMs remain unsuitable for coding tasks unless the user can do so, this would seem to undermine the idea that someone can only pretend to be a programmer if they use the LLMs.

Anyway, I used Copilot in VSCode to "Fix" this "code" (it advised me that I should "fix" my "code" by . . . implementing it, and then helpfully provided a complete example):

  # Take a URL from stdin (prompt)  
  # If the URL contains "www.reddit.com", replace this substring with "old.reddit.com"  
  # Curl the URL and extract all links matching /https:\/\/monkeytype\.com\/profile\/[^>]+/ from the html;  
  # put them in a defaultdict as the first values;  
  # for each first value, the key is the username that appears in the nearest previous p.tagline > a.author  
  # For each first value, use Selenium to browse to the monkeytype.com/profile url;  
  # wait until 'div[class=\'pbsTime\'] div:nth-child(3) div:nth-child(1) div:nth-child(2)' is visible AND contains numbers;  
  # assign this value as the second value in the defaultdict  
  # Print the defaultdict as a json object