I know of the dangers of copying and pasting others’ code without understanding. But how do I make sure I understand as well as learn from the code I find online?
I follow these basic steps:
- Comment everything in the code. Use documentation and Google to understand every single part of the code.
- Rename the variables. Make the variable names as specific as possible to my code situation.
- If this is a concept I want to learn, repeat the process with as many code examples as possible.
One thought on “Reading and Using Code”