Category Archives: open source

open source

GitHub Classroom

Previously I have written about using GitHub for my classes. I have been doing this for a number of years but GitHub has changed over the many years that I have been using this, so I thought, that I should do an update about my current workflow.

Classroom vs Education

GitHub education (education.github.com) is the community for educators using GitHub. Its what you use to get your discount. Its where the education community forums (education.github.community) are located.

GitHub classroom (classroom.github.com) is an application to help you manage repositories for your students. It has been improved over the years and in all honesty I do not use its full feature set. But even that little bit that I do use makes my workflow simpler so I’ll share it with you.

Background

I began using GitHub for teaching many years ago. It was before the classroom.github.com app existed. When I first started, I used google forms to gather GitHub ids and then created repos for my students. Initially I did this manually and later I wrote some bash scripts to help me do this.

In the past 2 years or so however, I have moved from that process to using github classroom. It is a pretty awesome application that has made my life a lot easier.

To use github classroom

To use GitHub classroom, you will need to do the following:

  • create a free GitHub account using your school credentials (your official email helps you get verified a lot faster)
  • apply for a teacher discount here (its been slower since pandemic started so you want to get this done sooner rather than later)
  • after you get approved for the discount, create a free GitHub organization
  • upgrade your free organization to a team plan

The GitHub pricing plans have changed a lot throughout the years. When I first started, you paid for privacy. After that it was pay for collaborators. And now.. you sort of pay for advance features.. You may be able to get away with not upgrading to use GitHub classroom if you are ok with basic feature set (Note, I have not ever tested this.. so I am not sure that it is true.. you may need to do upgrade to use GitHub classroom properly). You can check out the pricing plans here. Some of the features that I like aren’t available for free. The ones I like are: advanced tools and insights on private repos, gh pages, wikis, etc (see GitHub pro features). So if you want those in the private repos for your students, then do the upgrade request.

In any case, bottom line, you need to set up an organization to use GitHub classroom

How many?

One of the first things you will want to decide is how to structure your organization(s) and repositories. Here are some thing to think about in your decision:

Do you do one organization for all your courses or one for each course?
Do you want to create a new organization each year or keep the same organization?
Do you do one repository per student or one repository for assignment?
If there are multiple instructors should every instructor have their own organization or just one organization for everyone?

These decisions will depend on your use case as well as the number of students, number of assignments, number of teachers, familiarity of teacher with GitHub classroom etc. Other considerations include how teachers may interact with the content of their students.. will they go to the organization or they be looking at their students work only through the classroom app? These will also determine how many orgs and repos you need.

For me, my class sizes are around 40 students per section. Some courses I have 1 section, some courses I have two sections. Each course I teach typically has 3 assignments and 8 or 9 labs. Given these numbers, what I usually do is this:

  • Each semester, I create an organization for each course I teach. This allows me to separate the content and more easily distinguish between my organizations. So one org per course per semester. If I have two sections of the same course, I still only create one organization
  • My labs are completely individual while my assignments can be done in pairs. I also allow my students to switch partners for each assignment. Because of this, my students all have one repository for their labs (all labs go to same repository) as well as a repository for each of their 3 assignments.
  • Typically what this means is that there are around 100 to 160 repos per organization (depends on how many work in pairs). This isn’t too bad to manage and there are some tricks that I use to find things quickly.

Classroom to create a private class repo

I like to host each course I teach in a GitHub repository. Every example I code can be hosted as source files that students can clone and play with. If they just want to look at the source code, its available online with proper syntax highlighting.

Sometimes you want a place to host your course materials without sharing it to general public. There are all kinds of ways to do this but you can actually grant access via GitHub.The way you do this is you start by creating a group assignment on GitHub that allows a maximum of 1 team. Then go to the assignment acceptance link and accept the assignment. Manually make the repository read access for the one team that has access (you will always have access as organization owner)

After you have done this, provide the acceptance link to your students and have them “join” that only team. This will create one big team for every student in class and they will have access to a private repository where your materials can go. Something to consider though.. one of my students went home to be with their parents in Iran during the pandemic… and lost access to all private repositories… Things you never consider pre-pandemic but something to keep in mind if your students are all over the world. I ended up opening up the repo to ensure they have access. In any case, once we resume live classes I will probably go back to this methodology as I thought it was quite nice.

