1 of 42

Github Classroom

10/3/18

Mike Shah, Ph.D.

1

2 of 42

This presentation will be recorded

(Note to self: Hit record)

2

3 of 42

What are we talking about in one slide?

  • How to use an online source control system to deliver and assist students with completing assignments for your course.

3

4 of 42

What are we talking about in one slide?

  • How to use an online source control system to deliver and assist students with completing assignments for your course.

4

The source control system is ‘git’

5 of 42

What are we talking about in one slide?

  • How to use an online source control system to deliver and assist students with completing assignments for your course.

5

‘github.com’ is the host

6 of 42

6

7 of 42

What is ‘git’ (1/3)

  • Version control system
    • Typically used for text-based files
  • It is decentralized
    • One or more people work on a ‘local’ copy of files in the repository on their machine
    • Then upload changes to an online repository.
  • A wonderful 30 minute tutorial exists here:

7

8 of 42

What is ‘git’ (2/3)

  • In a picture this roughly captures the workflow

8

9 of 42

What is ‘git’ (2/3)

  • In a picture this roughly captures the workflow

9

1

10 of 42

What is ‘git’ (2/3)

  • In a picture this roughly captures the workflow

10

1

2

11 of 42

What is ‘git’ (2/3)

  • In a picture this roughly captures the workflow

11

1

2

3

12 of 42

What is ‘git’ (2/3)

  • In a picture this roughly captures the workflow

12

1

2

3

4

13 of 42

What is ‘git’ (3/3)

  • When students ‘get’ the basic idea
    • Students like learning git and having that skillset
    • At the end of every term, students have sent me feedback that they are happy to have learned at least used the basics.

paraphrase of student:

“I enjoyed learning git and feel like it was a helpful real world skill learned in addition to the course material”

13

14 of 42

(Useful handout for more)

14

15 of 42

Github

15

16 of 42

[github.com] - A host for git repositories

  • This is a ‘web interface’ for ‘git’ the tool.
    • There exists other ‘hosts’ such as gitlab.

16

17 of 42

Github Classroom

(10 9 step walkthrough with my use cases)

17

18 of 42

Quick Overview

  • A clean interface to manage lots of courses, and student submissions.

18

My two current courses

My two current courses

19 of 42

#1 - Setup (The bare basics)

  • Create your github account
  • Sign in here https://classroom.github.com/
  • “Create a new classroom”
    • Create a new organization
  • Fill out a form to github requesting classroom services
  • Then setup your first assignment
    • Typically this is done by pulling in ‘starter code’ from a repository that I own.

19

20 of 42

#1 - Setup (The bare basics)

  • Create your github account
  • Sign in here https://classroom.github.com/
  • “Create a new classroom”
    • Create a new organization
  • Fill out a form to github requesting classroom services
  • Then setup your first assignment
    • Typically this is done by pulling in ‘starter code’ from a repository that I own.

20

You need to do this setup ~5 days before class to be safe.

github will grant you FREE private repositories after a short approval process.

21 of 42

#2 Manage Your Classroom (1/2)

  • Now that your classroom is created, you can perform some administration tasks

21

22 of 42

#2 Manage Your Classroom (2/2)

  • From this interface you can give your teaching assistants some access permissions to see student repositories
  • Giving TA’s this access is very helpful for debugging (especially when they answer questions posted on piazza)

22

23 of 42

#3 Creating an Assignment (1/3)

23

24 of 42

#3 Creating an Assignment (2/3)

  • Two choices depending on if students are working individually or in partners
    • With teams, when students ‘accept an assignment through a URL’ they will see a list of teams that they can join
      • (And you can cap the number of folks that can join a group)

24

25 of 42

#3 Creating an Assignment (3/3)

  • A form to fill out with the assignment name, and any starter code you provide.
  • Key notes:
    • I select private so the repository cannot be shared.
    • I typically provide starter code from my repository
      • Most of the time this contains ‘skeleton files’ (next slide)

25

26 of 42

#4 Skeleton Code (Stuff I provide)

26

A readme.md file which shows the text below

27 of 42

#4 Skeleton Code (Stuff I provide)

27

(I like collecting data in my readme’s)

28 of 42

#4 Skeleton Code (Stuff I provide)

28

Typically some blank files named exactly as I want them--assists in any unit testing I do.

29 of 42

#5 How do Students retrieve assignments?

29

30 of 42

#5 How do Students retrieve assignments?

  • Simply give students this link for the assignment
    • You can provide this on your website, or as an e-mail through blackboard
    • Note
      • When students download a repo, you get an e-mail (This is also helpful to note if some ‘outsider’ tries to download the repo, I can delete it immediately)

30

31 of 42

#6 Checking in on Students

  • From the web interface you may view all of your student repositories
  • You will also see how many ‘commits’ some students have
    • If you see ‘0’ that is probably a problem-- e-mail them!

31

32 of 42

#7 Automation

  • Since student repositories are in the github environment, you have access to the github api.
    • Currently, I am not doing anything crazy with it--but let me show one example

32

33 of 42

#7 Automation -- pulling repositories

  • Write a little python script that pulls all of the repos

  • uname is my github name
  • Coursename is whatever I called the course: “Mikes3650
  • i’ is the repository name
    • These are regularly named
    • You can scrape them from the web interface or a git api call

33

34 of 42

#7 Automation -- pulling repositories (with git api)

  • Here is a little example of how to pull ‘200’ students github information
  • You’ll retrieve a json file which you can parse for each individual repo to clone.

34

35 of 42

Mike writing scripts sounds like a mess

  • It is not, but okay-- there is this tool “Classroom Assistant” that lets you download all of the repositories
    • (I noticed it for the first time as I was writing this talk--good timing!)

35

36 of 42

#8 How I provide grading feedback

  • Once you (or your teaching assistants) have the repos:
    • Everything in github is timestamped which is nice (for handling late penalties)
    • Can again run scripts against each submission.
    • TA’s also do a pass for code style using their IDE or the github interface
  • Graded feedback still through https://northeastern.blackboard.com
    • (Putting grades on non-Northeastern website is a no no)

36

37 of 42

#9 Adding new assignments?

  • There are two choices to be made
  • Either create a new assignment
    • (And then distribute that URL to students)
    • This works well if you have some assignments done in teams, and some individually.
  • Or--since you have the repositories already, push a new directory and have students do a ‘git pull’ to get updates.
    • ^This is typically what I have found better
    • My new assignments are in a brand new directory, so this avoids merge conflicts as well.

37

38 of 42

Summary

38

39 of 42

Bonus/Unfinished Slides

39

40 of 42

git basics (Just for reference)

40

41 of 42

(Skipping these next slides in presentation)

  • But maybe you will use some variant of these slides to teach your students ‘git’.
    • Most students pick it up within the first week without too much trouble.
    • (This actually works nicely in Systems as they are learning and working in the terminal through the course.)

41

42 of 42

(Skip) git add

  • Add a file into the ‘index’
    • (Note: You can do this as often as you like.)

42