Education - page 4


How to use pull requests in the classroom

So you’ve given an assignment to your students in GitHub Classroom, either individually or in groups. But have you given a thought to how your students will work in a way that you can give them useful and instructive feedback?

One approach is linear: students make one commit a time on a single, master branch. In GitHub, teachers can give feedback on a sequential history by commenting on individual commits: view a diff, hover over any line, then click + to start commenting.

Commenting

For students and teachers alike, this is a straightforward approach, but it’s a little limited. It doesn’t mirror the workflow software development teams use outside the classroom. And what if we want to work collaboratively, in a way that fits with the branch, commit, and merge tools that Git gives us? Then that’s where pull requests come in.

Pull requests build on the branching model of Git. A pull request is GitHub’s way of organizing the merging of two branches, whether it’s within a repository or in between forks. Pull requests make space for collaboration and conversation during the development process. In this post, we’ll walk through setting up a pull request workflow for submitting student exercises and leaving feedback.

Pull requests for individual exercises

By starting with pull requests, even for individual assignments, students can develop the skills and collaboration mindset that will help them when it’s time to work with others on a team. Pull requests allow students to experiment and document their processes and let educators give feedback on their progress. It works a bit like this:

  1. The student clones their assignment repository to their local machine.
  2. They start a new branch to work on solving a problem.
  3. They work on their branch by committing their changes as they go, leaving a trail descriptive commit messages.
  4. When they’re ready, the student opens a pull request. In the pull request message, they can describe what problem they’re solving, how they’re thinking about it, and why it’s a good solution.
  5. The teacher responds to the pull request by:
    • Adding to the threaded discussion
    • Leaving line-by-line comments on the diff
    • Making a pull request review that combines an overview comment with contextual commentary

Compared to comments on commits, a pull request is a great place for discussion. Authors and reviewers can comment on specific lines, leave Markdown-formatted messages, or give emoji reactions 👍⭐. The student can even push new commits to the to-be-merged branch, amending the original pull request.

When the student and teacher are happy with the result, they can press the big green Merge pull request button, bringing the changes into the master branch (or another development branch). After a successful merge, you can tidy up by deleting the dangling branch with a one click.

Pull requests for group exercises

For group assignments, pull requests become an especially important tool for coordinating the work of many. In a collaborative workflow, pull requests open up new ways for educators to understand their students’ development. It works like this:

  1. Each student clones the repository to their local machine and starts a unique branch to work on their part of the assignment.
  2. The students work on their branches, committing changes and pushing their branch to the shared repository.
  3. When each student finishes their part of the assignment, they start a pull request.
  4. The students work together to review the proposed changes, discuss improvements or alternatives, and resolve conflicting changes arising from concurrent development.
  5. When the students agree on a resolution, they merge each pull request.
  6. After the assignment, the teacher leaves additional feedback in the pull requests.

As in individual assignments, pull requests give teachers the chance to peek into their students’ process. The repository’s own Insights tab can give a big-picture view of the students’ work, such as the number of open and merged PRs, frequency of commits, or who has contributed to the repository. A closer look at the pull requests themselves can show the team dynamic: how quickly students respond to PRs, what they say in comments to each other, and how they resolve conflicts.

Insights

Groups’ pull requests become a great place for teachers to give feedback, continuing the students’ conversations. Want to bring something to a specific student’s attention? An @mention—the @ symbol followed by a username—notifies the student directly. You can even comment on merged and closed pull requests, just like you would an open one.

Whether your students are working individually or in groups, pull requests are a great way for them to sharpen their workflow and for educators to guide their students. To learn more about using pull requests to work collaboratively, check out the Campus Advisors training module 3—it goes in depth on pull requests, resolving conflicts, and more—or scope out the GitHub Glossary to refresh your collaboration vocabulary. If you’re having any trouble wrapping your head around all this, check out how other teachers are learning about pull requests in the GitHub Education Community.

P.S. Have you been building up your assignment repositories over several semesters?

If so, chances are you have a pretty lengthy commit history by now. Here’s a workflow, inspired by Dr. Diosino, that gives students a clean commit history so they won’t be distracted by your past activity. Here’s how to do it:

  1. Create a new repository. This one will be the pristine copy that your students will see.
  2. Clone the new repository to your computer.
  3. In your clone, pull the changes from the long-lived **repository. Run git pull **
  4. Squash (abbreviate, in Git parlance) the history. Run git rebase –root –interactive and follow the instructions Git gives you to collapse many commits into one previous commit.
  5. Push the new, abbreviated history to your new repository. Run git push origin.

GitHub Education teacher meetup

Teacher Meetup venue Manchester Makerspace

This weekend, the GitHub Education Team will be hosting an evening meetup for Computer Science teachers in Manchester, New Hampshire at the Consortium for Computer Sciences in Colleges. Join GitHub staff and educators from the Northeast region at The Manchester Makerspace on Saturday, April 21 at 6 pm. If you’re interested in integrating Git or GitHub into your classroom, we’ll be providing an introductory presentation and answering any questions you might have. Afterwards, we’ll socialize and enjoy dinner and refreshments.