Classroom as a mass repo creation app

The GitHub classroom app was built for teachers so it tries to put GitHub resources in terms of how teachers might view the world. Thus, the classroom app, doesn’t refer to the creation of repositories/organizations often (it does a little bit.. but its more of a means to an ends as opposed to a goal). Instead it uses the term assignments and classrooms.

When you go to classroom.github.com, the first thing it will ask you to do is setup a classroom. The way I always think about this is that for each course you teach each semester, you need at least one classroom. If you teach with multiple instructors in the same course, it may be advantageous to set up separate classrooms for each teacher. For me I find that it is just a lot of extra work so instead I use one classroom per course even when team teaching

Given how I set up my organizations, it means I typically have one classroom associated with one organization. you can however have multiple classrooms per organization if you want.

After setting up a classroom, you will be able to create an “assignment” for the classroom. As someone who came to using GitHub after using it for coding projects, the easiest way to think about the assignment is that it is effectively a tool for repository creation and access. Your assignments can be individual or group based. For reasons I’ll explain later.. I generally create group assignments, even when its individual assignments.

When you create an assignment, you will have to fill out a form. This includes things like assignment name, number of people per team, maximum number of teams, starter template repo, autograding etc.

For me I have not yet explored their autograding feature. I know it uses github actions.. but haven’t had time to really explore this yet.. summer project. So I will skip on this for now.

For my individually done labs, I create a group assignment that only allows one team member called labs. The assignment initializes the repository from a template repo I have that contains all the starter and tester files the students need for their labs. The classroom app provides a link that my stduents can then use to “accept” their assignments. I give my students instructions that basically say that they need to use their given names (the ones that I can find in the LMS) for their team names. The reason I do group assignments instead of individual assignments for this is because the repository names created for group assignment is assignmentname-teamname. since the team name is their actual names, I’ll be able to find the student in the organization by simply doing a filter in the organization.

I generally read my students assignments (code) in the browser and rarely ever download it to my computer. For testing, I use our schools submitter application, so just reading it online is fine. However, a desktop application for GitHub classroom is also available. Using this application, you can download all the accepted assignments. In otherwords it will download every repository associated with a given assignment for all students. This is pretty nice if you want a local copy. One thing to note is that when I used git-LFS (git large file system), the assignments I got from the desktop app had corrupted files. only about 50% of the files opened properly. If I cloned the repo though, the files were just fine. I am not sure why though and I haven’t really looked into it.

For each assignment, I set up a group assignment that allows up to two students and provide instructions for students to use both teammember names as well as assignment number in their repository creation. The assignment number is necessary because when a group assignment is created, it creates a team in the GitHub repo. Since students can change teams for different assignments, I needed them to be able create a new team.. but not all do. many keep the same team so to avoid duplicate team names, I have them add an extra number.

Feedback through GitHub

Since I teach programming, GitHub has amazing tools for code discussion… this has been fantastic because our LMS (the Evil LMS that shall not be named…) has barely any ability to provide relevant feedback when it didn’t erase the feedback completely… because you didn’t hit save TWICE (yes twice.. if you only hit save once, you clearly didn’t want it saved badly enough 3 paragraphs of writing.. no you didn’t want it.. if you wanted it you would have hit both save buttons that were on two different pages…No confirmation needed to delete what you wrote … but if you want to make sure you save, you better confirm that save)…. but I digress.

Usually what I do is I look through my student’s code and provide feedback using the issue tracker. It lets me do things like provide perma links into the code.. for example.. here is a link to a code blurb for my animations:

https://github.com/cathyatseneca/DSAnim/blob/8ea2a7b9579f5609a5d52db40c81e3a5641e67ba/p5js/bubblesort.js#L17-L20

you can actually highlight which lines of code need attention, and exactly what you want them to pay attention to using GitHub tools. Its pretty fantastic.

