← Back to list

Coding with AI

There’s a version of learning to code with AI that teaches you nothing. You hit a problem, you ask the AI to write the code, you paste it…

Jean Julmis · 2026-06-07 04:58 · 0 claps · 5.9 min read
#ai #openai-codex #anthropic-claude-code #learn-python-programming
Open on Medium ↗
Wiki topics: LLM · Large Language Models AI · AI · General EDU · Education & Learning 💻 · Programming

Coding with AI

There’s a version of learning to code with AI that teaches you nothing. You hit a problem, you ask the AI to write the code, you paste it in, it works, and you move on. The program runs. You learned nothing. A week later you couldn’t write that same code without asking again.

I know this because it’s the easiest trap to fall into, and the tools are built to make it feel good. They want to hand you the answer. Ask most AI assistants “how do I write a function that does X,” and they’ll cheerfully write the whole thing for you, explain it after the fact, and leave you feeling productive. But feeling productive and getting better are not the same thing — and when you’re learning, the gap between them is where your progress quietly dies.

So, I did something different. And it changed how much I retain.

Before I write a line of code with an AI assistant, I give it a set of rules. Here’s the exact prompt I use:

I’m learning Python. Do not write code for me unless I explicitly ask. When I share code, respond with questions, hints, or explanations of concepts — not corrected code. If I’m stuck, give me the smallest possible nudge, not the answer. If I ask for the answer directly, ask me once whether I want a hint instead. This also goes for any other programming languages I am learning.

That’s it. But that paragraph flips the entire relationship. Instead of a machine that does my work, I get a tutor that refuses to do my work — one that asks me what I think is happening, points at the line where my logic breaks down, and makes me find the fix myself.

The difference in how it feels is huge. When the AI writes the code, I get the dopamine and none of the learning. When the AI asks me, “what do you think this loop is actually doing on the second pass?” — I’m annoyed for about ten seconds, and then I figure it out, and that’s the part that sticks. The struggle is the learning. The prompt protects the struggle.

I’ve been using two tools: Claude Code and Codex. Both can work this way once you set the rules. But I’ve come to prefer Claude, and the reason is mostly about where it lives.

Claude Code runs in my terminal. I like that. Coding already happens in the terminal and the editor, so having the assistant right there — in the same environment where the real work is — keeps me in one headspace instead of bouncing between a chat window and my code. The prompt feels natural there. It’s less like talking to a chatbot and more like having something looking over my shoulder while I work.

The terminal has become its own kind of comfort zone for me. I push my projects to my GitHub repository with Git Bash these days, after starting out doing it in PowerShell — which I still enjoy and reach for when I’m working with Claude or just poking through my projects folder and files. Plain old Command Prompt handles my regular computer tasks. Living in those windows day to day made dropping an AI assistant into the same space feel less like a gimmick and more like part of the workflow.

But the moment that really sold me on the nudge-not-answer approach happened while I was experimenting with functions. I was setting a default value for a person’s age, and I’d written an if statement to handle the case where no age got passed into the function. Then I called the function with an age of 0 - and got behavior I didn't expect.

So I showed Claude my code. Instead of fixing it, it walked me through why my code would bite me later. The check I’d written treated an age of 0 as if no age had been provided at all - because in Python, 0 is " falsy": in a condition, it counts as false, the same as an empty string or None. So my guard quietly swallowed a perfectly valid age. That's a real bug waiting to happen for anyone whose value is legitimately zero. Here's what I'd written:

python

def person_info(first_name, last_name, person_age=None): person = {'first': first_name.title(), 'last': last_name.title()} if person_age: # the trap: person_age=0 is falsy, so it's skipped person['age'] = person_age return person person_info('john', 'doe', 0) # -> no 'age' key at all

It didn’t hand me the fix. It asked me questions and let me experiment. I tried calling it with 0. I tried changing the condition to if person_age > 0, then if person_age >= 0:

python

if person_age >= 0: # closer - 0 gets through now, and negatives are blocked person['age'] = person_age # but calling with no age at all (None) would crash

And finally I landed on checking against None directly:

python

def person_info(first_name, last_name, person_age=None): person = {'first': first_name.title(), 'last': last_name.title()} if person_age is not None: # the fix: only a real "no value" is skipped person['age'] = person_age return person unknown_person = person_info('john', 'doe', 35) male_physicist = person_info('albert', 'einstein', 0) # age 0 is kept, exactly right female_physicist = person_info('marie', 'curie') # no age given, so it's skipped print(unkown_person) print(male_physicist) print(female_physicist)

Which prints:

is not None was the actual answer, because it tests whether a value was provided at all rather than whether it happens to be falsy - so it keeps 0 while still skipping a genuinely missing age. I got there by testing each version myself and answering the questions Claude asked me along the way. I'll remember that distinction for the rest of my life, precisely because nobody just told me. I had to chase it down.

That’s a personal preference, not a verdict — Claude does the tutoring approach well too, and someone who lives in a chat window instead of a terminal might land the other way. The point isn’t which tool. The point is that either tool will either teach you or do your homework for you, and you’re the one who decides which by how you set it up.

I’m working through Python right now — functions, soon object-oriented programming. When I get stuck, the temptation is always to just ask for the answer. The prompt won’t let me, at least not without a speed bump: it asks me first whether I’d rather have a hint. Most of the time, the hint is enough. I didn’t need the answer. I needed one nudge in the right direction and the room to do the rest myself.

And on the days I genuinely do need the full answer — when I’m completely stuck and a hint isn’t cutting it — I can still ask for it explicitly. The rules don’t lock me out. They just make “give me the answer” a deliberate choice instead of a reflex. That one bit of friction is the whole thing.

AI isn’t going to stop being part of how people code. That ship has sailed, and honestly, used well, it’s the best learning tool I’ve ever had — a tutor that’s available at 2 a.m., never gets impatient, and will explain the same concept five different ways until one lands.

But “used well” is doing a lot of work in that sentence. The default way these tools want to help you is the way that keeps you dependent on them. If you’re learning, you must fight that default on purpose. For me, that fight is one paragraph of instructions I paste in before I start.

And the AI is only half of it. The other half is reps. Whenever I learn a new concept, I try to build three or four small projects with it before I move on. It’s harder than just reading the chapter and nodding along — but it’s doable if you try, and it’s the thing that turns “I understand this” into “I can do this.” The 0-versus- None lesson didn't stick because Claude explained it; it stuck because I sat there and built it wrong, then built it right, with my own hands.

I’ll say one more thing, because I hear it a lot: people telling beginners not to bother learning to code, or to just let the AI write everything. I refuse to go along with that. I’m a computer science student, and I intend to finish my degree. To me, coding isn’t the thing AI makes obsolete — it’s a tool I’m learning to use to solve problems. AI doesn’t replace that skill. It can sharpen it, if you let it teach you instead of letting it think for you.

Write the code yourself. Let the AI ask you the questions. That’s the version of coding with AI that makes you a programmer instead of a person who owns a very fast code-generator.

Originally published at https://jjulmis01.substack.com.


메타데이터
post_id
81eac9be5b9e
slug
coding-with-ai-81eac9be5b9e
url
https://medium.com/@jeanjulmis87/coding-with-ai-81eac9be5b9e
canonical_url
https://medium.com/@jeanjulmis87/coding-with-ai-81eac9be5b9e
author_url
https://medium.com/@jeanjulmis87
status
ok
fetched_at
2026-06-09 15:37:30