Virtual hands-on workshop : “Enjoyable Introduction to Programming using  Alice”

by Dr. Jeyakesavan Veerasamy, CS faculty,

University of Texas at Dallas, USA.

 

While these materials have been targeted for workshops, they can certainly be used for self-paced learning from your home as well. Just that it can be more enjoyable experience if you have at least a partner to discuss and exchange ideas! This material does not assume any prior experience in programming & it is really meant for absolute beginners! Jump in and enjoy.

 

Welcome the participants to Alice workshop with this video (turn ON the speakers first):

Merry Christmas using Alice: http://www.youtube.com/watch?v=5SB-lieOdjo

 

Item

Description

Material

Duration

P1

Alice installation and lab setup - 1 week prior to workshop, download Alice 2.3 software from www.alice.org and unzip and store in each computer. See the PPT for more details.

PPT/PDF

 

0

Why does it make sense to use Alice first? (Why not learn C/C++/Java directly?)

PPT/PDF

 

1

Welcome to Alice workshop! Here are a few suggestions to get the maximum value from this workshop.

We will cycle through 3 modes for each topic/example: Watching, Doing it individually, helping each other to complete and work on something extra.

You can use http://www.online-stopwatch.com/ to make sure that the workshop is progressing in timely manner.

 

2

Core programming concepts – Sequence, selection and repetition are 3 pillars of programming!

Flash/YouTube, PPT/PDF

15 minutes

3

Introduction to Alice - Visual Programming - Drag & drop approach for coding - no syntax errors - program always ready to run!

Flash/YouTube

7 minutes

3a

Fun with examples: Open Alice tool – select Examples tab in the dialog box – click and open each Example world and play it. Do not try to understand the code.

 10 minutes

4

Scene Setup – get ready for the show!

Flash/YouTube

 9 minutes

4a

Scene Setup practice - browse the gallery, add your favorite object and practice scene setup adjustments.

Replay video if needed.

 10 minutes

5

Working with Objects - there are properties and methods associated with each object. Specifically we need to understand all possible movements first.

Flash/YouTube

 14 minutes

5a

Add the same or a similar object from gallery and practice various movements. You can always UNDO after trying each move.

Replay video if needed.

 13 minutes

6

Working with Object’s parts - there are properties and methods associated with each object. Specifically we need to understand all possible movements first.

Flash/YouTube

7 minutes

6a

Add the same or a similar object from gallery and practice various methods for body parts. You can always UNDO after trying each move.

 

 

7

Our first program – Coach and Penguin - a sequence of actions – DO TOGETHER brings realism – Loop to repeat actions

Flash/YouTube, Scene, Final

 11 minutes

7a

Complete the same program on your own!

Replay video if needed.

 15 minutes

7b

Do at least one exercise from the following list. Work on all of them if time permits:

 

Exercise 1: Add cow and chicken to a new world and make them greet each other by bowing, then go back to normal position. Repeat it using a loop.

 

Exercise 2: Add two animals like Dog and Cat. Make the dominant animal approach the other one. Now, make the 2nd animal grow in size and scare the first animal. 1st animal should turn and run away. Repeat it using a loop.

 

Exercise 3: Add two people, make them face each other, place a ball in-between them and try to simulate kicking the ball back & forth.

 

 15 minutes

8

Reinforcement: Seaplane example

Flash/YouTube, Scene, Final

 13 minutes

8a

Complete the same program on your own!

Replay video if needed.

 10 minutes

8b

Use the same seaplane & make it go in a circle on the water surface instead. Then, make it a bumpy ride (you can use sine wave)

 

 

9

Reinforcement: Person walking back & forth using nested loops

Flash/YouTube, Scene, Final

 11 minutes

9a

Complete the same program on your own!

Replay video if needed.

 10 minutes

10

Person walking back & forth using a loop and IF statements - alternate implementation

Flash/YouTube, Scene, Final

 6 minutes

10a

Complete the same program on your own!

Replay video if needed.

 10 minutes

11

Jack's sophisticated walk using a built-in method!

Flash/YouTube, Scene, Final

 9 minutes

