I’ve become enamored with HackerRank!

HackerRank is an online judge, similar to Codeforces, Kattis, Sphere, and UVa.

All of these have the following in common:

. a large set of challenges (ACM-ICPC like problems)

. contests

. a variety of languages can be used to solve the challenges

. a global leaderboard

Features that are somewhat unique to HackerRank are:

. it’s being used by many companies to screen prospective employees

. challenges are categorized by type (e.g. dynamic programming)

. a submission is given several tests, you’re told how many tests failed and how many succeeded, and you receive a grade accordingly

. you can create your own contests with HackerRank challenges or your own challenges with leaderboards just for your students

I’ve successfully run two contests for my students this term, one with a HackerRank challenge and another with a UVa challenge that I copied, and for which I have several test cases.

So, if you have a programming project that only reads ASCII from stdin and only writes ASCII to stdout, and for which you have several test cases, I think it’s very attractive to create a HackerRank contest with either HackerRank challenges or your own.

Posted in Uncategorized

Canvas: Set Default Grade

If you use the gradebook in Canvas this may be of interest to you.

Canvas displays the grades to you and to your students in two modes:

(1) Don’t treat ungraded as zero. (default)
(2) Treat ungraded as zero.

You can select (2) in the gradebook by clicking the gear wheel on the upper right, but that only effects your view, not your students’ view.

The problem is that as more and more assignments are not turned in by a particular student they then get a distorted view of their total grade, since their undone work is NOT treated as zero.

To solve this problem I routinely change all not submitted assignments to zero in the gradebook after an assignment has been graded.

This can be done at the top of the column of an assignment in the gradebook, by selecting “Set Default Grade”, and typing in zero.

Then, (1) or (2), above, doesn’t matter. The totals will be the same.

It’s important to do “Set Default Grade” AFTER the assignment has been graded, because the student will receive a Canvas notification about that, and that would be a very confusing thing to get before the assignment was graded.

It’s also very good for the student to get an explicit notification every time they don’t submit work.

Hope this is helpful.

Posted in Uncategorized

GitHub: Classroom

I want to be known as the king of software-development tools!!!

Just discovered GitHub Classroom.

I’ve been having my students develop and submit their software to me via git and GitHub for several years.

Students can apply to GitHub for an educational account which will give them unlimited private repos.

In the past I would then have the students invite the graders and me as collaborators, so that we could then clone their repo and grade it.

GitHub classroom makes that last step unnecessary.

You create a GitHub Organization, attach it to GitHub Classroom, and then apply for a discount on repos for that organization.

I got the discount in about a day, and I now have unlimited private repos in that organization for my students.

The graders and I are now automatically co-owners with the students of all the repos, and we can now avoid the hassle of getting many, many requests for collaboration.

GitHub Classroom

Posted in Uncategorized

Canvas: Quizzes

I create daily quizzes on Canvas.

When I do there are several settings that I choose.

It gets tedious to re-choose those settings every time I create a new quiz.

Instead, I create a blank quiz with those settings, but no content, yet, and then export that quiz.

I later import that blank quiz and just fill in the content.

Posted in Uncategorized


When Bruce gave me CS373: Software Engineering to teach in 2008, he asked that I make my students aware of the various software-development tools used in industry.

I barely knew any, but I’ve learned about many of them from my students and sometimes from the guest speakers from industry that have visited.

I’m now currently using the following:

git and GitHub for source control: I also now use this as a substitute for the old turnin program. Students provide us with a git SHA and we pull that particular commit to grade.

GitHub for issue tracking, too: Issue tracking tracks bugs and enhancements to the software. There’s also a very nice connection between git commits in GitHub and the closing of issues in GitHub.

pylint (Python) and clang-check (C++) for static code analysis: These provide additional checks beyond what the interpreter or compiler would provide.

unittest (Python) and Google Test (C++) for unit testing: Both are very much like JUnit. And probably the single most important thing that I teach my students is to write tests BEFORE writing code!

coverage (Python) and gcov (C++) for test coverage: It’s important to know what percentage of your code your tests are actually testing.

valgrind (C++) for memory checking: I only rarely allow my students to use new and delete, directly, but when they do, valgrind is invaluable.

cProfile (Python) and gprof (C++) for code profiling. This is of very limited value in my class, because none of my programming projects is compute intensive.

pydoc (Python) and Doxygen (C++) for automated documentation: Both are very much like javadoc.

autopep8 (Python) and clang-format (C++) for automated formatting: Everyone has their own favorite coding style. It’s very convenient when we grade for all submissions to have the same style.

NumPy (Python) and Boost (C++) for third-party libraries: Writing real software without making use of libraries is almost impossible, so I show a tiny bit of each of these.

Travis CI for continuous integration: The second most important thing that I teach my students is to set up a system that will automatically run all regression tests as a result of a commit. It’s also invaluable for students to get their software running on “naked” systems that they have to configure with all the dependencies that their software needs (e.g. all of the above).

Now, I’d like to tell you about my latest find. It’s hardly new, but however much I try to stay on top of things, it sometimes still takes me a while to become aware of a very cool tool out there for a particular purpose.

This time the tool is Docker and DockerHub.

Docker is free and runs on Linux, OS X, and Windows, but it will NOT run on the CS machines, because it has to run as root.

Docker creates light-weight Linux virtual machines to run on top of your non-virtual machine.

Like Travis CI, the value to the student is again to get their software running on “naked” systems that they have to configure with all the dependencies that their software needs.

But, now, there’s another value, and this time it’s to the instructor.

It is often the case that my students don’t have the most up-to-date versions of the interpreter or the compiler or some tool on their laptop. When that happens I point them to the CS machines, and dictate that their submissions will be graded there, as well.

Now, with Docker, I can configure an image with a particular set of versions (some even more up-to-date than the CS machines have), I can publish that image to DockherHub (again, free, for public images), and I can ask students to get their software running with that image and we can later grade their submissions with that image.

I think that’s huge.

And I wanted to share it with all of you.



Posted in Uncategorized