Snap! (Programming language)

from Wikipedia, the free encyclopedia
BYOB / Snap!
BYOB logo up to BYOB 3.x
Snap! Logo from BYOB 4.0
Basic data
Paradigms : Multi-paradigm : visual , educational , functional , procedural , object-oriented , meta , event-driven
Publishing year: 2011
Designer: Brian Harvey
Developer: Jens Mönig, Brian Harvey
Current  version : 5.1.0   (August 8, 2019)
Typing : dynamic
Important implementations : BYOB 3.x in Squeak as a mod by Scratch

BYOB / Snap! 4.x in JavaScript

Influenced by: Scratch, Lisp , Scheme
Affected: Scratch (influence in both directions, see article)
Operating system : Windows , macOS , Linux
License : Open source with proprietary components
snap.berkeley.edu

Snap! , known under the name BYOB up to version 3.1.1 (English abbreviation of Build Your Own Blocks ), is an educational visual programming language based on Scratch and inspired by Scheme and thus Lisp , including its Development environment for advanced students and for adult education.

Brief description

Snap! / BYOB extends Scratch to include more complex and abstract concepts that were previously missing in Scratch in favor of children’s suitability. Despite the playful appearance that it has retained from its Scratch origins, BYOB goes far beyond the possibilities of traditional programming-learning languages with its clear and consistent first-class objects and meta-programming . Among other things, the learning area “ Algorithms and Data Structures ” can be covered directly and completely with BYOB, while programming knowledge is acquired on the side.

Snap! / BYOB is open source and is used in upper secondary education at German schools and at American and German universities.

The graphic programs , which can be created live in lessons and lectures using drag and drop , are similar to flow charts , but can be run directly, which results in a high time and motivation advantage, as redundancies and breaks between theory and practice are avoided (elimination of: diagram → pseudocode → executable Program → typing → syntax errors → test runs → waste of time and demotivation).

Origin, development and dissemination

The origins of BYOB go back to the leisure project Chirp, which the German lawyer and software developer Jens Mönig published from 2008 as a modification of Scratch 1.2.1 and which became known to Berkeley professor Brian Harvey, who is known for his UCB logo . Together they created the programming language BYOB, which is suitable for adult education, in order to replace the scheme used in his basic lectures. The advisors included a .: John Maloney (the chief developer of Scratch), Dan Ingalls , Mitchel Resnick and Mark Guzdial. In a meeting with Alan Kay and his team that lasted several days , BYOB / Snap! reflected. The approval of public research funds turned the hobby project into a full-time job, which ultimately led to a complete re-implementation of BYOB, independent of the Scratch technology base, which from version 4.0 under the new name Snap! by the University of California, Berkeley and - translated into over 20 languages ​​- is freely available directly in the browser.

Logo of the Berkeley lecture The Beauty and Joy of Computing

BYOB / Snap! is an essential element of the highly acclaimed Berkeley basic lecture The Beauty and Joy of Computing, which was chosen as a pilot project for the new AP CS: Principles exam on the basis of which the National Science Foundation plans to train 10,000 teachers in computer science from 2015 (CS10K). In this context, large parts of the lecture, including the BYOB / Snap! Parts, were made public as Moodle versions and YouTube videos, including sample exams.

The high popularity of Scratch combined with its unsuitability for advanced computer science lessons has attracted worldwide attention from IT education professionals to BYOB / Snap! triggered as it makes up for this critical deficit of Scratch. The German computer science-didacticians Eckart Modrow recognized this potential early on and carried through professional articles, lecture notes, lectures and teacher training to the fact that the German computer science education from BYOB / Snap! can benefit. In 2013, BYOB was also used for the first time in German Abitur exams.

Extensions to Scratch

In contrast to Scratch, which aims for simplicity and immediate understanding by beginners, BYOB is supplemented by more complex programming concepts. Since many of these concepts are based on the multi-paradigm programming language Scheme , BYOB enables functional and procedural as well as object-oriented and even meta-programming . To this end, only a few new but very powerful options are added to the scratch properties, such as the creation of blocks, first-class functions or procedures (their mathematical bases are also known as lambda calculus ), first-class object lists (including Lists of lists) and first class sprites . With prototype-based programming , BYOB enables object orientation without an abstract class concept: New objects are created as copies of existing objects (so-called cloning ).

BYOB makes first-class objects clear

Cover picture of the BYOB manual with two examples: BYOB makes first-class objects clear

The game characters (sprites), program scripts, lists and other familiar from Scratch are first-class objects in BYOB that can be stored in variables and lists like numbers and strings. All operations that are directly applied to these objects can also be applied to the variables and list elements that contain these objects. Some operations like say / sage (speech bubble) and think / think (thought bubble), which in Scratch only relate to numbers, texts or lists of these, can be applied to all objects. Because program code can be saved and executed in variables and lists, new control structures and data structures can be freely defined that are equivalent to the basic structures of the programming language, which enables meta-programming: BYOB can be expanded in BYOB and is at the same time visual orientation one of the clearest programming languages ​​in which this is possible.

