Google Codelabs — Writing Lab Manuals is Fun Again!

Warning: this is going to be a short post linking to somebody else’s really cool work. Want the tl;dr? Go check out https://codelabs.developers.google.com/ for existing tutorials and https://github.com/googlecodelabs/tools for authoring your own!

If you have interacted with me in any sort of teaching capacity, I’m going to guess the topic of Google Cloud has come up at some point. Again, not sponsored by them, but I think they’re doing really great things to support educators in the classroom.

Codelabs are one of the things that they regularly publish to share how to use some of the neat toolsets and APIs that are available. Here’s a quick example of my favorite one. You setup a worldwide HTTP load balancer using virtual machines on Google Cloud Platform (GCP).

Google Codelab: https://codelabs.developers.google.com/codelabs/cloud-load-balancers/

Aside from actually spinning up web servers in any location that Google has a data center (tell a college junior they just spun up a web server in Asia and watch the reaction … it’s quite fun), you get this nice, clean interface. You see the steps on the left, the current page on the middle, the time remaining, etc. Essentially a nifty little lab manual in the making.

But then, then the neat part hit. You can author these in either Google Docs or in Markdown. Meaning, if you like writing your lab manuals in something like Word, you can pretty easily export them to an easily-followable website. Or, in the case of Markdown, you can track your labs under revision control and make updates year to year. (I like the latter … helps that I enjoy using vim to write, well, everything).

For instance, here’s a snippet of Page 1 from a Codelab I’m currently working on. Nice, clean, beautiful Markdown:

summary: Interfacing a Raspberry Pi with Unity
id: pi-unity-overview
categories: iot
tags: raspberry-pi, unity
status: Published
authors: Erik Fredericks
Feedback Link: http://efredericks.net

# Interfacing a Raspberry Pi with Unity

## Overview
Duration: 1

### What You’ll Learn
- How to interface a Raspberry Pi Sense Hat with Unity
- How to transmit and receive UDP packets
- How to use real-time sensor data to rotate an object in Unity

### Setup / Assumptions
- A Raspberry Pi with a Sense Hat is already installed
- See [Getting started with the Sense Hat](https://projects.raspberrypi.org/en/projects/getting-started-with-the-sense-hat) if you are unfamiliar with using this device
- Unity is installed on your machine
- See the [Unity homepage](https://unity.com/) for installation instructions
- Both devices are on the same network

![piUnity in action](assets/piUnity-demo2.gif)

Do yourself a favor and check it out. Here’s a link to their GitHub repository that explains everything in great detail. If you don’t want to trawl through the repo, there is an excellent Medium article written up that holds your hand throughout the entire process.

I’ve been meaning to transition all my course materials to be under source control (as a move towards open-sourcing all my teaching materials), so this is a step in the right direction for me.

Here’s a bonus screenshot of my test Codelab, let the hype intensify for future blog posts and Codelabs about Unity and Pi’s!

Super secret screenshot, shh.