11a

Complete the same program on your own!

Replay video if needed.

10 minutes

12

Our own sophisticated walk using new methods

Flash/YouTube, Scene, Final

12 minutes

12a

Complete the same program on your own!

Replay video if needed.

10 minutes

12b

Enhance the program to include the coordinated hand movements as well.

 

10 minutes

13

Our own sophisticated walk using a new method with a parameter

Flash/YouTube, Scene, Final

8 minutes 

13a

Complete the same program on your own!

Replay video if needed.

10 minutes 

14

Working with numbers: Guessing game - Let the computer think of a number (use random number generation). Your goal is to make minimum # of guesses to find that number.

Flash/YouTube, Scene, Final

 20 minutes

14a

Complete the same program on your own!

Replay video if needed.

 15 minutes

14b

Reverse guessing game: you should think of a number between 1 and 100. Computer should ask minimum # of questions and try to find that number.

 

 20 minutes

15

Math practice: Generate 2 random integers: one from the range of  1 to 100 and the second one from the range of 1 to 20. Select a random operation (+,-,* or /) and pose the math question to the user. Get the user’s input and validate the answer. Repeat it 10 times and summarize the student’s performance.

Final

 

16

Concept: Array - Lots of data of same type

PPT/PDF

 

17

Time for group dance! Add similar objects and use DO ALL TOGETHER structure to perform a group dance.

Flash/YouTube, Scene, Final

 13 minutes

17a

Complete the same program on your own!

Replay video if needed.

 

18

Sophisticated group dance! As long as all objects in the group have same object structure, then you can do more sophisticated dance!

Flash/YouTube, Scene, Final

 

18a

Complete the same program on your own!

Replay video if needed.

 

19

Generate Texas Lotto winning numbers – basically we need to output 6 random numbers within the range of 1 to 50. We also need to ensure that there is no repetition of numbers. In other words, all 6 numbers should be unique.

Final

 

19a

Complete the same program on your own!

 

19b

How much you won in Texas Lottery? This lottery involves getting 6 numbers from the user and selecting 6 numbers randomly and see how many numbers matched. Winning amount increases as # of matches increase.

 

 

20

Searching for a number in an array: Generate 10 random numbers within the range of 1 to 30 first. Then, ask the user to select a number and check whether that number is in the array.

 

 

20a

Complete the same program on your own!

 

21

Concept: Events

 

21

Events: Hit the coach’s head with the ball.

Flash/YouTube, Scene, Final

 

21a

Complete the same program on your own!

Replay video if needed.

 

22

Frog game setup: Move lily pads at random speeds independently

Flash/YouTube, Scene, Final

 

22a

Complete the same program on your own!

Replay video if needed.

 

23

Frog game: Frog jumping game - our frog cannot swim :-( so it needs to jump on the moving lily pads 5 times to reach the destination.

Flash/YouTube, Scene, Final

 

23a

Complete the same program on your own!

Replay video if needed.

 

24

Memory game - there are 2 copies of each image hidden under the squares. If you find matching images, they will stay up, otherwise they will be hidden again. Goal is to open all the images with minimum # of clicks.

Scene, Final

 

24a

Complete the same program on your own!

 

24b

Enhance memory game to keep track of # of number of clicks and report it.

 

 

25

Connect4 game - develop it for 2 players to play against each other. We need to implement the logic to determine the winner.

 

 

25a

Complete the same program on your own!

 

 

 

Additional Topics

 

Item

Description

Material

Duration

A1

Incorporate sounds, even your own sound files...

 

A1a

Try to do the same program on your own!

Replay video if needed.

 

A2

Cameras move in real movies - let us do the same! Two kids holding hands together & facing each other. Mount the camera on one kid’s head and go round and round...

 

A2a

Try to do the same program on your own!

Replay video if needed.

 

A3

Saving code and video

 

A3a

Try to do the same program on your own!

Replay video if needed.

 

 

Additional resources:

 

Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm

Following site has several advanced Alice worlds:

Adventures in Alice programming @ Duke University http://www.cs.duke.edu/csed/alice/aliceInSchools/