To my parents
Asha and Bindumadhav Joshi
All rights reserved by the author
Published by:
SPARK Institute and Publications
16668 NE 121st ST
Redmond, WA 98052 USA
st edition: 5 October 2020
To order your copy:
Go to Amazon.com
Or write to: abjoshi@yahoo.com
Cover design by
Ravindra Pande
Other books in this series:
http://www.abhayjoshi.net/spark/csseries.pdf
Background
Snap! is a programming language that is based on MITs Scratch. You can run it in any web browser by using the link http://snap.berkeley.edu. In the subsequent discussion I am going to call it Snap (instead of Snap!).
The idea of using computer programming as a medium for learning is rapidly gaining acceptance. The benefits of learning programming and computer science concepts well before college even in elementary grades are well-understood.
Here is a list of some of the amazing things that happen when students engage in computer programming:
- Students become active and creative learners, because they explore ideas through a hands-on activity with an infinitely powerful tool.
- They learn to think about and analyze their own thinking , because that is the only way to program computers.
- They learn to solve complex problems by breaking them into smaller sub-problems.
- They learn a new way of thinking (called "computational" thinking).
- In the world of programming, answers are not simply "right" or "wrong"; this prepares a student's mindset for real-life problems.
- Students' learning processes are transformed from acquiring facts to thinking creatively and analytically
About this book
Snap is a powerful language and offers access to lots of advanced ideas of Computer Science some of which are appropriate for a college-level programming course.
There is a lot of material on Snap Programming on the Internet, including videos, online courses, projects, and so on, but, most of it is introductory. There is very little that can take students to the next level, where they can apply their Snap and CS concepts to exciting and challenging problems. There is also very little material that shows students how to design complex projects, and introduces them to the process of programming.
In short:
- This book is for students who are already familiar with Snap its various commands, and its user interface and basic CS concepts such as, variables, conditional statements, looping, and so on.
- The book attempts to teach students how to "design" programs through a series of challenging and interesting projects on science simulation, games, puzzles, and math problems.
Where to learn Snap and CS concepts
The projects covered in this book are all based on a variety of CS and Snap concepts. This book does not attempt to explain these concepts. If you are a newcomer to Snap and/or CS, I recommend to you my other book " Learn CS Concepts with Snap ".
What is in the book?
I have organized the book as a series of independent Snap projects each of which describes how to design and build an interesting and challenging Snap program. Each project progresses in stages from a simple implementation to increasingly complex versions. You can take up these projects in any order you like, although I have tried to arrange them in an increasing order of challenge.
Programming is a powerful tool that can be applied to virtually any field of human endeavor. I have tried to maintain a good diversity of applications in this book. You will find the following types of projects:
- Arcade games
- Puzzle games
- Simulations
- Math games
- Geometric designs
- Optical illusions
Learn the concepts through application
As the experts will tell you, concepts are really understood and internalized when you apply them to solve problems. The purpose of this book is to help you apply Snap and CS concepts to solve interesting and challenging programming problems. Every chapter lists, at the very start, the Snap and CS concepts that you will apply while building that project.
Learn the design process
Besides these technical concepts, you will also learn the " divide and conquer " approach of problem-solving. This is a fancy term for the technique of breaking down a bigger problem into many smaller problems and solving them separately one by one.
You will learn a bit about a program design technique called " object-oriented thinking ". Without going into its gory details such as classes and inheritance , the book tries to show you how you can view each program as a collection of independent objects that cooperate to deliver a coherent experience.
You will also learn the " iterative design process " for designing programs. This is another fancy name that describes the idea that something complex can be designed in a repeated idea -> implement -> test cycle, such that in each cycle we add a little more complexity.
Finally, you will learn a bit of " project management ". Project management helps you undertake a project such as painting your house, celebrating your sisters birthday, or creating a complex computer program and complete it in a reasonable time, with reasonable effort, and with reasonable quality. It involves things such as planning tasks, tracking their progress, etc. When you undertake the programming projects in this book, you will learn some of these project management techniques.
Audience for the book
The book is intended for students who are already familiar with Snap. The level of challenge is tuned for high-school students and above, but middle-school students who have picked up all the concepts in an introductory course might also be able to enjoy the projects presented in this book.
The book would be a great resource for teachers who teach Snap programming. They could use the projects to teach advanced tricks of programming and to show how complex programs are designed.
Finally, the book is for anyone who wants to get the wonderful taste of the entertaining and creative aspect of Computer Programming.
Hardware/software and program files
You can do all your Snap programming work online by creating your own account at http://snap.berkeley.edu.
The scripts of every project in this book can be seen in the link given at the end of every chapter. In addition, there are starter files and intermediate program versions, all of which are available free of cost upon request: please write to me at my email address below.
If you purchased a printed copy of this book, all images would be gray. The color images (organized by chapter) are available for free download at:
http://abhayjoshi.net/spark/snap/book3/images.zip.
Abhay B. Joshi (abjoshi@yahoo.com)
Seattle, USA
5 October 2020
Acknowledgements
I wish to thank Tanuja Joshi for reviewing the material of this book diligently and tirelessly and for providing me with valuable suggestions. I wish to thank Ravindra Pande for creating a truly beautiful cover for the book.
I wish to thank TEALS (https://www.tealsk12.org) a nonprofit organization dedicated to the cause of teaching computer science to all high school students for allowing me to teach Snap using their remote classroom infrastructure.