r/learnpython • u/Cettarolo • 1d ago
AI as a learning tool for python
I'm sure this debate has been had 10,000 times on this thread already, but I'm wondering if this is a new take on it. Will give a bit of backstory:
I knit a lot and realised recently it would be really useful to display my colour work patterns on the touch bar of my mac pro so I could watch a film or something like that while knitting. You could then integrate a marker so you don't lose your place and it could show one row of knitting at a time. I've never coded a day in my life, but I did some research. Looks like I can use python and better touch tool to design my own program that can do something like this. A colour work pattern is nothing more than rows of black and white squares which can be expressed as 1s and 0s, so it doesn't seem to be too complicated a project.
I know I could go to Claude or something similar and ask it to design the program, but truth told I'm not sure I trust it entirely, and I have a bit of a problem still with the concept of asking AI to build me something. However, I don't see why Claude couldn't teach me python in a manner that directs me towards building this program. Rather than attempting to learn the whole of python until I feel like I understand enough to build it, I can ask Claude to design a step by step guide that happens to result in the program I want, I can vet what it's doing and attempt to understand it, and maybe learn some python.
As someone who is barely computer savvy though, I've got a few naïve questions about how reliable this is. Is Claude/ AI actually any good at writing code and as a teacher and can I trust it to be running said code on my computer. I don't know much about how my computer works but just staring at the terminal makes it seem vulnerable. I heard recently about a scam that directed people to type code into their computer terminal, is this any different or am I being silly?
Beyond this I'm curious as to whether people thing I'm being silly in doing any of this when I could just ask Claude to write the program, is asking Claude to teach me really any different in the end?
2
u/rupturedprolapse 1d ago
Claude tends to trickle truth you when teaching which is really frustrating/exhausting when trying to use it to learn. I've personally stopped trusting ai for that and will just grab a book instead.
If just letting Claude take the wheel, it can do a pretty decent job of it, just don't look under the hood at all because it will probably be nightmarish.
Given you have an idea of what you want to make and what it'll look like, i'd say learn python.
1
u/ectomancer 1d ago
Your premise is wrong. Each colour is one of 16777216 colours. Each pixel is 24 bits. The RGB for white is 0,0,0 and for black is 255,255,255. Notwithstanding, your methodology may work with an LLM.
1
u/Invofan 1d ago
I actually think using AI as a teacher rather than just having it write the whole thing is one of the more sensible ways to use it for learning. If you can get it to explain each step, make you write/modify the code yourself, and then help you debug when you get stuck, you’re still doing the important part: understanding why the program works.
And your project sounds like a particularly good first programming project because you already have a concrete goal and can break it into small problems. “Learn Python” is vague and intimidating; “make this row of black and white squares appear on my Touch Bar, then add a button to move to the next row” is something you can actually work toward.
The terminal concern is absolutely not silly, though. I wouldn’t blindly paste commands from Claude (or anyone else) into Terminal. Ask the AI to explain what a command does before running it, and if you don't understand a command that has sudo, downloads something, deletes files, changes permissions, or executes another script, stop and investigate it first.
The biggest difference between “AI builds my program” and “AI teaches me to build my program” is whether you're willing to struggle a little. If Claude gives you the finished 200-line program and you paste it in, you've mostly outsourced the learning. If it gives you 10 lines, explains them, asks you to change something, and lets you break it before helping you fix it, that's much closer to having a very patient tutor.
Honestly, I’d take the latter approach. You might end up with a slightly worse program than if you simply asked Claude to build it, but you’ll actually know how you built it and you'll have learned enough to make the next thing yourself.
0
u/EEJams 1d ago
I'd just look up something like "python library to write programs on MacBook touch bar" on google. You'll need to download python and note the full file path of the install. You'll want to open the terminal and do a pip install of whatever library let's you program on the touch bar.
To keep it simple, navigate your C:/ drive to the python install, Lib, then look for something like idle lib and run idle.exe or idle.bat. You can create a shortcut to your desktop and open it to write simple python scripts.
You can import the library you pip installed into your script and either look at YouTube videos for using various functions or ask your AI of choice for a demonstration of that library's methods. You could ask it to print "Hello World!" To your touch touchbar or make it blink a square or something.
This project doesn't sound too bad and is a good start for programming. As long as your program works the way you want, you've successfully built a piece of software and that's a cool feeling
3
u/DrShocker 1d ago
Is your goal to have the thing that works or to learn the process required to make things in general?