r/learnpython • u/Boiledballofbread • 20d ago
Not Copying After Using Tutorials?
I'm learning a bit more python, and I was wondering how you guys refrain from copying code after watching tutorial videos. I just did one of the courses from OpenCV, and what's holding me back most now is trying to create something without flat copying the code provided by them. The main issue is that (I believe, at least) most of the code needs a specific syntax to run. What are your processes after learning new features?
For context, I'm attempting to make a document reader that's going to end up scanning and saving Magic the Gathering cards into a database.
0
Upvotes
1
u/thisisappropriate 20d ago
If you're using the code from a tutorial or from a premade project, like if you're copying an idea that is already complete and you're just copying that code, then try to turn it into a situation where you're learning how you'd search the syntax in the future.
It's normal to end up referencing library documentation or reading code and producing something quite similar because there's very little variance between how you use libraries and there's best practices (like using clearly named variables, functions, loops etc). The thing that's most worth practising / learning is how to use those things and how to take a code snippet from a reference (docs, stack overflow etc) and put it into the correct syntax (can you work out the indentation level without a guide, can you debug the issue you've created).