Skip to content

Explain how to "read the docs" #3

@benjiallen

Description

@benjiallen

Learning outcomes

It's impossible to remember all the JavaScript commands the computer understands. It would be like trying to remember all the words in an English dictionary. Just like looking up a word in a dictionary we can look up JavaScript commands to find out what they do, how to spell them and how to use them. We call this helpful guide "code documentation". Sometimes just called "the docs" for short.

We can find our JavaScript drawing documentation at http://p5js.org/reference/

To do

  • Need some fun examples of reading documentation to find out new things
  • One good example might be http://p5js.org/reference/#/p5/fill
    • By the time we introduce the concept of "read the docs" the students will be familiar with fill() but all they know is that fill() understands RGB color
    • Fill has loads of different ways of describing color. One fun shortcut is just writing the English term for a color you have in mind e.g., fill('red')
  • Another good example might be triangle() or quad(). This will open up new drawing possibilities
    • Could use this example as a quick exercise. "Read the docs and tell me how to draw a triangle"
  • Don't forget to mention that the really cool thing about P5 docs is that they are interactive. You can write some code in the docs! How cool?!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions