Snap! (programming language)
|Paradigm||object-oriented, educational, event-driven|
|Designed by||Brian Harvey and Jens Mönig|
126.96.36.199 / November 29, 2018
|Filename extensions||.ypr, .ysp (BYOB); .xml (Snap!)|
|Scratch, Scheme, Logo, Smalltalk|
|BeetleBlocks, Snapi, Dragme IDE|
Snap! is a free, blocks- and browser-based educational graphical programming language that allows students to create interactive animations, games, stories, and more, while learning about mathematical and computational ideas. Snap! was inspired by Scratch, but also targets both novice and more advanced students by including and expanding Scratch's features.
Since version 4.0, it is entirely browser-based, with no software that needs to be installed on the local device, much like Scratch. The old Snap, called BYOB, is a mod of Scratch which they can also make Windows executables (EXEs).
In Snap!, the screen is organized in three resizable columns containing five regions: the block group selector (top of left column), the blocks palette (left column), the main area (middle column), and the stage area (top of right column) with the sprite selector (also called the sprite corral) showing sprite thumbnails below it.[Note 2]
In the interactively resizable stage area (full-screen is available, too) are drawn the graphical results (i.e. animations, graphics, etc.) of the scripts running in the script area, and/or interactively double-clicked individual blocks in any palette. Individual blocks can be dragged from the palette onto the scripts area to be associated with the selected sprite.
|Motion||Moves sprites and
|Control||If statements, events,|
and loop structures
costumes, and output
|Sensing||All sprite hit detection|
and user input
|Sound||Plays audio files and
programmable sequenced audio
|Variables||Variables and lists,|
including lists of lists
Snap!'s blocks are divided into eight groups: Motion, Looks, Sound, Pen, Control, Sensing, Operators, and Variables. The layout of these groups in the block group selector is shown in the table below.
The main area can show scripts, costumes, or sounds associated with the selected sprite. What the main area shows is dependent on the selected tab.
The most important features that Snap! offers, but Scratch does not, include:
- expressions using "nested functions", consisting of one or more "anonymous functions", each of which is represented by a block having one or more empty(ed) slot(s)/parameter(s) that are waiting for a "higher order function" (the one that is calling the anonymous one) to be filled by. (Their computer-science theoretical basis being First class functions, which in turn have "Lambda calculus" as their even more abstract, mathematical, foundation),
- lists that are first class (including lists of lists),
- First class sprites (in other words prototype-oriented instance-based classless programming),
- nestable sprites
The web-based Snap! and older desktop-based BYOB have been both developed by Jens Mönig for Windows, OS X and Linux with design ideas and documentation provided by Brian Harvey from University of California, Berkeley and have been used to teach "The Beauty and Joy of Computing" introductory course in computer science (CS) for non-CS-major students.
The source code of Snap! is Affero General Public License (AGPL) licensed and is available on Github and can be downloaded within Snap! itself. The earlier, desktop-based 3.x version's open-source code is available under a license that allows modifying for non-commercial uses and can be downloaded from the UC Berkeley website or CNET's Download.com and TechTracker download page.
Snap! has been recognized by the Logo Foundation, and reviewed in an online magazine for programmers. As of December 2014, 100 New York City (NYC) high schools will introduce University of California at Berkeley’s “Beauty and Joy of Computing” as a new AP Computer Science Principles course in 2015, using Snap!.
- "jmoenig/Snap". GitHub. Retrieved 27 December 2018.
- "Scratch - Imagine, Program, Share". scratch.mit.edu. Retrieved 21 May 2017.
- "HomePage for Brian Harvey (bh@cs.Berkeley.EDU)". people.eecs.berkeley.edu/~bh/. Retrieved 19 January 2019.
- "UC Berkeley EECS - CS10 : The Beauty and Joy of Computing - Fall 2011". inst.eecs.berkeley.edu. Retrieved 21 May 2017.
- "jmoenig/Snap--Build-Your-Own-Blocks". GitHub. Retrieved 21 May 2017.
- "Snap! (Build Your Own Blocks) 4.0". snap.berkeley.edu. Retrieved 21 May 2017.
- CNET Download.com and CNET TechTracker's BYOB for Windows download page
- CNET's Download.com and TechTracker BYOB for Mac download page
- "Logo History". el.media.mit.edu. Retrieved 21 May 2017.
- Editor. "Visual Language Snap! Version 4.0 Released". i-programmer.info. Retrieved 21 May 2017.
- "FACT SHEET: New Commitments to Support Computer Science Education". obamawhitehouse.archives.gov. 8 December 2014. Retrieved 20 January 2019.