Return to Video

Course 3 - Bee Functions explained by Chris Bosh

  • 0:00 - 0:05
    One of the most important concepts in computer
    science is how to define new commands, how
  • 0:05 - 0:11
    to add your own words to a computer language.
    Most computer languages have only about one
  • 0:11 - 0:17
    hundred words or commands. The art and magic
    is in defining your own new words out of these
  • 0:17 - 0:23
    building blocks. We do this all the time in
    sports. For example, in basketball, you start
  • 0:23 - 0:28
    by learning how to dribble, how to do a lay-up,
    how to rebound. Once you've learned these
  • 0:28 - 0:33
    really basic moves, you learn new moves and
    put together these building blocks, like a
  • 0:33 - 0:38
    pick and roll or give and go. You can then
    go from there to do more complex plays. Once
  • 0:38 - 0:45
    you learn that play and give it a name, everybody
    on the team knows how to do it. Similarly
  • 0:45 - 0:50
    once you've taught a computer how to do an
    action once using these sequences of commands,
  • 0:50 - 0:55
    you can make up your own name for that action
    so it's easy to repeat it later. When you
  • 0:55 - 1:01
    define your own command and give it a name,
    that's called a function. Now we're going
  • 1:01 - 1:08
    to use functions to help the bee. In this
    example, our function is called get 2 nectar,
  • 1:08 - 1:14
    this green block right here. We know what
    get 2 nectar does by looking at this grey
  • 1:14 - 1:21
    box which is the function definition. If we
    look inside there, the get 2 nectar is going
  • 1:21 - 1:28
    to get nectar and then get nectar again. Always
    look at what's inside the grey box so that
  • 1:28 - 1:32
    you know what these green function blocks
    can do.
Title:
Course 3 - Bee Functions explained by Chris Bosh
Video Language:
English
Duration:
01:33

English subtitles

Revisions