The Slot Machine Effect: How AI Coding Creates Addictive Development Patterns
The "intermittent reward" of when the AI works is its own slot machine.
In the last two years of building with AI tools, I've noticed a pattern in my behavior that's eerily familiar: the frustration-reward cycle of AI coding closely mirrors the addictive mechanisms that keep us scrolling through social media. This realization came to me recently when I found myself getting increasingly agitated with Gemini as it failed to reconfigure the URL system for LaunchSequence's invite and team management features. I could have jumped in and coded it myself, but instead, I persisted, growing more frustrated with each attempt.
And then it worked. And I had this amazing feeling.
The Intermittent Reward System in AI Development
Nir Eyal, author of Hooked: How to Build Habit-Forming Products, describes this phenomenon: "At the heart of the Hooked Model is a powerful cognitive quirk described by B.F. Skinner in the 1950s, called a variable schedule of rewards, also referred to as 'intermittent reinforcement.” Skinner observed that lab mice responded most voraciously to random rewards. The mice would press a lever, and sometimes they’d get a small treat, other times a large treat, and other times nothing at all. Unlike the mice that received the same treat every time, the mice that received variable rewards seemed to press the lever compulsively" ~ LinkedIn
In my AI coding workflow, I've identified a pattern:
Approximately 50% of the time, AI knocks it out of the park, delivering elegant solutions faster than I could code them myself
About 25% of the time, I need minor revisions or a few iterations to get to the right solution
The remaining 25% of the time, the AI is completely off-base, has lost context, or produces unusable code
This distribution creates the perfect intermittent reward system. The unpredictable nature of success keeps me engaged far longer than I should be, chasing that dopamine hit of a “surprise” perfect solution.
From Flow State to Frustration Factory
Traditional coding often induces what psychologists call a "flow state" - that feeling of being completely immersed in a task, losing track of time as you solve problems methodically. There's a rhythm to it: putting on music, diving into the codebase, and gradually piecing together solutions.
AI-assisted coding enhances this pattern. We experience rapid cycles of instruction, anticipation, and either satisfaction or disappointment. Dr. Andrew Huberman, a neuroscientist at Stanford, notes that, regarding positive outcomes, "if it happens, great. We get the reward. The reward comes in various chemical forms, including dopamine, and we are more likely to engage in that behavior again. This is the basis of casino gambling. This is how they keep you going back again and again and again even though on average the house really does win."
This explains why I found myself wanting to "take my laptop and throw it through the wall" during certain AI coding sessions. Or feeling like I was on top of the world! The emotional investment in each prompt is higher because the potential reward (an instant solution) is tantalizingly close.
Developing New Disciplines for the AI Era
The AI-assisted development experience is addictively fun - like having a team of developers at my fingertips, ready to build and iterate in real time,. But this addictive quality requires guardrails.
Here’s the disciplines I'm implementing to counteract the slot machine effect:
1. The "Two-Strike Rule"
If the AI fails to deliver a workable solution after two attempts, I immediately try something else. This prevents the frustration spiral and keeps me productive. I'm putting a sticky on my machine to remind me that if the AI fails more than twice, I’ll move on.
2. Context Integration Over Isolated Prompts
In building real products with AI, I've learned that "context and integration matter far more than individual features." When AI has access to my entire codebase and development history, its answers become dramatically more relevant.
I've found that the same AI tool can produce radically different results depending on how much context it has and how seamlessly it fits into your workflow. Taking the time to properly set up this context pays dividends in reduced frustration. SO I use Cursor (for the time being) and Gemini 2.5 Pro (for the time being) with Claude Code (you guessed it, for the time being).
The Neurological Price of AI Development
Neuroscience research shows that the dopamine rush from intermittent rewards can gradually erode our patience for methodical work. Dr. Lembke discusses how our brains adapt to constant pleasure stimuli by downregulating dopamine receptors. "With prolonged and repeated exposure to pleasurable stimuli, our capacity to tolerate pain decreases, and our threshold for experiencing pleasure increases"
This presents a real danger for developers. If we become too dependent on the quick hits of AI-generated solutions, we may find ourselves less able to tackle complex problems that require sustained, methodical thinking.
Finding Balance: The Middle Path
Despite these challenges, I remain optimistic about AI-assisted development. The key is establishing a healthy relationship with these tools – one that leverages their strengths while mitigating their addictive qualities.
The question isn't just 'How do we build faster?' but 'How do we adapt our development process to this new capability?' This adaptation requires conscious effort and new disciplines.
Instead of viewing AI as a magic solution generator, I've learned to see it as an expert collaborator. As I’ve noted, I now ask, 'How can AI help me build this better?' not “How can AI build this for me?” The difference might seem subtle, but it's transformative in practice.
Moving Forward: Mindful AI Development
The parallels between social media addiction and AI coding offer valuable insights for developers navigating this new landscape. By recognizing the slot machine effect in our AI interactions, we can develop healthier, more productive relationships with these powerful tools.
For me, this means being more intentional about when and how I engage with AI coding assistants. It means respecting my own expertise and not outsourcing my developer identity to an algorithm. Most importantly, it means maintaining the disciplines that help me build great products efficiently without getting caught in the frustration-reward loop.
As we collectively learn to work with AI, perhaps the most valuable skill will be knowing when to step away from the slot machine and trust our own abilities. After all, the best developers aren't those who can prompt AI perfectly – they're those who know how to blend human creativity with AI assistance to build things that truly matter.
Share your experiences with building AI-powered solutions at dave@davemerwin.com or connect onLinkedIn. I'm particularly interested in hearing about your effective prompting strategies and how you maintain a healthy balance with AI tools.





I feel this post. 😅
Sticky note sounds like a great way to break the cycle, and stay productive. Thanks for the tip.