LLM as a coding assistant

Having written the pipeline wrangling Shiny script (around 80 lines of R code) the old fashioned way I was curious to see how LLMs would handle it. Having access to MS Copilot and to the free tier of Claude I have tried both of these.

To keep it fair I tried the same prompt with both, and the results were very close for both LLMs, I asked for a partial match for “Won” in a certain field and Claude coded an exact match, both LLMs showed row numbers in the datagrids which I had explicitely asked for not to be shown and in both cases irrelevant old data was shown, due to improper handling of dates.

In Claude I used two messages to fix the issues, one for the partial match and another one for the row numbers and irrelevant data. In Copilot I have given up in fruststration, I can get some things fixed but I really have to provide clear hints based on my own understanding of R. So while in Claude I moved on to improving the script with nicer presentation (something I didn’t bother with in my own attempt) I have decided not to waste too much time on Copilot for code generation.

Of course Claude isn’t perfect either, previous attempts were better than Copilot but still ran into strange issues. In this case I am trying to get some layout fixes in, it’s getting there but I am out of free messages. But that’s just improvements, I managed to get something better than what I had come up on my own in a very short amount of time. Of course it helps to have done the work before so I can write better prompts :)

In summary: when doing anything with coding, look to Claude first instead of Copilot.