Description #
Snap! is a block-based, visual programming language designed for teaching computer science concepts through accessible and engaging drag-and-drop programming. It allows users to build advanced abstractions and supports recursion, higher-order functions, and custom blocks.
History #
Snap! was developed at the University of California, Berkeley, by Jens Mönig and Brian Harvey. It is based on Scratch but was designed to introduce more advanced programming ideas suitable for high school and college students. Snap! is widely used in introductory computer science courses, including the Beauty and Joy of Computing (BJC) curriculum.
Hello World Code #
[when green flag clicked]
[say (Hello, World!) for (2) seconds]
(Note: This is a visual block-based interface; above is a text representation)
How to Run #
Option 1: Online
- Use Snap! directly in your browser:
https://snap.berkeley.edu/run
Option 2: Local
- Snap! can be downloaded and run offline via the “Download Source” button at https://snap.berkeley.edu
Key Concepts #
- Drag-and-drop block interface
- Visual syntax for beginners
- Custom blocks (procedures)
- Recursion and higher-order functions
- Variables and lists
- Event-driven programming
- Visual control flow (loops, conditionals)
- Sprites and stage-based design
- Cloud storage of projects
- Suitable for advanced CS education
Try It Online #
Fun Facts #
- Snap! extends Scratch with more powerful computing concepts like lambdas and closures.
- It’s used in AP CS Principles classes and university-level computing education.
- Snap! allows exporting projects as standalone web pages.