On GitHub I provide only feedback. No grades are ever posted there.. the number that goes into the grade is entered into the LMS based on the feedback. When its a group assignment, I only have to post my feedback once to the repo and enter their grades individually (just a number). I really like this process because I can provide details that just doesn’t make sense with the LMS. Students use to ask “I don’t understand what this comment means” a lot when I wrote it in the LMS because the feedback had no relationship with the assignment. On GitHub, comments can refer to very specific issues… that’s huge.

Conclusion

If you use GitHub for your classes but want a more automated workflow, consider checking out classroom. Its actually quite a nice tool for all sorts of purposes.

End of Summer – Thank you!

This summer was a big one at for CDOT (Centre for Development of Open Technology).  We had almost 30 RA’s working on many many different types of project.  Yesterday was our final cdot presentation day for the summer.

For those unfamiliar, CDOT is an applied research group within Seneca College.  Over the years we have worked on many different projects related to open technology in various areas.  I am one of the faculty members involved with CDOT.  Projects tend to run over the course of a semester or two.  Students are hired either while they are studying or just after they graduate.

My team worked on projects related to 3D web graphics.  This summer I had two projects.  The first was a project with Box, to implement a 3D data visualization tool.  The second was with a Gorilla Productions.  The project was to implement realistic cameras for three.js.  (cameras that behave as real world cameras do).  In total I had 4 awesome research assistants working for me (Andrii, Barbara, Dmitry and Koji).  They have done a fantastic job on their projects.

However, aside from my two projects, CDOT also hosted many other projects.  One of the reasons the reasons that CDOT exists is to provide experiential learning opportunities to our students.  A chance for them to work on real projects and develop skills.  One of those skills is the ability to talk about their work.  Thus, each Thursday was we have “Demos”.  During that time, the teams will talk about their project and what they have been working on, problems they encountered, solutions they found.  Yesterday, was the last day and everyone had a chance to talk about thoughts of on their summer’s work.

Generally the comments were all very positive. However, there did seem to be a few themes that were shared by multiple students.  These were:

  1. Being surrounded by other very smart people working on interesting projects has helped them develop as programmers
  2. Demo days helped them learn from other teams even when they were not working on remotely the same thing.
  3. Demo days made them less nervous about speaking in front of crowds
  4. CDOT provided opportunities to work on something important with a great amount of freedom to design and implement their work
  5. CDOT experience has helped them to either find a job (a couple of students will start in new positions right after labour day) or the confidence that they will be able to find one shortly.

I truly believe that CDOT is one of those places that are unique and special.  We have students that do very interesting work on a wide variety of projects.  Our students are very bright, and I have always admired their ability to exceed my expectation.  Many of you have taught me things I did not know.  To all the RA’s at CDOT, know that you are the ones that make CDOT special.  When I see what you do, when I see what you have accomplished, I am reminded of why I teach.   Thank you!

Using git and github in your classroom

I wrote this for the ACSE mailing list about year ago and have passed it onto my colleague when they ask about using github for their classroom.  At the encouragement of another colleague, David Humphrey (he did a really good talk on git and github for fsoss2015),I’m going to post it to my blog to make it more accessible.

Using git and github for your classes

Firstly it is important to distinguish between git and github.

git is the open source distributed revision control system used by the Linux project. It lets you create a history of all your code.  You can send git repository around as zip files if you like.

github is a company that creates a nice place for you to put these repositories into the cloud so that you can much more easily sync and share these repositories without having to set up servers or send around giant archives.  It also provides things like access control, issue tracking, wikis, activity graphs and so on.  Very handy.

As this post is long, I’ll start with some links for quick reference on where to find/get stuff.  After that I have a section specifically for dealing with github, working together and git itself.

git client download: http://git-scm.com/downloads
git tutorial: https://try.github.io/levels/1/challenges/1
github gui: https://help.github.com/articles/set-up-git
tortoise git: http://code.google.com/p/tortoisegit/

About Github

github  has 2 types of accounts: individual and organization.
As a teacher, will need to make for yourself an individual account and an organization account.  Any individual account can belong to zero or more organizations.  For myself, I have quite a few different organization accounts.  One for each of my courses and one for my research group.

It should be noted that both types of accounts are free to use if your repositories are open source.  I have been using github as a place to put my in-class examples for students…and that is open source so I don’t have to pay for doing that…you can check out the repo for my data structures and algorithms course here.  I use the repository itself for code examples, the wiki for assignments and course documents (minus the notes… I prefer gitbooks for that).  I have not yet tried to do this consistently but I think the issue tracker in this case can also serve as a notification and discussion board.  You can check out the repo here:

http://github.com/cathyatseneca/dsa555-w15
github makes money by essentially charging for privacy so under normal circumstances they would charge some amount for some number of private repositories.   You can see their pricing plans here:  https://github.com/pricing

However, as an educator, what you can do is request for an organization account with X number of private repositories at some discount.    You can do so at this site:

https://education.github.com/

Typically they will want info about your school, number of students and so on.  The number of private repositories depends on how many students and how you plan to use the repositories.  So for example, if you have 20 students and they work in groups of 4, then you will need 5 private repositories.  However, if you have 20 students and they are working individually you will want 20 private repositories.   If you want both team and individual repos for some group work and some individual work, then you would need 25.    I also suggest asking for a couple of extras for yourself or for class material that you don’t want to open source.  In any case what you want to do is set it up so that your organization can have some number of private repositories that will suit your needs.

Aside from you setting up an account, your students must each individually create a github account.  Once that is done, have them send you their github ids.  They can get a free one.  They don’t need to pay for it as the private repos will be given to them through the your organization account.

Once you have created your organization, you can go to your organization settings and create teams.  A team consist of 1 or more individual.  As the administrator of the organization you will be able to see all the repos so if you forget to add yourself its no big deal.  Each team also has different access permissions.  Typically I would set up a student team for write access but not admin access.  If you are only planning on doing group work then set up each team so that all members are part of that group.  If you plan to do individual work or a mix of team and individual work then you will want to set up a team for each student.

Once you have the teams set, you can then create private repositories.  You can initialize them with an empty readme (or push some code up by following the instructions).  In any case once you have created those repos, you can give access to 1 or more “teams”  by hitting the collaborator button in the settings tab.
Only teams with access to private repos can see that repo.  So its a great way for groups to all contribute to a project because you can limit who sees what.  As a teacher, if each student actually submits their own stuff (and not email around and have one person do it) you can actually see their commits down to the line they put in through the blame button.

About collaboration

Getting students to unlearn the code collaboration method they had been working with for years is a definite challenge.  Putting in some best practices may be a good idea.  Here is something I wrote up for the students in my research team to help them do this:

To ensure that we are not going to step all over each others code, these are the steps we will use when putting code into  the repository:

  1. All commits should be accompanied by an issue. If there is no issue for your commit, please make one first!
  2. All commits should be put into a branch matching the issue number. Thus, if the problem the code is solving is described in issue 2, then the branch should be named issue2
  3. before pushing your code to github make sure you merge in the most recent code on master to your branch and resolve any conflicts
  4. push your code into the remote issue branch (if you want to work off your own fork then thats fine but issue branch on your fork)
  5. submit a pull request for the code that you have submitted but DO NOT merge that code yourself.
  6. assign someone else to review your pull request
  7. if you are assigned a pull request, test out the pull request on your local machine BEFORE accepting it. Do not just click the button. If there are any problems, comment and let the submitter know and have them fix it. If all goes well accept the pull request to merge into master

There are other methods out there… but you probably will need to invest some time to teach whatever that method is.

About git and git clients

git is a revision control system and it is part of all linux distributions so if you are running linux, you already have git installed (unless it is a really really old linux release).  For OSX git is installed as part of command line tools for xcode (if I remember correctly… on mavericks the first time I tried to type git at the command prompt, it installed those tools for me).  For windows, you can download it from:  http://git-scm.com/downloads

The above are command line tools for using git… and this is all you need for git and github.

You can learn to use git with this interactive tutorial: https://try.github.io/levels/1/challenges/1

Everyone tells me that gui’s are awesome… so github does provide some fancy gui clients for git (https://help.github.com/articles/set-up-git
).

Tortoise git is what one of my student use to swear by… so that may be worth looking at (http://code.google.com/p/tortoisegit/)

I tend to prefer the command line myself so I can’t speak to either unfortunately.

Anyhow, hope this is useful to others trying to figure this out.  Let me know what would make this even more useful for you