r/learnpython • u/othryxen • 15d ago
How much of searching and AI overview is okay while learning and typing code?
I do understand no one knows all of python syntax and code and all issues and everything.
As I am going through CS50p,
When I am typing code fully on my own (no AI ever used i.e. chatgpt, claude, gemini) when I cannot solve something, I search google for the function or the method and then see the AI overview and then type code that I can use to solve what I need, will it be detrimental to my learning because I am not using the documentation?
I am and will NEVER use any AI models or apps to generate and copy paste code because I wish to learn and not be a code printer.
so my searches are like this, is it okay-ish and considered necessary for learning???
(also I go through tons of trial and error and use many print() functions to test code and not directly copy from AI overviews)
does isdigit work for string values?
how to check if a string variable is not equal to something sat 0?
how to know data type of a variable in python
how to find index of letter in a string python
string slicing python [2:] means?
how to find which index in a string is a number?
will if automatically return false if the condition is false?
how to check if a string is less than 10 but more than 2?
difference between if and if not
expected an indented block after 'if' statement on line 15
how to check if there are numbers in between a word in python?
how to loop a for loop up until the second last letter of a word
HOW to make variable in python which can be used by any def function?
python length counts from
(thank you for your answers!)
5
u/ItsSadTimes 15d ago
I use AI just to confirm what I already know. More like a reminder service then anything else. But if the LLMs bring up something I dont know, I confirm it myself by finding official documentation or atleast 1 other source thats not the LLM.
Its fine to use LLM output as a base, but if you dont know something that it gives you, learn it for yourself.
AI can be a useful teaching tool, if you know how to use it. And I dont mean "how to prompt" i mean how to interpret the output, apply pieces for yourself, and build upon it. LLMs love making things way more complex then they need to be.
9
u/ConsiderationNo9044 15d ago
You can still google without using AI, which is what I recommend. Save AI for extremely niche cases.
The order should be: Test it yourself -> Google it -> Ask the community -> Use AI. For the example of testing, for the question of isdigit working on string values, you can very easily try it yourself to see if it works.
3
u/ivovis 15d ago
I think you have found the best spot to be, use it as a resource for searching, we learn by doing so as long as you are 'doing' its all good.
Before AI there was .... that site everyone used to copy and past from, and still learned nothing - the doing is key.
2
u/Pyromancer777 15d ago
If you want to avoid "cheating" using the AI overview, you can change your browser's default search to use the web-only version of Google that doesn't include any AI responses in the results.
After that, you want to learn how to keyword search instead of asking specific questions. Instead of "does isdigit work for string values" type in "isdigit documentation" or "isdigit string parse". Instead of "how to know data type of a variable python" you would do something like "python check data type"
Basically, you boil your question down to just the keywords of the core-concepts, and your search results should get much better. The more specific your question, the more noisy your search-results will get since there is less chance of someone having posted those exact phrases on their webpages and the results might instead latch onto the less important words from the question.
Your questions themselves look fine though, and finding the resources to unblock you is exactly how you program. Just be sure to take notes any time you learn something new, even if those notes are just a comment in your code reminding you what something is doing.
For new concepts, I tend to write out little cheat-sheet code snippets where I type out a code example I found from a search or from tinkering, then write a comment above it saying exactly what it is doing. Then if I need to reference it later, I can use the code-block as a template to build something similar for whatever project I'm working on.
2
u/sideshowbob01 15d ago
So love stack overflow? Because I don't. Christ just use LLM.
Open a new chat, out some system instructions in. Tell it what your trying to learn. Tell it to not outcode syntax and just answer questions.
If you're doing leet code you could tell it to generate another version of this question.
Otherwise get a book and code from there. Which is the only real alternative at this point.
1
u/AlexMTBDude 14d ago
Only you can answer that question; Are you still learning what you're supposed to Learn? If yes then you're using AI in a efficient and good way. If not then...
I think that the way you've formulated your example questions is a good way to use AI.
3
u/mstrippolidev 14d ago
I think you are doing ok, the important thing for learning coding yourself at least a few minues and understand what is happening, what the functions does, the methods.
2
u/SamuliK96 15d ago
AI usage should be kept at a minimum. For simple questions, such as how a specific function, method, keyword, etc. works it's best to check the documentation. AIs can be useful for explaining broader and more complicated concepts, when you need more than a simple single-sentence question to explain your problem.
2
u/OkCaterpillar1058 15d ago
Yes that's ok. I learned coding without AI decades ago. Sometimes you get stuck, search online, it's part of the learning. Though for asking AI for function names or small things, it wouldn't hurt learning.
2
u/Sonario648 13d ago
You can use AI without code generation if you please for the love of god, DON'T use the default settings. I already learned Python long before GenAI, but I have Gemini setup to where it DOESN'T generate any code unless I explicitly ask it to. Instead, it's a socratic tutor that forces me to learn and figure things out.
2
u/frustratedsignup 11d ago
What you describe is exactly what I tend to do. I don't use AI for programming much because I want to take the time to struggle my way through whatever task is at hand. The only exceptions here are for syntax errors where I can't figure out the solution and those few times where I just don't have the free time to learn all of a very large module. Much of the time, the reason for using AI isn't necessarily being lazy or being in a hurry, it's to avoid all the sites that will try to drown me in ads. Paid AI, at least for the moment, has no ads.
1
u/Snoo61755 15d ago
Spell checker.
When I was first learning JavaScript, I spent 2 days wondering why my code didn’t work. I missed a semi-colon.
Nowadays, if a function doesn’t work, I can say “Y NO WORKY?”, paste my function, and it might say “you tried to use double quotes within double quotes here and your compiler is having trouble, try using single quotes inside the double quotes”, and bam, three days saved wondering why I’m getting a missing parentheses error when the problem was really due to quotes.
The learning process should be all you. Figuring out error codes is part of that too, and it can actually be faster to solve a simple error than ask AI where it is. However, if an error is beyond you, or worse: you have no errors and it doesn’t work, go ahead and get yourself unstuck with AI.
1
u/TheRNGuy 14d ago
No limit.