top | item 44116451

(no title)

vladde | 9 months ago

> It's still the wrong answer, because the question should have been, "How can I make this code thread-safe?" and whose answer is "Use System.Collections.Concurrent" and 1 line of code.

I often found myself adding "use built-in features if they exists", just because because of this type of scenario.

It unsettles me that some people feel okay always accepting AI code, even when it "works".

discuss

order

SirHumphrey|9 months ago

One of the easiest ways (for me) to spot AI code on a homework assignment has been to ask myself a simple question. Is this code something that would make sense for a human to write. It doesn't catch all cases - it doesn't catch even the majority of cases - but it does filter out people who just took the assignment and pasted it in to a prompt.

Mirroring the example provided in the article I once saw a 200 line class implementation for tridiagonal matrices in python - where a simple numpy command would suffice and perform an order of magnitude better.