We hope to see you there!

Register now

Date: Saturday, April 21 Time: 6-9 pm ET Address: Manchester Makerspace, 36 Old Granite St, Manchester, New Hampshire 03101

The most popular courses on GitHub

Thousands of teachers use GitHub to host their courses, distribute assignments, and get insight into student progress. Many teachers open source their materials, so other teachers can use them. Between Massive Open Online Courses (MOOCs) and custom lessons from individual teachers, there’s plenty of materials for new teachers to adapt and reuse in their classrooms.

After seeing the growth of educational repositories on GitHub, we put together a list of some of the most popular courses. Courses were selected based on forks (repository copies) and stars (bookmarks that indicate interest). You’ll also find documentation for each of the repositories to guide you through the course materials.

If we missed a course, or if you’d like yours included in a more extensive list, let us know in the GitHub Education Community.

Top courses based on stars

1. Ada Developers Academy’s Jump Start Curriculum (223 stars)

ADA’s Jump Start Curriculum helps prospective students become familiar with the tools, concepts, and vocabulary they’ll need to be successful in the larger program. Each lesson begins with stating learning goals, so students can be sure they’re retaining what they need to prior to entering the program.

2. React From Zero (207 stars)

React From Zero is a straightforward introduction to React that is broken into 17 parts. Each part of the tutorial is in the code for that lesson, using comments to explain concepts in React and examples right in the editor. Each lesson also links to a preview of how the code renders in a browser, so you can follow along and immediately see the outcome of code while you’re learning.

3. Hear Me Code’s Python Lessons (199 stars)

Hear Me Code, based in Washington, D.C., is an organization that offers free, beginner-friendly classes to women. This repository has a “Start Here” guide for those who’ve never installed or run Python before. The lessons are broken into 16 sections, each covering a different concept. Hear Me Code’s slides are also hosted on GitHub, so it’s easy for you to follow this curriculum on your own.

4. Ada Developers Academy’s Textbook Curriculum (154 stars)

Ada Developers Academy is a tuition-free program for women and gender-diverse people to learn software development. Their first repository on this list is their textbook curriculum, which anyone can use. It touches on everything from Git and agile workflows to Ruby, Rails, databases, JavaScript, and Backbone.js.

5. Prep Course for North American University’s Chapter of Association for Computing Machinery International Collegiate Programming Competition (82 stars)

This repository is an 11-week prep course for programming competitions, but it can be used to practice algorithm challenges for interviews or improve algorithmic thinking. Prior programming knowledge and familiarity with data structures will help students who want to get started with this advanced course.

Top courses based on forks

1. Stanford TensorFlow Tutorials (2,452 forks)

These tutorials go along with Stanford’s TensorFlow for Deep Learning Research course. The syllabus, slides, and lecture notes are all available on the website, and each week’s assignments and examples are available in this repository.

2. Deep Learning Specialization on Coursera (1,133 forks)

This student-created repository includes all work from Coursera’s Deep Learning Specialization programming assignments. While this repository itself is not a curriculum, it’s a helpful guide for self-teaching and reading more about the concepts and solutions from this deep learning series of courses.

3. Creative Applications of Deep Learning with Tensorflow (591 forks)

This repository is comprised of assignments and lecture transcripts for Kadenze Academy’s Creative Applications of Deep Learning with TensorFlow curriculum. There are a total of five courses, and the repository also contains extensive documentation on setup and getting started with the tools students will need.

4. Practical RL: A course in reinforcement learning in the wild (401 forks)

This course is taught on-campus in Russian at the Higher School of Economics, but its online version is available to both English and Russian speakers. The entire course is nine weeks long, and the repository also contains bonus materials for students to explore after completing the curriculum.

5. Data Science Coursera (152 forks)

Michael Galarnyk, a Data Science M.A. student, decided to document his journey through Johns Hopkins’ Coursera Data Science curriculum as a supplement to his program at UC San Diego. Along with a directory for each course and its assignments, there’s also a link to a blog post reviewing each course week-by-week, so prospective students can get an idea of what to expect each week.

Find more course materials in the Education Community

For teachers who want to explore more courses, we posted a more extensive list in the GitHub Education Community. You’ll find tips, tricks, and scripts from teachers around the world who are passionate about computer science education.

Go to the Education Community site

Teachers from Tufts, Duke and Loyola Marymount show their GitHub workflows at SIGCSE 2018

Nearly every conversation the GitHub Education team had with teachers at SIGCSE 2018 (Special Interest Group on Computer Science Education) touched on the themes of communication, iteration, and real-world tools. This year at SIGCSE we had two special sessions on those themes: three teachers walked through their GitHub workflows, and four students shared their experiences outside the classroom.

Teacher panel: Real-world tools, engaged students

Git has a learning curve for students (and teachers)! In this series of talks, teachers shared why they choose to use Git and GitHub and how it benefits their classroom.

Or skip to a specific section:

Check out teacher slides

Student panel: Outside the classroom

