Running Snap! on your laptop?


Q: “Can I run Snap! on my personal computer, or some other computer outside of the lab?”
A: Yes of course! – and we’re including another tip for saving and loading your programs.

Simply point your browser (the latest version of Chrome preferred) to a Snap! instance, such as https://artofcomputing.cecs.anu.edu.au/snap/snap.html and you are good to go!

What you are looking at is a blank Snap! instance, you may wonder how to load/save your work in Snap!, or look at pre-existing programs, as what we did in the warm-up excercise.

Open the Snap! environment via this link, it will automatically load a simple program into the middle gray space. Notice that the ‘program’ consists of a series of blocks colored differently based on their functions. Press the gree flag on its top, or on the upper right-hand-corner of the your browser window to start the program. (With your computer speaker on!), see/hear what happens .

Now open this link, excute the program as above. Can you see/hear how this three-part canon is built from the part above?

The first way is to load the program from a file saved on your computer in so-called xml format. If you click on the paper icon at the upper left hand side of the Snap! window, you will see a menu item that says “Import …” (see picture below). Click on it, and you will be presented with a file chooser. Choose your local xml file, wait, and voila! - the program appears in your workspace.

Now with test your setup with the Canon in the warm-up programs.

  1. Save the program xml somewhere to your computer, e.g. the desktop. http://snap.berkeley.edu/snapsource/demo/kanon.xml.
  2. Load this program via the “Import … ” menu, test that it runs.
  3. Change something in the program, and then user “export project … ” to save your work to disk.

The second way is by encoding the URL that contain the program - i.e., the keyword “#open:” followed by an ULR to the xml file. For example, as was done in the warm-up excercise: http://artofcomputing.cecs.anu.edu.au/snap/snap.html#open:http://snap.berkeley.edu/snapsource/demo/kanon.xml.

19 January, 2015
342 words


Written by
Tags
howto snap faq warm-up

Quick links

2017 S1 lectures schedule:
  • Monday 1200-1300 (PSYC G8)
  • Tuesday 1000-1100 (PSYC G8)
  • Wednesday 1200-1300 (PSYC G8)

Quick-access class pointers: TBC