Let's get functional

by Elliott Hauser

24 May 2018

Q&A

  • Vocab hotseat! Got some vocab getting you down? Or a concept that’s giving you fits? Let’s throw it on the board and clear things up.
  • When to use variables:
  • Your Logical turtle shuld be in the same pull request as your Turtlehack, but in a different post (dated Tuesday). If any of this doesn’t apply to you, fix it now.

Introductions

Finally! Let’s get to know each other a little.

Turtlehacks

Pair up and merge up!

Let’s share!

Looking ahead

  • My Treasure hunt game, demonstrating click events and with an instructions animation:

Clicky Turtles are on their way! You’ll need Chapter 2 of my video to learn about them (they’re not in the textbook)

Functions as Idioms

Generally, pull your function definitions up out of the code, then call them in your code.

Conditionally defining a function (probably a bad idea):

Backing up: Anatomy of a function

I never really got parameter vs argument until late in my career. Now you know :)

Functional Turles: In Class

Link in assignments.

Code Talks on your Turtle Refactors

Pair up

  • Review and merge your partner’s pull request.
  • Read & discuss each other’s programs.
  • Group up
  • Circle up

Homework: Treasure Hunt Turtles

Check it out on the assignments page. Use your resources

Elliott Hauser is a PhD Student in information science at UNC Chapel Hill. He's hacking education as one of the cofounders of Trinket.io. Find Elliott Hauser on Twitter, Github, and on the web.