Agentic AI & GenAIAgentic AI & GenAI
Conference50min
INTERMEDIATE

My Fixes Became the Lesson: Teaching AI Better Coding Habits

The text argues that coding agents often produce “almost right” code that hides subtle mistakes. It proposes a repeatable method to improve them: capture failures, define the correct pattern as a skill, test it, and use examples to turn recurring near-misses into reliable, correct code.

talk.summaryAiDisclaimer

François Martin
François MartinKarakun AG
talks.description
The worst code is not the code that is clearly wrong. It is the code that is almost right.

Coding agents are painfully good at almost right.

They can write code that compiles, looks modern, and seems fine at first glance. Then you look closer: one line uses an anti-pattern. You ask the agent to clean it up, and it replaces that anti-pattern with another one. So you try again, more carefully, with the kind of prompt that should leave no room for misunderstanding.

It avoids the pattern you called out and finds a third way to be almost right.

I know. I did not believe it either.

At that point, I was so frustrated that all I could think was, "I need to make sure I never have to go through this again."

I needed the agent to get better. More skilled, really.
Wait.
Skill.
That is what I needed.

So I made the failure repeatable, wrote down the lesson behind the fix, and tested whether the agent stopped falling for it.

I will walk through that path with real generated code: the bad output, the better version, the skill, and the tests that proved it worked. The examples use Java streams and optionals, but the method works for any language, library, or coding habit your coding agent keeps getting wrong.

You will leave knowing how to turn frustration into a skill: capture the almost-right output, write the version you wanted in the first place, turn the difference into a rule, test the same task with and without the skill, and prove you can turn almost-right into right - and keep it that way.
agents
skills
coding
testing
talks.speakers
François Martin

François Martin

Karakun AG

Switzerland

François Martin is a senior full-stack software engineer at Karakun AG in Switzerland, passionate about building high-quality applications. He co-authored the open-source JavaFX frameworks WorkbenchFX and PreferencesFX, and organizes Basel's Hackergarten to help developers get involved with open-source projects.

François is an Oracle ACE Associate and co-authored the ISTQB Test Analyst v4.0 syllabus. He is also part of the content committees for the BaselOne and DevBcn conferences.

François has given 80 talks, workshops, and mentoring sessions across 17 countries. He has spoken at major international conferences, including WeAreDevelopers World Congress, JavaZone, NDC Oslo, Jfokus, KCDC, Devnexus, and Devoxx Greece. He regularly shares practical insights to inspire developers and help teams build better software.