Top Banner
Telling a Story: Using the Alice Programming Language
25

Telling a Story: Using the Alice Programming Language.

Dec 24, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Telling a Story: Using the Alice Programming Language.

Telling a Story: Using the Alice Programming Language

Page 2: Telling a Story: Using the Alice Programming Language.

Which area contains our “program” (set of instructions)?

D

A B

C

Page 3: Telling a Story: Using the Alice Programming Language.

The order in which instructions in a doTogether tile are listed is important (assume no DoInorders inside)

A. True, because the computer executes instructions one at a time from top to bottom

B. True, because one instruction is listed after the other

C. False, because things on a doTogether tile happen simultaneously

D. False, because you can’t have two instructions on the same tile

Page 4: Telling a Story: Using the Alice Programming Language.

What do you call this?

A. InputB. ObjectC. Control StatementD. Instruction/Statement

Page 5: Telling a Story: Using the Alice Programming Language.

Which of the following are GOOD metaphors for a computer program?

Recipe Movie Script To-Do ListA * * *B * *C * *D *E *

*In Discussion: Discuss the differences between these things, and be sure you can say why if something is NOT a good metaphor

Page 6: Telling a Story: Using the Alice Programming Language.

What makes a good discussion?

• Not just one thing, we’ll be discussing what makes a good discussion throughout the term

• But:– Not so good…– A lot better…

• Explain WHY and WHY NOT• Discuss OTHER answers (what do they do?)• Everyone talks– Going back and forth…

Page 7: Telling a Story: Using the Alice Programming Language.

If I want to make a spider robot's head spin around 2 times, what would the instruction (method tile) look like in Alice?

Page 8: Telling a Story: Using the Alice Programming Language.

Ways to demonstrate understanding of programming

Scenario: Idea in your head

Design: Storyboard

Implementation: Program

Writing

Read

ing

• Produce a result/artifact • Communication among people• Debugging

Page 9: Telling a Story: Using the Alice Programming Language.

Writing:Textual Storyboarding to Programs

• Given a visualization of what something should do– Or here an actual movie created in Alice

• Can you write a textual storyboard to describe the action?

• Later on: Can you translate that textual storyboard into Alice instructions?

Page 10: Telling a Story: Using the Alice Programming Language.

Analysis Practice

Next: I’m going to “play” an Alice movie

Watch CLOSELY, and pick which storyboard reflects what you see

I’ll play it a couple times

But let’s look at the world we’ll be seeing first.

Page 11: Telling a Story: Using the Alice Programming Language.

Here’s the world we’re going to work with

eskimo eskimoGirl

Page 12: Telling a Story: Using the Alice Programming Language.

For the video, which storyboard best represents what you see happening?

Do these steps in order Girl turns toward boy Girl moves a small amount towards boy Boy moves a larger amount towards girl Boy turns toward girl

Do these steps in order Girl turns toward boy Do the following steps together Girl moves a small amount towards boy Boy moves a larger amount towards girl Boy turns toward girl

A

B

C None of the Above

Page 13: Telling a Story: Using the Alice Programming Language.

What’s wrong with this storyboard?

A. An instruction is out of orderB. The “larger” and “small” statements are in the

wrong orderC. Nothing, it works just like the previous one

Do these steps in order Girl turns toward boy Boy turns toward girl Do the following steps together Boy moves a larger amount towards girl Girl moves a small amount towards boy

Page 14: Telling a Story: Using the Alice Programming Language.

Writing:

• If you are given “a video”–Can you see the (very detailed) steps

that took place?• Can you identify order and other

characteristics (doing things together versus in order (sequentially))

Page 15: Telling a Story: Using the Alice Programming Language.

Writing:

• A) Design: Can you express your understanding of the steps in a storyboard– Including the special characteristics?

• B) Implement: Can you translate your storyboard into Alice instructions? (code)

We just did a variant of A, let’s try B, but we’ll work one

instruction at a time

Page 16: Telling a Story: Using the Alice Programming Language.

Remember, this is our storyboard

Do these steps in order Girl turns toward boy Do the following steps together Girl moves a small amount towards boy Boy moves a larger amount towards girl Boy turns toward girl

Page 17: Telling a Story: Using the Alice Programming Language.

D

A

B

C

E More than one of the above

Girl turns toward boy

Page 18: Telling a Story: Using the Alice Programming Language.

The rest…

• What more do we need to do (after the previous statement) to create the rest of the program?

Page 19: Telling a Story: Using the Alice Programming Language.

A

B

C None of the Above

Do these steps in order Girl turns toward boy Do the following steps together Girl moves a small amount towards boy Boy moves a larger amount towards girl Boy turns toward girl

If you can’t see, the amounts are:

ONEAnd (zero) POINT ONE

Page 20: Telling a Story: Using the Alice Programming Language.

That was Writing, Now Reading

• Given an Alice program (or part of a program)• Be able to read it and describe what code

does (scenario)– In English, since we’re not making you draw or

even give the storyboard

Page 21: Telling a Story: Using the Alice Programming Language.

What does this code do?

A. Makes the eskimo girl say Hello, then jump up and down

B. Makes the eskimo girl say Hello WHILE jumping up and down

C. Makes the eskimo girl say HelloD. None of the above

Page 22: Telling a Story: Using the Alice Programming Language.

How would we change the code to make her say

Hello while jumping up and

down?

Page 23: Telling a Story: Using the Alice Programming Language.

Note: Our intent in NOT to “trick you”

• Computer programs are PICKY• Getting them to do what you want requires

paying attention to a lot detail– In computing, getting the computer to do EXACTLY

what you want is often very important– Flying planes:• A BIT too close is TOO CLOSE!• Red light cameras better not ticket me when the light’s

yellow

Page 24: Telling a Story: Using the Alice Programming Language.

Methods you might like to use(and you should play with)

• move vs turn vs roll• The “as Seen By” modifier– Can make moving, turning or rolling behave

differently• OrientTo• PointAt• Duration and Style modifiers (abruptly, etc.)

Page 25: Telling a Story: Using the Alice Programming Language.

How did it go?

• Did you get 50% right?• Yeah, you might need to read more – Slowly– Deeply (?)

• Do the homeworks– With someone else (or a tutor)– Talk about them with someone else (or a tutor)

• Tutors: Sun-Thurs 7-10pm• FOR TODAY: Anyone who participated in discussion

questions will get a point