nbw

nbw

How are you using AI with Elixir at work on production-ready apps?

This is an open discussion to anyone using AI to help them work with Elixir in production-ready apps.

I work on an Elixir app at work that’s mostly backend with no customer facing UI parts, but I haven’t found good ways to use AI in my workflow beyond the obvious things. I’ve talked with my coworkers there seems to a pattern of not trusting generated code that’s larger than a single function, generated tests are inconsistent unless they’re unit tests, etc.. Ultimately your ass is on the line when you ship it so you want to trust what you’ve written.

On a positive note, asking AI to explain something works nicely :+1:. But beyond talking to an LLM and having it clarify or refine things, I’m left wondering if I’m misunderstanding the hype.

There are lots of tools out there (Cursor IDE, Cursor PR review bot, Copilot, Claude, <%= insert your favorite LLM here %>), and apparently LLM’s work quite well with Elixir. The auto-complete from these tools can be really nice (but to me, it’s just nice).

We even have Elixir specific tools like:

Some of these are great if you’re starting a new project, if you want to prove an idea at the surface level, if you’re following Phoenix best practices to make a LiveView CRUD app, etc.. But if you’re working on an existing complicated code base, what tools/workflows are you finding make you more productive?

I’m genuinely looking interested in using AI in a net-positive way (for me and for the company I work for) and would love to hear what works for you beyond creating a new phoenix app.

#ai

Most Liked

martosaur

martosaur

I’m using chat panel in Zed for asking arbitrary questions but that’s about this. I tried agent mode couple of times and it’s not for me. Writing is thinking, and when I don’t write code by hand I find myself out of the feedback loop. Tests IMO is a great example of this. If testing your code is hard, you know something is not right with how you do things. But if you outsource tests to AI, you won’t feel this.

14
Post #2
odd

odd

I immediately thought of this tweet after reading this thread.

Anyway, we’ve been using Claude Code to swap deprecated dependencies, add documentation, write missing tests and even implement small features. It does a pretty good job, especially after adding project specific guidelines to CLAUDE.md.

I asked Claude itself to create the guidelines with a focus on code conventions and patterns, which it did surprisingly well. Then I went through the file, adding, removing and fixing things here and there. For example there’s a section dedicated to testing, explaining how we use our test factory, how we use PhoenixTest for UI tests and so forth. The tests it generates follow our conventions and besides some minor issues like naming, I rarely have to fix anything. The documentation it generates is usually way too verbose and focuses on minute details. Usually it either gets it right the first time, or I have to spend more time talking to it than it would take to do the thing myself. Interesting times, to say the least.

GitHub - ash-project/usage_rules: A tool for synchronizing LLM rules files with your dependencies. is definitely worth a read.

eddy147

eddy147

Elixir dev, but 95% only backend, hardly any Phoenix code.
I am using AI mostly with the CLI: gemini or OpenAI’s codex. I use it mostly for analyzing bugs, and acutally never to generate any code. I did that once, and it became a enormous mess and I did not understand the generated code because it was not my own.
If I would generate any code, it would be very small fragments so I can keep control of the big picture.
I mix my editing by using vscode – (actually codium, because the copilot setup message, even though i did not have it installed and not want to, started to bother me) and lazyvim. Both options work good for me, having the windsurf plugin installed, and using that for code completion, not using the chat functionality (in neovim not installed).

billylanchantin

billylanchantin

@ragamuf Off topic but that is legitimately one of my favorite quotes ever:

Writing is thinking. To write well is to think clearly. That’s why it’s so hard.

– David McCullough

ragamuf

ragamuf

“Writing is thinking”. Love it.

Where Next?

Popular in AI / LLMs Top

nbw
This is an open discussion to anyone using AI to help them work with Elixir in production-ready apps. I work on an Elixir app at work th...
#ai
New
AstonJ
Watched this earlier and thought it was worth sharing. For those not aware Geoffrey Hinton is considered one of the godfathers of AI, yet...
New
Exadra37
:tada: My last project is now live: AI Intent Driven Development (IDD) guidelines and instructions for AI Coding Agents, AI Coding Assist...
New
AstonJ
What kind of impact do you think AI will have on programming/tech jobs? Have you or anyone you know been impacted directly? Does it conce...
New
asianfilm
For those who haven’t seen it, here is a research paper from August that found that LLMs perform twice as well with Elixir than with Pyth...
New
New

Other popular topics Top

lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement