Flavius Popan

The $0.30 Coach: Custom Elixir Challenges with LLM Agents

$0.30 Coach Hero Image

In this post, I share my strategy for creating custom coding challenges based on Exercism.org exercises using Cline + Claude 3.7. This system generates perfectly tailored exercises — complete with tests, hints, and backstory for any aspect of Elixir I'm learning.

It's really powerful stuff.

Background

I've been using Exercism.org for the past few months to learn Elixir. For each challenge, I run a CLI command to download the Elixir app and use VS Code to work through it. This lets me use native tooling like mix test, iex -S mix, etc. The Elixir track on Exercism has well over 100 challenges, but I found myself wanting to dig deeper on a few before moving on. The technique outlined below helps you target the exact kind of lesson you need, when you need it.

Cline

Cline is a VS Code extension that supercharges coding. Unlike Copilot, it's a full coding agent, similar to Cursor.ai, Claude Code, Windsurf, Aider, etc. It can create new files, execute shell commands, run tests, start servers — the whole shebang. It's fully open source, free, can utilize an existing Copilot subscription for double value, supports Claude 3.7, local models, and SO much more. I could go on and on; it's stellar software.

Generating New Challenges

A bit of prep work is needed. First, I copy the coding challenge instructions from Exercism and add them as a @moduledoc doc string so Cline understands the big picture. I do this after I finish & submit the original challenge so I can also copy any restrictions that come up in the review step. In this example, we weren't allowed to use certain functions like to_string, to_charlist, or the String module. Capture as much context as you can before moving on.

Exercism Instructions

Copy from that 👆 to this 👇

@moduledoc instructions in app file

Then use something akin to this prompt to have Cline build a new challenge:

"Create another example challenge similar to @ [/lib/__.ex] that covers [CHALLENGE_TOPIC] for me to practice and learn the concepts. Be sure to include working tests, a SEPARATE solution file, and a HINTS.md file. Get creative and make it fun!"

In under a minute, for just $0.31, I get everything I asked for.

New project generated by Cline

A New Frontier

I've been using this technique to dive deeper into areas I'm struggling with, like recursion, to great effect. I use Copilot for tutoring by asking it to only guide my thinking without generating code, while Cline handles building all the shiny new stuff. They're highly synergistic tools with astonishing potential.

I hope this inspires you to push your tools for greater growth - I certainly will.

#ai #elixir