In this way, BYOB basically enables any conceivable control and data structure to be taught, either its implementation or its application. This is already comprehensible in the two examples from the cover picture of the BYOB manual, which is shown on the right. It contains two groups of images, each of which together form an example:

Use first-class objects

The yellow pawn in the lower left corner of the picture executes the say / say block on a list block that creates a list with the two pawns Sprite1 and Sprite2: This causes the list with the pawns to appear in the speech bubble.

Define control structures

BYOB does not include a programming command block for a for loop. However, this control structure can easily be defined and then used as if the For block were a normal part of the programming language, as the definition script at the top left of the figure shows. The local transfer variables i, start, end and action are defined in its header block . i is identified by the up arrow as a variable transfer variable that accepts the loop's run variable. The value transfer variables start and end are predefined with 1 and 10 if no other specifications are used when using the for loop block. The active program code that is to be executed inside a for loop is transferred to the action variable and executed as a parameter of the run block below in the definition script. With the help of the repeat block belonging to the BYOB language component, a for loop is recreated. In the example script on the right, the resulting block of the for loop is used twice nested in one another: When executed, the yellow pawn on the right counts ten times from 3 to 5.

Limitations to Scratch

Until the development platform drifted apart (with Scratch 2.0 / BYOB 4.0), BYOB was based on the Scratch source code implemented in Squeak and was upwardly compatible with it. A major limitation of BYOB, like all other scratch modifications, was the lack of a web-enabled player for the projects created with it. In addition to all the other resources required for this, the technology basis for an online community platform comparable to Scratch was missing. Like traditional programming-learning environments, BYOB relied on purely local availability.

BYOB 3.x projects can only be published online after a manual conversion into scratch projects, whereby all BYOB capabilities must of course be dispensed with. As in Scratch 2.0, however, in BYOB 4.0 not only the projects can be played in the web browser, but the entire development environment is also available online without installation. Both systems can be used today (early 2013) in the pre-release stage. It is not known whether an online platform will be created and established based on this for BYOB 4.0 (or Snap! See below), as for Scratch.

BYOB 4.0 / Snap!

Working with BYOB4.0 / Snap !: Screenshot

In contrast to most of the other modifications, the upcoming version is no longer based on the source code of Scratch itself, but has been completely rewritten because, as with Scratch 2.0, the aim is complete online availability of the project player and development environment.

BYOB 4.0 becomes Snap!

The new name Snap !, which is used from BYOB 4.0, is onomatopoeically derived from the snap-in of the programming blocks when they are connected to one another to form the program scripts of a Snap! Project.

The background to this renaming is that BYOB has another, in English even better known meaning than Build Your Own Blocks . This second meaning bring your own beer / bottle ("Bring your own bottle / beer", see Buddelparty ) ultimately appeared to be too misleading for an application in the educational sector.

Technology and online availability

As with Scratch 2.0, the Snap! and thus the player is available directly in the web browser without installation. For this purpose, Squeak Smalltalk, the previously common basis of Scratch and BYOB, was abandoned and - as with Scratch 2.0 - a completely new development was carried out on a web-enabled platform that should run in common web browsers without installation. While Scratch 2.0 is based on Flash , Snap! HTML5 canvas and JavaScript used as platform . On this basis, the Morphic known from Squeak was newly implemented and became the basic graphic library of Snap !.

Alternative to scratch on iPhone / iPad / iPod

Snap! an alternative to Scratch on Apple's mobile devices (iPhone / iPad / iPod) and other platforms on which Java and Flash are not supported and thus neither the Scratch project player of Scratch 1.x nor the development environment of Scratch 2.x are executable. However, the Snap! only in the alpha stage and is not yet fully compatible with Scratch.

publication

Snap! Manual cover

Snap! has been publicly available on the Internet since its development began in 2011 and is currently (February 2013) largely usable, including language versions in German and a dozen other languages. The current status of Snap! is specified as alpha by the developers. With the addition of a cloud server, a beta stage is to be initiated in 2013 and a first official completion point is then to be defined in the short term, but - due to the permanent usability beforehand - one cannot speak of a correct publication time. An official English language guide to Snap! was published in early 2013.

Cooperation between scratch and BYOB development

Thanks to intensive cooperation between Scratch and BYOB developers, concepts that have been tried and tested in BYOB are regularly incorporated into Scratch, such as For example, the scratch lists, which were implemented in BYOB long before they were introduced in Scratch. The ability to define your own new programming blocks will also be incorporated into the new Scratch 2.0 version - albeit in a simplified form, without input and output parameters. While the smaller BYOB development team attaches greater importance to the quick decision for innovations, the larger Scratch development team relies on longer practical evaluation before a new concept is officially introduced, which - due to the younger target group and the much larger user community of Scratch - makes sense. Since a less established but more promising platform was chosen for BYOB 4.0 with JavaScript and HTML5, it can be assumed that in this case too it could have an impact on future Scratch versions after 2.0, especially if the established platform chosen for Scratch 2.0 is Flash should actually be in decline and thus be available on fewer and fewer systems, which is already indicated by some.

