AI as Coding Partner
You use AI for coding? Perfect! But learn how to really understand β instead of just copying. From copy-paste to "Ah, now I get it!"
Your Learning Goals
The Copy-Paste Trap
Scenario: You ask the AI: "Make me a responsive navigation with CSS", copy the code, paste it, done. Does it work? Yes. Do you understand it? No.
The problem: On the next task (e.g., a footer) you ask the AI again. And again. And again. After 20 tasks:
- β You can't write simple code yourself
- β You don't understand why something works (or doesn't)
- β You're lost during exams
- β Finding errors is impossible (because you don't know the code)
"AI is not a chauffeur, but a driving instructor. If you just ride along, you never learn to drive."
The Better Way: Use AI as a Tutor
"Write me the code for a navbar"
"I want to understand CSS flexbox. Show me the code AND explain line by line what happens. I'm a beginner."
The Tutor Mindset Questions:
"Can you explain this to me like I'm 12?"
"What exactly happens in this line?"
"What would this look like if I did [X] instead of [Y]?"
"What's the difference between this and that method?"
The Code Explainer
Paste code you don't 100% understand β and have it explained:
Your Code:
Debugging with AI (the right way!)
The "What's Wrong?" Approach
"My code doesn't work."
"I'm getting an error: 'TypeError: Cannot read property of undefined'. My code is: [code]. I don't understand what 'undefined' means in this context."
The "Explain the Error" Approach
Instead of just wanting the solution, ask for the cause:
"My code throws [ERROR].
1. What does this error mean exactly?
2. Why does it occur in my code?
3. How can I avoid it (not just fix it)?"
The Rubber Ducky Approach with AI
Explain your code to the AI β then you'll notice where the error is yourself!
"I'll explain my code to you, and you tell me if I understood it correctly:
[Your explanation here]
Is that correct?"
English for Coding, German for Understanding!
Coding backgrounds can often be better explained in German:
"ErklΓ€re mir 'flex-direction' wie ich 5 wΓ€re. Warum braucht man das?"
German for complex concepts and "why" questions
"Fix this error: ReferenceError: document is not defined"
English for error messages and code review
Pro tip: Use German for:
concept explanations, "why" questions, understanding connections.
Use English for: error messages, best practices, code optimization.
The Learning Cycle with AI
1. Define Problem
"I want to open/close a modal with JavaScript"
2. Ask AI (right!)
"Show me a simple example AND explain each step"
3. Understand (don't copy!)
Read code, ask questions, understand concept
4. Write Yourself
Try without AI. If not: Back to step 2
5. Learned!
You can do it now β without AI
Practice: Real Scenarios
Scenario: Understanding CSS Grid
Your goal: A 3-column layout with Grid.
"Give me grid code"
"I'm learning CSS Grid. Show me a 3-column layout and explain:
1. What does 'grid-template-columns' do?
2. What's the difference to the old way (float)?
3. Why do I need 'gap'?"
Scenario: JavaScript Event Listener
Your goal: A button should do something when clicked.
"Code for button click"
"Explain 'addEventListener' to a beginner:
- What does 'click' mean?
- What's the difference between 'function() {}' and '() => {}'?
- Why do I need 'document.querySelector'?"
Scenario: Finding Errors
Your code doesn't work.
"Here's my code, fix it"
"My code throws: [ERROR MESSAGE]. I don't understand what [specific part] means. Can you:
1. Explain the error?
2. Show where in the code the problem is?
3. Explain how I can find such errors myself?"
Quick Check
1. What is the main problem with pure copy-paste?
2. What should you always ask?
3. What is the "Rubber Ducky" approach?
Your Mission Progress
Mission 5 completed!
You now code smarter β not harder!