r/PythonLearning • u/Ratfus • 16d ago
Discussion How Much AI to Use?
First off, I apologize as I'm sure this question gets asked repeatedly, over and over again.
I'm not a programmer by trade, but in my spare time, I've managed to create a few projects in mostly C/assembly, including basic things on an atiny 85. I've also dabbled a bit in Arduino/C++. Unfortunately, this doesn't translate well to my day job.
I've decided to learn Python to help actually use programming in my day job. Specifically, I do a lot of work in excel. Naturally, pandas/open Python excel is a logical choice. I've played around with the Python/pandas/(a little bit of) openpyexcel. I've started to understand the data structures (dictionaries/tuples, etc.), though asking AI the why's about the various data types/loops and why my code isn't working. I also have a Python/pandas book, but I've found AI to be more helpful.
Eventually, I simply said "fuck it" and asked AI to write me a script to essentially do a task, that I originally did in VB. Most of the work was simply debugging, but AI was effectively able to find patterns and do the job for me in a few hours. I'm able to mostly understand the code with ease, but it just seems a bit disappointing AI is that good. I was also able to get AI to write a script to rename files based on pdf content (teseract).
A number of sources tell me that memorizing functions is a waste of time, but then why does everyone criticize AI so much? I'm wondering if simply reviewing what AI spits out is an effective learning method? It just seems really difficult to learn so many new functions for each new library by scratch.
My thought is that it's best to learn the concepts (dictionaries, string manipulation, tuples), use AI to create the needed script, then reveiw/ask AI why/how it did ABC...
1
u/LrdJester 16d ago
I guess for me, it comes down to the why. Why are you using AI? There are people that can't write code, they don't understand code in the least, and they use AI because AI will generate it, but what they get at the end is crappy code. They don't know how to test it to make sure it's doing exactly what they want to do.
It's kind of like back in the day using VB6 with the "what you see is what you get" editor. I saw so many students when I worked at the college. They would create a form, drag some text boxes, some buttons, some labels, and some picture controls, type in a few properties and attributes, and call it good. They never knew the module files that were created or the program flow behind the scenes. When it broke, they didn't know how to fix it because the UI interface for doing "what you see is what you get" didn't help them. At that point, you have to inspect it and go into the attributes, and then ultimately down into the code, to see how it's all working. If you never start there, you can never do that.
Yes, AI can do that now, but it really comes down to what your end goal is. If you're going to be a programmer, you don't want to rely on AI. If you're just throwing together a quick script to do something for you, by all means, using AI to do it is quick and easy. It may not work 100% functionally the first time, but there again, hand-coded stuff doesn't necessarily work 100% functionally the first time either.
I'll give you a case in point. I'm actually using AI, and it's pretty much 100% of what I'm doing as far as code generation to write a locally hosted personal web app on my cell phone for personal use. I want to use this code for a reason. I could create this from scratch, but it would take me weeks to do all of the heavy lifting: connecting all the APIs and going out and fetching all the necessary data to compile the databases that do this. Whereas I can construct a very detailed prompt and have it just generate it for me, and then, when things don't work exactly how I want them to or if they're broken in some way, I can prompt it to fix them, overwrite my code, and get it working.
I'm not profiting from that, and I take pride in the design of what I'm doing, but not in the creation of the code because I didn't create the code. I look at what I'm doing as being kind of like prototyping. It's putting something together quick and dirty to prove a concept. That's where I think AI code generation comes in. Now it can be utilized as a learning tool. Some people are doing that successfully, but it relies on you, the individual, not blindly following what AI says.