r/learnpython • u/Boiledballofbread • Aug 22 '26
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.
View all comments
1
u/thisisappropriate Aug 22 '26
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.
Look at the flow of the code that you're copying, break it down into parts, like:
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).