Slide 1

Slide 1 text

Using Python, Travis CI, and GitHub to Effectively Teach Programming Gregory M. Kapfhammer October 5 at PyGotham 2018

Slide 2

Slide 2 text

@GregKapfhammer www.gregorykapfhammer.com Hi! My name is GREGORY M. KAPFHAMMER

Slide 3

Slide 3 text

Introduce strategies and tools for effectively teaching programming Roadmap for this Talk

Slide 4

Slide 4 text

USE INDUSTRY STANDARD SOFTWARE IN ALL COURSES

Slide 5

Slide 5 text

SUITABLE FOR INSTRUCTORS IN INDUSTRY OR ACADEMIA

Slide 6

Slide 6 text

GitHub Travis Python Discuss in greater detail! Exploring Technologies

Slide 7

Slide 7 text

GitHub

Slide 8

Slide 8 text

Travis

Slide 9

Slide 9 text

Python

Slide 10

Slide 10 text

Clear Status Key Ideas Fast Grading Important Goals

Slide 11

Slide 11 text

HELP STUDENTS AND TEACHERS EFFECTIVELY COLLABORATE

Slide 12

Slide 12 text

Source Code Technical Writing Commit Counts Commit Messages Program Output Data Files Deliverables to Check

Slide 13

Slide 13 text

LEVERAGE EXISTING TOOLS WHENEVER POSSIBLE

Slide 14

Slide 14 text

Source code linting Markdown linting Prose checking JUnit test suite Pytest test suite Automated build tools Tools to Support Checks

Slide 15

Slide 15 text

DEVELOP NEW SOLUTIONS IN PYTHON WHEN NECESSARY

Slide 16

Slide 16 text

Tools Packages Testing Bene ts of Python

Slide 17

Slide 17 text

Black Flake8 Pipenv Pylint Pytest Pytest Plugins (e.g., Codecov) Tools for Development

Slide 18

Slide 18 text

DESIGN PRINCIPLES THAT GUIDED DEVELOPMENT Inspired by John Ousterhout's A Philosophy of Software Design

Slide 19

Slide 19 text

‣ Working code is not suf cient: aim for simplicity ‣ Code that hasn't been executed does not work ‣ Simple interfaces over simple implementations ‣ Great documentation encourages contributions Design Principles

Slide 20

Slide 20 text

Local Travis See GatorGrader and GatorGradle in the GatorEducator organization on GitHub Flexible Checking

Slide 21

Slide 21 text

CREATE TWO REPOSITORIES FOR EACH ASSIGNMENT

Slide 22

Slide 22 text

Solution Starter Check Using Travis CI

Slide 23

Slide 23 text

THE STARTER REPOSITORY SHOULD NOT PASS THE TESTS

Slide 24

Slide 24 text

Python Gradle Supporting different programming languages, the Gradle plugin runs GatorGrader checks in parallel Ef cient Project Grading

Slide 25

Slide 25 text

Let's Con gure Travis CI! 1. # use Java and non-root 2. dist: trusty 3. sudo: false 4. language: Java 5. jdk: oraclejdk8 6. 7. # ignore the virtualenv that Travis creates 8. env: 9 global: Travis CI runs private builds for every student

Slide 26

Slide 26 text

Let's Con gure GatorGrader! 1. --- 2. name: cmpsc-100-fall-2018-lab3 3. break: true 4. indent: 4 5. --- 6. # --> check the source code for various characteristics 7. # note that without an "--exact" the check is an "at least" Configure GatorGrader for use through Gradle

Slide 27

Slide 27 text

✘ Repository has at least 14 commit(s) ➔ Found 9 commit(s) in the Git repository ✘ The writing has at least 100 word(s) ➔ Found 12 word(s) in a paragraph ✘ The output has one of the '28.75' ➔ Found 0 fragment(s) in the output Passed 6/13 (46%) of checks for f2018-lab3 GatorGrader's Output

Slide 28

Slide 28 text

Computational Expression Data Abstraction Software Engineering Web Development Arti cial Intelligence Courses and Topics Different topics, goals, languages, and levels Used during laboratory, practical, and class

Slide 29

Slide 29 text

GatorGrader is like having a constant coach! I liked receiving feedback on the quality of my source code and writing before turning in the nal version of my lab. - ANNA YEAGER

Slide 30

Slide 30 text

Deliverables Insights Ideas for Experiments

Slide 31

Slide 31 text

WHAT CODE AND CONCEPTS CAUSE STUDENT FRUSTRATION?

Slide 32

Slide 32 text

New Checks Bug Reports See GatorGrader and GatorGradle in the GatorEducator organization on GitHub Let's Collaborate