Wednesday, March 18, 2015

Learning Google Script: 5 Best Sites & Tutorials to Bookmark

Matthew HughesOn 18th March, 2015

How often do you use Google services? If you’re like me, the answer is “all the time”. I use Google Drive to store files. Sometimes, I use Google Docs to write articles (although I prefer Apple’s Pages and iA Writer more). I use Google Forms for making surveys. I use Google Chat to talk to friends. Google even made the software that powers my laptop and cell phone.

It’s hard to think of an area in which Google hasn’t touched our digital lives, for better or for worse. But here’s the thing. It’s never been easy to integrate Google services with each other. For the most part, they’ve existed as detached and disparate entities. Until now, that is. Meet Google Apps Script.
What Is Google Apps Script
Google Apps Script is perhaps one of the most useful tools you can have in your technological toolbelt. It allows you to tie Google services together in a way that’s reminiscent of IFTTT. But it’s way more than that.

It’s an IDE (Integrated Development Environment), that runs in the browser. No installs necessary. Google Apps Script also offers a platform to run your code on, much like the ScraperWiki Platform, or Amazon Web Services, or Heroku does. The most obvious advantage of this is that it allows you to run your code from the cloud, and to be able to work from a variety of devices. It’s truly platform agnostic.

Google Apps Script is also a scripting language for Google Sheets, in the same way Visual Basic for Applications is a scripting language for Microsoft Excel. This gives you an incredibly high degree of control and customization, especially compared to simple formulas.

You can even use Google Apps Script to build web applications. Yes, you read that right. Web applications.

At this point, Google Apps Script has probably got you champing at the bit. But how do you learn it? Well, to get you started, here are five resources that will help you in your path to becoming a Google Apps scripting master.
Yes, you read that right. CodeAcademy. Google Apps Script is based upon the highly popular JavaScript programming language, which is a complicated beast with a very precise and elaborate set of syntax. To learn Google Apps Script, you’re going to need (at the very least) a basic understanding of JavaScript. For this, I recommend CodeAcademy.

CodeAcademy is often criticized as not encouraging the creativity required for becoming a developer. But for its shortfalls in this respect, it’s great at teaching the structure of a programming language. Best of all, it’s free.

Once you know how to code JavaScript, it’s probably a good idea to learn how to code JavaScript properly. With that in mind, I’d strongly encourage you to pick up a copy ofJavaScript: The Good Parts at your local bookstore. It’s a challenging read, but it will teach you how to write good, modern, and clean code.
Google Apps Script Documentation
There’s an impressive amount of documentation that is available online that promises to teach you the essentials of Google Apps Script. Some of it is better than others, and unsurprisingly the best example comes from Google themselves. They have published the most definitive guide to the Google Apps Script API, which covers all facets of its functionality.

Like all good documentation, it provides real-world examples of the API in practice, whilst explaining what it does. Typically for Google, it’s also really well written, and ultimately culminates in the reader having a strong grounding in how the system works.
Google Apps Script Samples
Some people learn best by reading a tutorial or a book, and absorbing as much information as possible. That’s fine. But some people have a learning style that is better suited to progress through trial and error. They require something a tad more practical. Does that sound like you? If so, you might find it helpful to look at the Google Apps Script Github, which has an amazingly rich supply of code examples.

Once you’ve gone through that, consider looking at ‘8 Surprisingly Useful Things You Can Do With Google Sheets and Google Apps Script‘ from How-To Geek. This has eight different ‘recipes’ that allow you to do anything from send a mail-merge email, to track Amazon price changes.
One of the more useful resources I’ve seen for budding Apps Script developers is found This site isn’t so much a set of structured tutorials, but rather a collection of programs that show you the flexibility and versatility of the platform. is a bit of a mouthful, but it’s one of the most helpful sites I’ve seen about Google Apps Script. The site comes with a number of really useful code examples. One allows you to download your Instagram photos to Google Drive, whilst another allows you to create your own Google Doodle for your Google Apps domain.
Google JavaScript Style Guide
Writing code is easy. Writing good code? Well, that’s something entirely different.

Different, but important. You never know when you might have to share your code with someone else. You never know when you might have to revisit a program in order to fix a bug, or add a new feature. You might have to show your code to someone else, in order to get their help. As a result, it’s crucial to get an understanding of how to write clean, readable code. For that, you need to check out Google’s JavaScript Style Guide.

This is a vital resource that teaches you how to write good, stylistically clean JavaScript. It’s what they use internally in Mountain View, so you know it’s solid advice. Best of all, it’s free. Although, it’s not especially easy to read. I’d recommend you check out Javascript: The Good Parts before attempting to this.

1 comment:

  1. Bluehost is ultimately the best hosting company with plans for any hosting requirements.