Tuesday, September 16, 2014

Section 2 - Snap! Overview

Snap! Overview

Lesson Objectives


  Before learning about some of the general constructs used in programming that are covered in the rest of Unit 3, this lesson provides a general overview of the Snap! environment. You will create two short programs, and learn how to store your own programs in several different ways. The lesson is composed of a short video that you are encouraged to follow as you build your own similar programs and become comfortable with the Snap! browser-based environment. There are many things that will not be covered in this lesson. In fact, the entire unit will not cover every concept in Snap!. Our goal is to provide you with a set of experiences that allow you to understand some of the core ideas in programming, such that you have the confidence to then explore more on your own.

  When learning a new foreign language, I have observed that it is easier to read in that language than to write in the same language. It seems that understanding something already provided is easier than synthesizing something new on your own. It takes practice to be able to write new expressions in a foreign language. I have found the same to be true in learning how to program. It is often the case that students can understand a program that is given to them much better than they can actually produce that same program on their own. The potential trap is to think that some proficiency in reading and understanding a program is the same as creating a new program on your own. In the same way that it takes practice to be able to write and speak in a new foreign language, you must practice and go through some hands-on activities in order to grasp the skill of programming on your own. It will be very tempting to look at a program provided to you, understand it, and think that you could produce that yourself. We encourage you instead to get involved with the coding activities that will be suggested in this unit that are designed to give you more practice in developing your programming skills, which will assist you in teaching your own future students about programming.

Lesson Tasks


Please work on the following during your exploration of this lesson:

Visit the Snap! website and look around at some of the information provided by the Snap! team. A gentle warning - there is a Snap! reference manual available. However, we suggest that you wait until the end of this unit before you try to read the manual. The Snap! manual has several advanced concepts that are discussed very early in the manual. The manual may be more accessible to those who already teach computer science, but the reference manual may be challenging to understand at first for a new CS Principles teacher who has never programmed before.

Watch the video linked below. There are no slides for this lesson. A suggestion is to first watch the video, and then come back to the subsequent steps below to review the video and try some hands-on activities.

Go to the URL that actually runs Snap! in the browser: http://snap.berkeley.edu/run. Be adventurous and explore around - you won't break anything important at this stage! Look at the different categories in the palette area, and how new blocks emerge when you click on each category. Can you guess what some of the blocks might do? Can you summarize in your own words what some of the categories represent as a theme? For example, what is the core theme of the blocks in the Motion category?

Try duplicating the "Hello World" program that is introduced at the first minute mark of the video. Pause the video in one tab of your browser, and try to duplicate what is being done in your own Snap! environment. Try to run your program by clicking on the green flag.

Explore the various ways that you can save this program. First, export the program as an XML on your desktop. Can you see where the file was then added to the Desktop? Try to then create a New project in Snap! that is empty, and then see what happens if you then import your saved program back into Snap! This file is not intended to be read by humans, but just an internal representation of your program that Snap! can read and write. The XML format (Extensible Markup Language) is a very important standard for sharing information, and is used by Snap! as a representation for storing your program.

Click on the cloud button at the top of the Snap! screen. You may want to try to create your own account by signing up (there is a sign-up button that you can click, which will generate an email to you with account information). This is not necessary now, but will be useful later.
Create a new project in Snap! (the "New" option in the file icon at the top of the screen). Then, try to create the square drawing program on your own that is introduced in the second half of the video. In particular, experiment with the "duplicate" block option that is shown in the video as a way to save time in dragging and dropping blocks (time 5:20 in the video). Were you able to get the ability to ask the user for the size of each side? Do you see how more general that makes your program, rather than drawing a square of the same size each time? We will come back to this idea in a future lesson in this unit.

Congratulations - some of you who may have never programmed before just created your first two (albeit very simple!) programs!

Please note: If the video below appears blurry, please allow time for the full resolution to download as a stream. You may also want to try viewing all of the Snap! screencasts that are in this unit in Full Screen mode, or in a separate browser tab.

Watch the video below!!!


https://www.youtube.com/watch?v=jFs3pn7zzoc


No comments:

Post a Comment