Individual evidence

  1. Snap! (Build Your Own Blocks) - ( Berkeley University's Official Snap! Site )
  2. ^ Bringing “No Ceiling” to Scratch: Can One Language Serve Kids and Computer Scientists? - Paper Constructionism 2010, Paris, Brian Harvey & Jens Mönig
  3. Chirp's homepage ( Memento from April 25, 2014 in the Internet Archive )
  4. ^ Brian Harvey in the English language Wikipedia
  5. Report: Jens Mönig on Scratchday 2013 in the DACH-Scratch-Wiki, accessed on October 6, 2013
  6. Mark Guzdial in the English language Wikipedia
  7. Blog entry by Jens Mönig ( memento from September 22, 2013 in the Internet Archive ) on the advice of the Snap! Team by John Maloney, Dan Ingalls, Mitch Resnick, Mark Guzdial and Alan Kay, accessed January 28, 2013
  8. Collaborative Research: Type I: FRABJOUS CS - Framing a Rigorous Approach to Beauty and Joy for Outreach to Underrepresented Students in Computing at Scale ( Memento of the original from March 5, 2016 in the Internet Archive ) Info: The archive link was automatically inserted and not yet checked. Please check the original and archive link according to the instructions and then remove this notice. (PDF; 248 kB) @1@ 2Template: Webachiv / IABot / bjc.berkeley.edu
  9. Snap online presence! at the University of California, Berkeley. Executable directly in the JavaScript-enabled browser.
  10. Homepage of the lecture "The Beauty and Joy of Computing"
  11. ^ The beauty and joy of computing (BJC), AP CS principles, and the CS 10K effort Dan Garcia, published in the Journal of Computing Sciences in Colleges, Volume 27 Issue 5, May 2012, Pages 126-127
  12. Representation of the lecture "Beauty And Joy Of Computing (BJC)" on the platform of the CS10K Projects Community ( Memento of the original from May 1st, 2015 in the Internet Archive ) Info: The archive link was inserted automatically and not yet checked. Please check the original and archive link according to the instructions and then remove this notice. @1@ 2Template: Webachiv / IABot / cs10kcommunity.org
  13. The CS10K Project: Mobilizing the Community to Transform High School Computing (PDF; 145 kB), Owen Astrachan (Duke University), Cameron Wilson Director (ACM Office of Public Policy), Jan Cuny (National Science Foundation), Chris Stephenson (Executive Director, CSTA)
  14. Moodle version of the Berkeley lecture “The Beauty and Joy of Computing”  ( page no longer available , search in web archivesInfo: The link was automatically marked as defective. Please check the link according to the instructions and then remove this notice.@1@ 2Template: Dead Link / veritas.eecs.berkeley.edu  
  15. Videos Lectures and Videos Lab events of the Berkeley lecture "The Beauty and Joy of Computing" from 2012
  16. Example of a Berkeley CS10 Final Exam from 2010 using BYOB / Snap! (PDF; 883 kB)
  17. OOP with BYOB, Prof. Dr. Eckart Modrow, LOG IN issue No. 171 (2011) (PDF; 575 kB), accessed on January 27, 2013
  18. Visual programming - or: What do you learn from syntax errors ?, Prof. Dr. Eckart Modrow, January 9, 2011 (PDF; 83 kB), accessed on January 27, 2013
  19. Why Java ?, Prof. Dr. Eckart Modrow, Jens Mönig, Dr. Kerstin Strecker, LOG IN issue No. 168 (2011) (PDF; 557 kB), accessed on January 27, 2013
  20. Modrow2015-11-In the supermarket with SQLsnap (PDF) - accessed on December 17, 2015
  21. Modrow2015-11-News from BYOB-Snap! (PDF) - accessed December 17, 2015
  22. Lecture notes: "Informatik mit BYOB / Snap!" (PDF; 5.7 MB), February 9, 2013 by Prof. Dr. Eckart Modrow on the server of the Computer Science Teacher Training Center at the University of Göttingen
  23. Prof. Dr. Eckart Modrow: IT with Snap. Retrieved October 30, 2018 .
  24. DACH-Scratch-Wiki: Report from ScratchDay 2013 : The Gymnasium Sulingen is the first German school where BYOB was used from grade 7 up to the Abitur exam.
  25. Build Your Own Blocks (Scratch Modification) ( Memento of the original from July 17, 2018 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. in the DACH-Scratch-Wiki, accessed on January 27, 2013 @1@ 2Template: Webachiv / IABot / scratch-dach.info
  26. Game programming with Scratch and BYOB, seminar Didactics of Computer Science 3rd semester, Michael Heinelt, winter semester 2011/12 (PDF; 3.2 MB), accessed on January 27, 2013
  27. Snap! in the DACH-Scratch-Wiki, accessed on January 27, 2013

Web links

  • Official Site Snap! Computer Science Division, University of California, Berkeley