Many of us want to teach our students coding, but don't necessarily have much chance to practice coding. After all, many coding examples for kids are to make video games or move toy robots. These are all great and meaningful example of coding for students. They aren't always as engaging for teachers. We wanted to give teachers a chance to practice coding in something that was meaningful to them. Because many teachers use the Google Suite, we chose Google Apps Script. Apps Script is a perfect chance for teachers to practice coding, as they add functionality to Google documents they make for their students or create tools to help them in their classroom.
This is a chance for you to be the software engineer and make something valuable to you and your colleagues. Here are lessons and resources to help you as you code in Apps Script.
Before we actually start coding in Apps Script, we're going to learn a bit of coding basics using a block based programming language named Teacher Blocks. I wrote teacher blocks as a part of my Google Innovator project based on Google's Blockly. Essentially it creates a user interface so that before you write actual code, you can simply move blocks to generate the JavaScript/Apps Script code. You can try out Teacher Blocks here.
Hello World is often the first program that students write. All it does is write "Hello, World!" on the screen. We are going to have a simple program that will write hello world to our document. Teacher blocks already had "Hello, World!" completed when you start, but this example adds "Good Coding!" to the end of the program. So when this code generated when you click the large blue Generate JavaScript button is pasted into the code editor, hitting run prints into your Google Doc, "Hello, World! Good Coding!"
One of the strengths of programming is the quick calculating. We can have calculations easily processed in a computer program even with blocks. If you have done some formula work inside of a spreadsheet then you have the skills for writing code.
This example above has a loop in which "Hello, World!" is written 9 times. An expression is created "(5+4)." This evaluates to 9 and the loop prints the phrase 9 times.
The User Interface is an important concept in programming. It is usually how we use code, from pressing a button to swiping on a screen.
In the above example we add a button that calls a function called "greeter." This function runs our code telling the editor to print "Hello, World!" It means that the user can select when it wants the document to add whatever code we have written with the click of a button.
We can add multimedia like youtube into our Google documents to make them even more interactive. This example add a popup video to explain how to wire a servo to a pybadge, when a student selects a menu item.
Create a simple Google Doc using Teacher Blocks that will create a heading to a document and a signature that represents you. This could be multimedia, or just text to tell about who you are.
This is a quick introduction to coding in Apps Script with a Hello World program that types text into a Google Doc. We can use this ability to add responses to student work directly in their assignment.
This lesson shows how to create a simple Hello World program using Apps Script. We also talk about California Computer Science Standard K-2.NI.4. The Google Doc in this video can be copied here.
Let's take a quick look at a simple tool within the Google Suite using Google Sheets. We will also cover California Computer Science Standard 6-8.AP.11: Create clearly named variables that store data, and perform operations on their contents. A copy of this Google Sheet can be found here.
This is a quick introduction to using the Google Apps Script to code new functionality into Google Slides. It also covers California Computer Science Standard 6-8.IC.24. A copy of this Google Slide can be found here.
This Episode of Fast Apps Script for Teachers shows how we can take information from a google sheet and export it as a bullet point list or comma separated values. We will also cover 6-8.DA.7: Represent data in multiple ways. A copy of this google sheet can be found here.
Make a Google Document that generates data, makes statement or carries out an office suite task. You can share your creation to us. Document how you did this and the eventual goal of your program. This should take approximately 1 hour.
This starts a multipart project creating a popsicle sticks app that exists inside of a Google Sheet. We'll cover a new California Computer Science Standard in each lesson.
In this first part we create the basic program. We are also looking at California Computer Science Standard 3-5.AP.12. We'll write a popsicle sticks app to choose a student at random when a button is pressed. This is an example of writing a program with an event.
This video teaches teachers how to use Apps Script to code their own tools. We are adding the ability to gather data to our popsicle stick project. We are also covering California Computer Science Standard 3-5.AP.12: Create programs that include events, loops, and conditionals.
We are adding a button to our popsicle stick tool to allow teachers to choose from students who need extra help with the material. While we implement this feature we'll be learning California Computer Science Standard 3-5.AP.12: Create programs that include events, loops, and conditionals.
We are adding a reset button to our popsicle stick app by using some code from a counting program. In so doing we'll learn California Computer Science Standard 3-5.AP.14: Create programs by incorporating smaller portions of existing programs, to develop something new or add more advanced features.
Develop your own improvement to our Popsicle Sticks app. Draw out your idea for the improvement on a Google Drawing or inside of a Google Sheet. A copy of this Google Sheet can be found here. This should take 2 hours.