Snap! (programming language)

Snap! (BYOB[Note 1])
Paradigm object-oriented, educational, event-driven
Designed by Brian Harvey and Jens Mönig
Developer Jens Mönig
First appeared 2011 (2011)
Stable release
4.2.1.4 / September 9, 2018 (2018-09-09) [1]
Typing discipline dynamic
Implementation language JavaScript (Snap!), previously Squeak (BYOB version)
OS Cross-platform
License AGPL
Filename extensions .ypr, .ysp (BYOB); .xml (Snap!)
Website snap.berkeley.edu, byob.berkeley.edu
Influenced by
Scratch, Scheme, Logo, Smalltalk
Influenced
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.

User interface

Three resizable columns, containing five regions, in the Snap!'s IDE at startup

Reference Manual for Snap! is available for download by clicking on the Snap! logo (in the top-left corner of the screen). Screen is organized in three resizable columns containing five regions, which include the blocks palette of different categories (in the left column), the scripts area with all scripts belonging to a selected sprite, and the stage area (in the third column) with sprites thumbnails (also called sprite corral) below it.[Note 2]

In the interactively resizable stage area (full-screen is available, too) are drawn the graphical results (i.e. animations, turtle 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.

CategoryNotes  CategoryNotes
 MotionMoves sprites and
changes angles
   ControlIf statements, events,
and loop structures
 LooksControls visibility,
costumes, and output
 SensingAll sprite hit detection
and user input
 SoundPlays audio files and
programmable sequenced audio
 OperatorsMathematical and
Boolean operators
 PenAllows for
turtle graphics
 VariablesVariables and lists,
including lists of lists

Categories of blocks include the Motion, Looks, Sound, Pen, Control, Sensing, Operators, and Variables groups as shown in the table below.

Besides the Script tab, there are two other tabs, the Costumes tab and the Sounds tab. An expandable bar at the right is Help area.

Features

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 theorethical 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
  • codification of Snap! programs to mainstream languages such as Python, JavaScript, C, etc.

History

The web-based Snap! and older desktop-based BYOB have been both developed by Jens Mönig for Windows, OS X and Linux[2][3] with design ideas and documentation provided by Brian Harvey[4][5] 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.[6]

License

The source code of Snap! is Affero General Public License (AGPL) licensed and is available on Github and can be downloaded within Snap! itself.[7] 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[8] or CNET's Download.com and TechTracker download page.[9][10]

Platforms

Snap! is implemented in JavaScript using an HTML5 Canvas application programming interface (API),[Note 3] and because of that it runs on the major web-browsers on Windows, iOS, OS X and Linux devices.

Recognition

Snap! has been recognized by the Logo Foundation,[11] and reviewed in an online magazine for programmers.[12] 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!.[13]

Notes

  1. Program versions pre-4.0
  2. The way pre-2.0 Scratch version's screen was organized.
  3. In contrast, Scratch 2.0 was written in Adobe Flash, so it cannot run on Linux without Adobe Air.

References

  1. "jmoenig/Snap--Build-Your-Own-Blocks". GitHub. Retrieved 28 September 2018.
  2. "Scratch - Imagine, Program, Share". scratch.mit.edu. Retrieved 21 May 2017.
  3. "Send a free SMS text message online - Scratchr.org". www.chirp.scratchr.org. Retrieved 21 May 2017.
  4. "Scratch - Imagine, Program, Share". scratch.mit.edu. Retrieved 21 May 2017.
  5. "HomePage for Brian Harvey (bh@cs.Berkeley.EDU)". www.eecs.berkeley.edu. Retrieved 21 May 2017.
  6. "UC Berkeley EECS - CS10 : The Beauty and Joy of Computing - Fall 2011". inst.eecs.berkeley.edu. Retrieved 21 May 2017.
  7. "jmoenig/Snap--Build-Your-Own-Blocks". GitHub. Retrieved 21 May 2017.
  8. "Snap! (Build Your Own Blocks) 4.0". snap.berkeley.edu. Retrieved 21 May 2017.
  9. CNET's Download.com and TechTracker BYOB for Mac download page
  10. CNET Download.com and CNET TechTracker's BYOB for Windows download page
  11. "Logo History". el.media.mit.edu. Retrieved 21 May 2017.
  12. Editor. "Visual Language Snap! Version 4.0 Released". www.i-programmer.info. Retrieved 21 May 2017.
  13. "FACT SHEET: New Commitments to Support Computer Science Education". whitehouse.gov. 8 December 2014. Retrieved 21 May 2017.
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.