Copyright 2020 by Rockridge Press, Emeryville, California
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the Publisher. Requests to the Publisher for permission should be addressed to the Permissions Department, Rockridge Press, 6005 Shellmound Street, Suite 175, Emeryville, CA 94608.
Limit of Liability/Disclaimer of Warranty: The Publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the Publisher is not engaged in rendering medical, legal, or other professional advice or services. If professional assistance is required, the services of a competent professional person should be sought. Neither the Publisher nor the author shall be liable for damages arising herefrom. The fact that an individual, organization, or website is referred to in this work as a citation and/or potential source of further information does not mean that the author or the Publisher endorses the information the individual, organization, or website may provide or recommendations they/it may make. Further, readers should be aware that websites listed in this work may have changed or disappeared between when this work was written and when it is read.
For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the United States at (866) 744-2665, or outside the United States at (510) 253-0500.
Rockridge Press publishes its books in a variety of electronic and print formats. Some content that appears in print may not be available in electronic books, and vice versa.
TRADEMARKS: Rockridge Press and the Rockridge Press logo are trademarks or registered trademarks of Callisto Media Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. Rockridge Press is not associated with any product or vendor mentioned in this book.
Interior and Designer: Suzanne LaGasa
Art Producer: Sara Feinstein
Editor: Caitlin Prim
Production Editor: Jenna Dutton
Illustrations 2020 Ryan Johnson. courtesy of Grant Burke.
ISBN: Print 978-1-64739-638-1 | eBook 978-1-64739-639-8
R0
To my daughter, Claire.
May you never lose your sense of wonder.
Contents
Are you interested in coding? This book is going to teach you how to think and solve problems like a computer programmer! Well start with an introduction to the basics of coding and then take some first steps into using Scratch, a fun coding language. Next, you will discover important coding concepts that will become the tools in your toolbox for making programs. These chapters will lead you through three different activities, each a little more challenging than the one before it. After we finish building your toolbox, well work together to make a really cool game where youll fight off a fire-breathing dragon so you can return a wizards wand! Then youll feel confident and ready to create anything you can imagine!
This book also includes several important sections at the end. You can flip ahead anytime to check out for great ideas for what to do next!
Make sure you ask a parent or guardian for permission before logging into Scratch or downloading it from the Internet. Thats just a good safety tip to remember anytime you are going to a new site online.
The good news: kids are awesome coders. Youre smart and curious, and you enjoy using a computer, right? Thats all you need to get started.
So, are you ready to learn how to code and learn this cool new language? Greatlets start building your toolbox of skills!
Programming is really funbut first you might be wondering, What exactly is programming?
Programming is basically just us humans telling our computers what to do. You are already telling computers what to do all the time. Didnt you tell your computer to open up your saved report so you could print it for school? Well, yesbut theres a whole lot of other directions your computer needed to print that paper.
First, when you clicked on the icon for your report, your computer knew it needed to open up that exact file and display your report.
If you decided to type a few more sentences, your computer needed to know what letter to display for each key that you tapped on.
Even the simple act of moving your mouse across the screen to click on the print button required lots of directions for your computer.
These instructions that you dont see, but your computer is following, are referred to as code . This is why people who are programming are also said to be coding. They create all those instructions that your computer follows. Whenever you interact with an electronic device, it is constantly checking its code, following all the directions that someone has programmed for it. It doesnt have a brain like you or me, so it depends on this code to tell it what to do.
So why should you care about all that code? Its not something you can actually see happening. You just get to kick back and enjoy all the great stuff that its making your computer do.
But havent you ever wished that your computer could do something else or maybe just do the same thing but better ? Like, instead of clicking the arrow keys to make your ninja character move in a game, wouldnt it be cool if the ninja just followed your mouse instead?
If you know how to program , you can decide what instructions you want your computer to follow! You can make it behave any way that you want. You get to be the creator. Its kind of like the difference between a reading a story and writing a story. Sure, reading a story is fun, but how much cooler is it to use your imagination to make up your own story and then share it with your friends?
Learning to code doesnt mean you have to grow up to become a professional programmer, although you can if you want to! Learning to code is valuable for anyone because it teaches you how to take apart a problem and solve it.
Creating your own programs will also help you learn the process of design, which means starting with an idea you have in your head and making it actually happen! Most importantly, programming helps you really understand what goes on inside the technologies that you use all the time.