WEMS Coding Winter 2019

Chris Kefalas, 2019-02-14, Classes

coding, computer science, github

Description

Students will gain or expand their coding knowledge through a variety of programming languages and projects based on experience level, building from visual-based languages to Python. They will apply practical computer science skills such as source code control, software design, reverse engineering, bug resolution, and coding environments.

Instructors

Lead Instructor

Chris Kefalas

Class Session Learning Objectives

On the line Resources

Repos

Related Blog Notes

Previous Classes in this session

The summary of our previous classes.

Day 6

GitHub - your online portfolio

We'll discuss GitHub, what it is and create an account.

The students will setup their GitHub account. We'll cover how GitHub is also a public/social place and therefore our "Internet Safety" rules apply to GitHub as well. Also, because GitHub can become a digital portfolio that is used by future schools and employers during an application process, it is actually even more important to maintain a serious presence on GitHub since it is a real-time personal resume.

Git it?

Out of Desk

Using physical paper and file folders, our class activity will be a real-world analogy for GitHub. GitHub maintains all versions of the document (or code) you are editing -- for the activity the "GitHub" person will hold on to many file folders (a repository), each one representing previous versions with the one on top being the most recent.

When a student wants to edit the latest, she requests the latest from "GitHub", who will actually present a COPY of the latest for the student to edit.

She takes the paper from the folder and makes some edits.

She puts the paper back in the folder, committing those changes to her copy of the folder.

She then hands the folder back to "GitHub", pushing those changes so that they can be included in the latest version of the folder.

Hands-On/coding

Using a prepared GitHub repository, students will use the GitHub web editor to make changes to a website. Since GitHub also supports the publishing of websites, the students can immediately make see their changes on a live website. Their take-away from this class is a live website they can edit!

One thing to remember

GitHub is your online Digital Portfolio.

Setup

Create a repo with gh-pages turned on (pointing to /docs). Add a simple HTML/CSS website for the students to edit. We can go ahead and use a custom domain like wems.techemstudios.com to make it easier for the students/parents to access.

Actual

This is the play by play for day 6!

Day 7

Cloud9 - Coding in the Clouds

The students will do some text-based programming using the Python programming language. They will be using Python in an environment they can access from anywhere (with an Internet connection and browser) -- an environment aptly named Cloud9.

Py in the clouds

Out of Desk

Starting with a discussion about the origin of the term "Cloud 9", we'll discuss how coding today is actually quite different than it was even 5 years ago. There are more computing services available "on the cloud" while the speed and availability of the Internet has increased. So, using students to represents "computers in the cloud", we can act out how we will be accessing "desktops" in the cloud to do our work.

Hands-On/coding

Each student will have his/her own Cloud9 environment. They will each use a separate Tech Em AWS (Amazon Web Services) login to access this environment -- a virtual desktop loaded with everything they need to code in Python (and many other languages), pre-configured so we can focus on learning the language and typing programs. Initially, they need to get used to accessing a code editor and a computer console in their browser. They will learn how to create new Python files, run them, and even learn what to do when there are errors.

One thing to remember

They should know how to create a Python file and run it (in their environment) -- coding is bliss in the cloud.

Setup

Prior to class, we created each student's Cloud9 environment. In doing so we also create them an AWS (Amazon Web Services) login in the Tech Em account. They will have a username and a beginning default password along with a unique link to their Cloud9 environment. The first time they access their environment they will need to provide their username and password and immediately change their password.

Actual

As was to be expected, one of the biggest challenges here is "traditional" typing. The students were using our Chromebooks to access Cloud 9. So, while the Chromebooks and Wi-Fi held up nicely, lots of typing on a traditional keyboard can be a challenge. We are often seeing students who can likely type faster using a phone-thumb input than a full-sized qwerty keyboard. We imagine computer input will evolve and for now (much as it evolved from separate keypunch operators to programmings typing in their own code), For now, typing without touchscreen input is an area where programming is like a musical instrument or sport and the key is practice, practice, practice.

Day 8

GitHub + Cloud9

Different clouds working together. Now we have a "laptop in the cloud" with its own set of folders -- we will learn how to "git" our code from the GitHub cloud onto our Cloud9 environment. Students will explore how to commit, push and pull their changes from Cloud9 to/from GitHub.

Git it?

Out of Desk

We will revisit the GitHub activity with a new twist, err, umm. cloud. We have a new player now, Cloud9. This player is not all that different than using a desktop or laptop and Git. We'll continue with the students acting as themselves, Cloud9 and GitHub to pass along documents (code) in folders in order to continue providing that physical representation of all this virtual activity!

Hands-On/coding

Students will go back to the Website HTML -- this time, in their Cloud9 environment. They will use the same editing skills from last week and add some new skills to pull (update) the code from GitHub to Cloud9; commit their code in their Cloud9 environment and then push that new code to Cloud9. The "latest in wins" game from 2 weeks ago will continue, but with a twist. Their pushes will be blocked if they don't have the most recent code. This is intended to drive home the fact that GitHub maintains the primary repository for their code; each of their Cloud9 environments has a copy of what is in GitHub and it is actually up to them to keep their copy up-to-date.

The passive intent here is to have students experience the issues a team has working on "the same document" at the same time. We will come back to that in future classes to discuss how team organization and additional Git capabilities can be used together to overcome these issues.

One thing to remember

A pull a day keeps the conflicts away!

Setup

For Day 7 setup, the Cloud9 environments that were setup included a copy (clone) of the website repo. Therefore, students will already have that code available. They'll need to immediately pull from the repo as a start to this lesson.

Actual

Lots of typing, but the students are getting used to coding in a "text-based" environment while also using a text-based command-line interface as part of a development workflow.

Day 9

Cloud9 + Python

We will go back to coding in the clouds. Practice makes perfect and we want to ensure the students remember how to access their coding environment and create their own Python files so they can practice coding at home. They'll work more on running and debugging within the cloud environment. And finally, they'll do a git pull to grab some python web app code we have ready for them to test.

Python!

Out of Desk

This time, it is up to the students to explain to us all the different sites we use in the cloud and how they fit together. Where is GitHub? Where is Cloud9? Where is the chromebook? We can use this as an opportunity to introduce the concept of a computer process so we can talk a bit more specifically about each process and where that process is running (locally on their chromebook, in the cloud in AWS or in the cloud on GitHub).

Hands-On/coding

Students will follow along while we create another Python file, edit it and run it. We'll review some basic Python terms and syntax: literals, expressions and statements. We'll review code blocks and how they are delineated in Python. Then we'll review conditions, conditional blocks as well as functions and function definition blocks.

One thing to remember

if True:
  print("Python is great!")

Setup

For Day 9 setup, they'll need to get back on their Cloud9 environment and pull from the MyFirstWebstie repo to make sure they are in sync.

Actual

Overall it went pretty well -- our biggest slow down still is getting everyone signed in. Cloud9 and really any IDE has been a little bit overwhelming for kids with all the buttons and options. So we have tried to focus on the File Manager to the left, the Terminal along the bottom, and the text editor in the middle.

We are not concerned though! I think thatthey will all feel much more comfortable in Cloud9 with practice and we can start really focusing on the code. The process is a bit distracting right now, and not as fun. But once they get it down, it's EZ PZ. We will all just use the same password for now though to limit difficulty on that front.

Closing

This has been a great session and the kids are using real-world tools and a real-world programming language. They are now armed with the tooling and basic skills to tackle a project. And working on a project is exactly what they need to apply these new skills -- getting lots of practice in this "cloud coding" environment so it becomes as easy as playing Fortnite.