| official stuff | https://wanshenl.me/official/ |
| life goal | capybara |
| https://twitter.com/lmwnshn |
| official stuff | https://wanshenl.me/official/ |
| life goal | capybara |
| https://twitter.com/lmwnshn |
@dave_andersen TIL about copilot including Claude. Thanks!
And fully agreed. I think I'm seeing an interesting split in student opinion on AI code assistance for 15-799's first project right now (there is extremely little public code on GitHub that demonstrates how to use Apache Calcite) - in office hours, I feel like half the students told me that it's really helpful for API discovery, and the other half told me that it just keeps generating garbage. Maybe we should run a poll once the project is over. :)
@dave_andersen FWIW, Claude-3.5-Sonnet immediately recognizes that there's a trick: "I'll help write a solution to this problem. Note that this is actually a trick question - no prime number (except 13 itself) can be divisible by 13, as any number divisible by 13 would be composite by definition! However, I'll write a program that demonstrates this and verifies our reasoning".
No sieve, but their isPrime function only checks up to sqrt(n), skips even numbers with += 2, uses standard (n % i) == 0 testing. It ends with "A more efficient solution wouldn't need to compute anything - we could just return 1 as the answer since we know mathematically that 13 is the only prime that can be divisible by 13. However, I provided the computational solution to demonstrate the verification of this mathematical property".
Additionally, following up with "can you use a library?" generates code that uses primesieve.
In general, I find that Claude-3.5-Sonnet (which is the default AI model for the Cursor IDE) outperforms Copilot significantly and is a better representation of current AI coding assistance capabilities. I've tried and given up on a lot of the predecessors over the years (e.g., ChatGPT web interface, VSCode + Copilot), they weren't worth using at the time and I became very skeptical of AI-generated code. But Cursor+Claude changed my mind, I actually pay for that now (fixed cost of $20/month).