Syndicate content

Bill Gates did it, will.i.am did it, Mayor Bloomberg did it and even the POTUS did it. Shouldn't you? An hour of Code for *you* the Busy Development Professionals

Tanya Gupta's picture

Computer Science Education Week has already kicked off (December 5 - 11, 2016) and it is a pretty big deal. One hour of code for everyone (no experience needed) is a part of that. The focus is on getting children involved. But what about busy professionals? Can it be useful for them, too? We think the answer to that is yes. This blog will teach you to code in Google Apps Script (GAS for short) in sixty minutes or less. There are two main reasons we chose GAS.

One, GAS is an easy to use scripting language that can help you write programs to solve common coding problems. We chose GAS because it is very easy to get started and offers some great features for saving your files in the cloud and working with different kinds of files. You need to be able to use Google Drive to write basic scripts in GAS.

Secondly, as our regular readers may know, this is the seventh blog of the technology aided gut (TAG) checks series. So far in this series, we have focused on the tools and techniques of a just-in-time learning strategy, and how to use TAG checks to make conclusions about data. In this blog we wanted to focus on some basic programming that will help illustrate how powerful (and easy!) just a little code education can be. GAS is perfect for this purpose.

N.B. You can do some pretty nifty stuff in GAS and here is the result of more professional code we have written entirely in GAS. This is an Add-On for Google Docs to create word clouds

Now -- all you need is a gmail account to get started.

(͡• ͜ʖ ͡•) GET SET AND START YOUR CLOCK
MINUTE TO MINUTE
While logged into Gmail, go to https://drive.google.com/. If this is your first time, you will see something like this:


 


Once you click through the arrows you should see this:

 

MINUTE TO MINUTE

While typical “Hour of Code” exercises might use 15 or 20 minutes for an exercise like this, the audience for this blog is likely to complete this part very quickly - perhaps just a minute if you type fast.
 
Hour of Code 2016: Hello World

Gotcha
  • Make sure the function you are running is selected
  • And then run it
  • View ->Logs shows you the result of the function that has run


MINUTE TO MINUTE  
Now let’s do something more interesting. Next we will use an open API to find out all about your favorite film. I used “Gone with the Wind”.
 
How to make a basic API call in Google Apps Script


And here’s the link to the above two simple functions on GAS.


More experimentation? Try using YOUR favorite film in Line 6.

if your film name has spaces, make sure to separate it by a “+”. For example Suicide Squad would be  Suicide+Squad


And check View -> Logs to see what you get!

 

Time’s up!

If you found that fun, here is a site you find some scripts you can use. If you want more “hour of code” blogs, let us know below
 

Let us know

Follow PublicSphereWB on Twitter!
 

Add new comment