43 karma · joined October 4, 2024
I did :) I made a browser-based MMO with Phoenix to test out liveview and learn the language: https://shopkeep.gg
And it was pretty annoying. Elixir doesn't really lend itself to vibe coding due to namespacing and aliasing of modules, pattern matching, all without static typing (I know, Dialyzer...). It also struggles to understand the difference between LiveComponents and LiveViews, where to send/handle messages between layers.
Without references to filenames, the agent perpetually decides "this doesn't exist, so I'll write it :)". I found it to be pretty challenging before figuring out I could force the agent to run `mix xref callers <Some.Module>` when trying to do cross-module refs.
(caveat: this was all with claude 3.5 sonnet)
Additionally, Elixir does not really lend itself to automated coding since the message/event based flows don't make dependencies obvious, and typing is soft and not-enforced statically. Adding rules like "always call mix xref callers <module_name>" or "run compile command" after each change has been helpful, but I still end up with bugs where changes in one part of the app cause runtime errors that are not only tricky to diagnose, but require multiple iterations of logging and manual debugging - which becomes costly when each Cursor agent costs me 4 cents. Perhaps this is standard for Elixir, or maybe I need to be architecting my code patterns in a smarter way.
The most frustrating part is how much of a yes-man the agent is, it would be really nice to be able to have the agent steer me away from decisions where the code is being written against best practices. I agree with the author's sentiment - The "learning moments" I run into seem to be whenever Cursor screws something up and I have to investigate myself, rather than a sort of learning-with-guidance while doing it right.
Call me a luddite but there should be more oversight on this tech