DAVID MALAN: Hello, world!
And hello to all of CS50's alumni and friends at Microsoft and GitHub.
My name is David Malan and I teach CS50, Harvard University's Introduction
to The Intellectual Enterprises of Computer Science
and The Art of Programming, which is also offered at Yale University
and freely available to anyone online via OpenCourseWare
on YouTube, edX, and beyond.
This is a tour of just some of the software that CS50 students are now
using while learning how to program, much of it built
to top tools that might be familiar.
A student first logs in to code.cs50.io, which
is a web app that automates the process of creating, using GitHub Repos
API, a repository for them in CS50's Code 50 Organization to which they
have write access.
Using the same API, the web app also pushes to that repos main branch
an initial .devcontainer.json file, which includes CS50's recommended
plugins and settings for Visual Studio code as well as a reference
to CS50's Docker image.
Which ensures that students have a common environment
for writing and running code in C, Python, and other languages too.
Using the new code spaces API, the web app then creates a two core code space
for the student on that branch in that repo using that .devcontainer.json file
and the web app then redirects the student to the newly created code space
where they can use Visual Studio code in their browser.
On subsequent visits to code.cs50.io, the web app
simply redirects students to the same.
Students can ensure that they always have the latest environment by running
a command in their code space's terminal window, update50,
which downloads the latest .devcontainer.json file and rebuilds
their code space.
More comfortable students, meanwhile, can even
use a local installation of Visual Studio code on their own Mac or PC
to connect to the code space remotely.
Once in their code space students can start writing code right away.
Or if ready to start an assignment, can visit a URL
to accept the assignment first via GitHub Classroom, which
has the effect of creating for them a repository in CS50's classroom 50
organization containing any starter code for the assignment.
In order to get the assignment into their code space students run get50,
a command that automates the process of cloning the assignment into their code
space omitting the .get directory since their code space is already a Git
Repository.
Within the cloned folder, students can start writing their code.
If students have trouble understanding some error message along the way
they can run help50, a command that translates
using regular expressions, fairly arcane standard output and error to student
friendly advice.
And if students eventually encounter bugs they can debug with tools like
printf or Vagrant or they can start Visual Studio codes built in debugger
using debug50, a command that essentially automates the process
of creating the requisite launched .json file and also allows students
to provide command line arguments at the command line.
For the toughest of bugs students can even
employ rubber duck debugging, the process of talking through their logic
with the rubber duck in hopes of hearing any illogic in their thoughts.
Students without a rubber duck handy can have that chat virtually
by a CS50 zone plug-in.
When ready to submit their code students can run submit50,
a command that essentially automates the process of Git
adding, committing, and pushing students code to their classroom repository
so that they needn't, at least in the course's first weeks,
wrestle with Git itself and potential challenges like merge conflicts.
A problem to solve eventually to be sure, but not in the same week
we think, is Hello World itself.
The command also pushes to a student's repo
a doc GitHub directory containing correctness tests that
will be run on students code via GitHub actions
using another command called check50, which
ultimately outputs an autograding.json file that GitHub Classroom understands.
The student's teaching assistant, or TA, can then provide qualitative feedback
on that submission via pull request that GitHub Classroom automatically creates.
And they can input scores in a standardized format
that a tool of our own can automatically download and parse via the polls API.
We then download the results of correctness tests via the actions
API too.
Eventually, we envision students having multiple code spaces
but just one repository for their submissions, one assignment per branch.
And we also envision integrating features like sandboxes and labs
so that a code space could be customized for a particular exercise.
But this ability to stitch together a UX that's
tailored to teachers and students alike using API calls, extensions,
and containers has already been game changing.
From CS50's whole team here in Cambridge,
thanks so much for making all this and more possible.