Reading and Using Code

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:

  1. Comment everything in the code. Use documentation and Google to understand every single part of the code.
  2. Rename the variables. Make the variable names as specific as possible to my code situation.
  3. 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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s