Hear students speak about using GitHub and the benefits of GitHub Education on their campuses.

Or skip to a specific section:

Check out student slides

Sign up for lesson plans, tutorials, and best practices from GitHub Education

Once a month we’ll pass along tips and tricks for implementing Git and GitHub in your classroom.

Subscribe for updates

How to use group assignments in GitHub Classroom

Like professional developers working together on code, students can use GitHub Classroom to collaborate on group projects in a shared repository. In this post, we’ll walk you through how teachers can work with GitHub teams and use GitHub Classroom to create group exercises, assign teams, and reuse existing student teams.

Before you begin

Before you create a group exercise, you’ll need the following:

  • A GitHub organization with a discount for private repositories and access to GitHub Classroom

  • An exercise (a repository that you have access to, which contains documentation, starter code, tests, or anything else your students need to begin work on an assignment)

  • A list of students, or unique identifiers like their email addresses

Get started

To get started, log in to GitHub Classroom, choose one of your classrooms, then click the New assignment button followed by Create group assignment. This brings you to the “New group assignment” page where you can provide the details of an assignment. If you don’t see your classroom listed, double check that you’ve granted that organization access to GitHub Classroom.

a mouse cursor clicks on a GitHub Classroom classroom, then clicks the "New assignment button", then clicks the “Create group assignment” button, text begins to appear in the first text field. The animation loops from the beginning

Then set up your group assignment just like you’d setup an individual assignment. Pick a name for your exercise, a starter repository to share, and a deadline.

Create and use groups

When creating a new exercise, you can choose whether to reuse a set of groups from a previous assignment or name a set of new groups. If you’re reusing existing groups, then select a set of teams from the “Choose an existing set of groups” drop-down list.

If your students are going to form a new set of teams, enter a name for the set of teams in the “Create a new set of teams” field. It’s helpful to name your set of teams after their intended duration. For example, if you want to use a set of teams for one assignment, name it after that assignment. If you’d like to reuse a set of teams for a whole semester, name it after the semester or course.

When you’ve completed the form, click the “Create Assignment” button. Now it’s time to invite your students to the assignment.

Form student groups

On the assignment page, you’ll find a unique invitation link. Share this link with your students through your learning management system, course homepage, or however you distribute assignments. Keep in mind that anyone with the link can use it, so be careful where you share it.

If you’re using a new set of groups for this exercise, and you’d like to assign students to specific group, give your students a list of people who should join each group, along with the group’s name.

Once your students have clicked the link, they may be asked to join a group (if you’re not reusing an existing set of groups). It looks like this:

a mouse cursor clicks on an invite link for an assignment, a list of GitHub Classroom groups appears, the cursor clicks on the "Create a new groups" field, "Team 2" is entered into the text field, the cursor clicks the “Create groups” button, and the “You are ready to go!” page appears. The animation loops from the beginning

There are three common cases when organizing students into teams:

  • There are no groups yet. The student will have to enter the name of a new group to create it
  • There are one or more groups already formed. The student clicks on the existing group they want to join
  • A student needs to create a new group. The student enters the name of a new group to create it

Classroom groups and GitHub teams

When students join their group in Classroom, a team is created on GitHub.com in your GitHub organization. Teams have pretty nifty functionality, including threaded comments and emoji support.

If you create a team for your students on GitHub.com, that team will not appear in Classroom. If you’d like to use Classroom to distribute shared repositories, then use group assignments in Classroom, not teams on GitHub.com.

When you use group assignments in Classroom, each team of students will get access to one shared repository for the exercise. Every student will be able to push and pull to their team’s repository. We recommend assigning one student per team to act as project manager to resolve conflicts or merge pull requests. If your students are new to resolving conflicting changes, they can check out our documentation to learn to manage merge conflicts.

Get deeper insight into group participation

Once your students are sorted into teams, they can start collaborating on the assignment like they would in any other repository: by pushing commits and branches, opening and reviewing pull requests, or using issues. Similarly, all of their commit history is available for you to review.

As students finish up their assignments, you can see the work they’ve done in two ways. Examine the current state of the files to see the finished product or look through the repository’s history to see how students worked together. GitHub’s “Insights” tab provides you with a picture of how your students worked together. For example, “Pulse” data gives you a timeline of your students’ pull requests, issues, and conversations, while “Contributors” graphs visualize your students’ additions and deletions.

Once students complete their projects, there are a few ways to deliver feedback, including:

  • Going to the list of commits and making comments on individual commits
  • Weighing in on a per-line basis (if students used pull requests)
  • If you find that students make a similar error over and over, creating a canned reply and opening an issue directly from the plus sign (“+”) in the code view

If you chose to use private repositories for your assignment, your feedback will be confidential, so only you and the students in the group will see it.

Create a group exercise

Ready to give a group assignment? Get started right away in GitHub Classroom. Or check out this discussion in the GitHub Education Community on how student groups can work with GitHub teams in Classroom.

Changelog

Subscribe

Discover new ways to build better

Try Marketplace apps free for 14 days

Learn more