Using Chat To Run
A Large Course
Michael Ball
UC Berkeley
michael@cs10.org
My Goals
All allows us to better focus on teaching!
• Save TA / Instructor Time
• Reduce Common Errors
• Enable New Assignments
• Have Fun
• Find collaborators for future work!
Instant Chat
IRC is cool (again?)!
Why Real Time Chat?
We love to hate email...
• Chat rooms are topically focused
• Ability to bother only those who are online
• "Rooms" and "Channels" allow for fun topics
• Integrations. Lots and Lots and LOTS of integrations
Examples
"Slack Integrations" → "About 11,300,000 results (0.36 seconds) "
Enter: Hubot
Github's robot which integrates with everything!
What About Your Course?
APIs → Build the features you need!
Google, Canvas, Moodle, Sakai all have APIs
Blackboard, Piazza, edX....
not so great, but solvable.
Example Problems
Yours may be different!
• Automatically set due date extensions
• Grant partial access to a grade book
• lock & unlock items
• Search for student / group info
• Automate multistep processes
Solve Simple Problems
We use password protected quizzes.
Problem: Passwords need to be reset.
Solve Simple Problems
Easily link to Piazza posts.
Sometimes a little heads up is good!
Enable New Assignments
Oral Lab Checkoffs — painful w/o automation!
Don't Let The Inmates Run The Asylum
Build Security in where possible!
Protect Yourself From Errors
Michael> /give Mary a 20 day extension for HW1
Alonzo> @Michael, I'm sorry I can't do that. Someone can type "approve extension gold" to grant your request.
Andy> /reject extension gold
Andy> @Michael, are you sure you didn't mean 2 days?
Michael> Whoops, thanks!
Michael> /give Mary a 2 day extension for HW1
Alonzo> Done! Mary's new due date for HW 1 is March 1
Warning: This is vaporware.
Summary
- Chat alone can improve communication
- Use automation + integrations to save time
- Build new automations to handle complex tasks.
Thank You!
P.S. There are bonus slides online!
Bonus Slides
Getting Started with Implementing Hubot
Basic Setup & Overview
- Get a Slack (or Hipchat or other) organization
- Setup a chatbot.
- It's easy! Clone a repo and push to Heroku
- (See the links)
- Add your own extenstions.
Some Quick Links:
- Hubot: github.com/github/hubot
- Alonzo (or Bot): github.com/cs10/Alonzo
- Feel free to steal lots of custom stuff!
- Canvas LMS API: github.com/cs10/node-canvas-lms
- Group Mentions: github.com/cycomachead/hubot-group-alias
- Piazza Integrations: github.com/cycomachead/hubot-piazza
- Google Drive Integrations: github.com/aaaschmitt/hubot-googledrive-search
- Generic Canvas Integrations: github.com/cycomachead/hubot-canvas
A Really Simple Command
cs10.HELP_LINKS = [
'Late Assignments Form: http://bjc.link/lateAssignmentsSP16',
'Late Add From: http://bjc.link/sp16lateadd',
`Late Add Form Password: ${process.env.LATE_ADD_FORM_PW}`,
'Contacts Sheet: http://bjc.link/cs10contacts',
'Checkoff Answers: http://bjc.link/cs10checkoffquestions',
'Get Snap! Project: https://alonzo.herokuapp.com/snap-proj.html'
]
robot.respond(/.*(links|forms).*/i, function(msg) {
msg.send(cs10.HELP_LINKS.join('\n'));
• Define some links in an array, and send a message whenever someone asks for "@Alonzo links"
Writing a New Canvas Command
robot.respond(/find the next due date/i, findDueDates);
function findDueDates(resp) {
resp.send('Working on it...'); // Send a message to a room
cs10.get('/assignments', { per_page: 100 }, function(err, res, body) {
future = _.filter(body, isFuture);
next = _.minBy(future, dateDist);
due = new Date(next.due_at).toLocaleString();
msgText = `The next assignment ${next.name} is due on ${due}.`;
resp.reply(msgText); // Notify the asker with reply()
});
}
function dateDist(assn) { return new Date(assn.due_at) - new Date() };
function isFuture(assn) { return dateDist(assn) > 0 };
• robot registers a regular expression to a callback
• callback can do whatever it wants!
• You can send() or reply() and more
• CS10 object is just a Canvas API call.
A (Mostly) Complete List of Our Auotmations
- Resetting Quiz Passwords
- Checking and auditing student 'slip days'
- Uploading Grades to Canvas
- Handling Late Add Students
- Emailing TAs + students of revised due dates
- Updating due dates in Canvas
- Sending messages to multiple people easily
- Slack's 'groups' feature, but for free! (and before Slack had it)
- Searching Google Drive
- Piazza Links