Today's third slide.
Prompt: Write, in C++, a solution to the following problem: in the first 1,000,000 prime numbers, how many are divisible by 13?
Copilot: Sure!!!!!! Yay! I can has output a program!!!
...
ok so first: My dear students, if someone asked you to do this task, WHAT WOULD YOU SAY?
Right. "You're a fucking moron, they're prime."
Ok maybe not quite that language at work.
Second: LOOK AT THAT ISPRIME FUNCTION. Wtf.
(1) use a sieve, for the love of puppies
(2) Use a LIBRARY. primesieve is great. It's fast. It's efficient. It's already written and is correct and someone's already tested the snot out of it.
And storing all of those primes in a vector before testing them? Is this Microsoft's new approach to propping up the DRAM market?
I mean don't write that program in the first place because it's stupid and you could simply write return(1) if you were, for some reason, forced to write it, but if you're going to solve a _similar_ problem, don't add more freshman-level code to the universe.