Giving the Perfect Intro to Coding Workshop...in Python!
2021-02-20, 15:20–15:45, Prerecorded Talks

In this talk, we'll walk you through a tried and tested intro to coding workshop that you can use to teach others how to code, even if you're a beginner yourself. We've given this workshop in person and remotely, and now we want to share our lessons with you on how to run a successful workshop for people who've never touched code before. We'll also give you our slides to the workshop, so you can go forth and spread Python with ease!


Introduction
  • Myself (and possibly other co-speakers):
  • An expert by no means, but passionate about showing others that they are capable of learning how to code.
  • (All other info has been removed.)
  • What we're doing today:
  • Walking you through an intro to coding workshop (in Python, of course).
  • Giving you pointers on how to run this workshop successfully (whether in person or remotely), and the rational behind the design of the workshop.
  • Giving you the slides for this workshop for you to modify and use as you wish. Roughly these slides. (All identifying information has been removed.)
  • The history of this workshop:
  • Originally an in person workshop. (Unnamed here so as not to identify anything/anyone.)
  • Later modified to be remote for a virtual conference. (Unnamed here so as not to identify anything/anyone.)
  • Note: this workshop takes 60-90 minutes to do with a group of people who have never programmed before, but we'll be going through the main points only since we all know Python and want to focus on the teaching aspects.
Workshop format: both in person and remote
  • Project/Screenshare the workshop slides and also give them to the attendees.
  • Also provide the attendees with the slides so they can follow along at their own pace.
  • Mentors are people who know the workshop material well and can go over to an attendee's computer and help them during the free time parts of the workshop.
  • Aim for a radio of 5:1 mentors:attendees.
  • Give mentors access to the slides at least a few days beforehand so they can familiarize themselves with the workshop.
Workshop format: in person
  • Ideally, each person would have their own computer. Pairing up would also work.
  • The computers need to be internet connected, as the coding will be done in repl.it.
  • There will be group parts to the workshop, where the presenter explains concepts and gives instructions. There will also be "free time" parts, where the attendees can do exercises on their own and raise their hands ask the mentors for help.
Workshop setup: remote
  • Use Zoom, Discord, or another video conferencing app that allows for screensharing. Depending on what format you choose, you may need an app with the ability to go into breakout rooms.
  • Attendees will need to secure their own computers and have sufficient internet access.
  • Just as in the in person workshop, there will group parts and free time parts. The free time parts can be done in two ways:
    1. Put the attendees into breakout rooms with 3-6 attendees and 1 mentor, where they can ask questions in a group setting.
    2. Provide additional rooms with 1 mentor each, that the attendees can join if they have questions.
  • The disadvantage of #1 is that some attendees might feel too shy to ask a mentor their question in front of others. The advantage is that others in the breakout room will hear common questions.
  • The disadvantage of #2 is that going in and out of breakout rooms electively can be confusing. The advantage is that asking questions can be done privately.
The problem we're solving
  • Show some demos of password generators: LastPass, end result of this workshop. (No identifying information.)
  • This end result of this workshop is a simple password generator program. This is great for the attendees to take home because it feels like they accomplished something, rather than just messing around with some code.
  • PSA about password managers.
What coding and Python are
  • Provide the attendees with some context.
  • Some definitions, explanations, and examples.
How to use repl.it
  • We found that getting used to a coding environment like a text editor or an IDE is a huge challenge for people who've never coded before. Repl.it is a free webapp that you can use without an account. It's easy to use and works on most browsers.
  • Explanation of the code area, terminal area, and how to edit and run code.
Hello world!
  • Walk the attendees through writing a "hello world" program in Python:
  • Demo in repl.it the code you want them to write: print(“Hello, World!”).
  • Break down what each part of the line of code is doing.
  • Demo it again.
  • Take questions.
  • Free time: tell the attendees to play around with the code for 5 minutes and ask a mentor if they have any questions. Emphasize that they'll learn not by copying the code, but by changing one small part at a time and observing what happens. 5 minutes may seem like a lot, but the struggles and questions of beginners would surprise you.
  • Demo it one last time and make any final points (for example, if there was a question that many attendees had) before moving on.
  • This is the format that we'll use for each stage of the workshop: demo, explain, demo again, tell the attendees to try it on their own and ask the mentors for help, then regroup.
Another example
  • We won't take you through every detail of the workshop, since it largely follows the format we just saw, but here is another example of this method.
  • While Loops:
  • Motivate the problem: we can generate a single random character, but a good password is longer than 1 character! How can we repeat the same thing more than once?
  • Demo a while loop in repl.it.
  • Explain the code behind the while loop and what it's doing.
  • Demo the while loop again.
  • Take questions.
  • Tell the attendees to play around with the code for 5-10 minutes and ask a mentor if they have any questions.
  • Demo it one last time and make any final points (for example, if there was a question that many attendees had) before moving on.
  • In each step of the workshop, we follow this pattern to make 1-3 lines of changes to incrementally build a password generator program.
  • Through this method, the attendees will learn how to use: variables, the input() method, while loops, and the random.choice() method, data types and type conversion, debugging (indentation, brackets, capitalization, etc.).
Debugging:
  • We also include some curveballs in the demo part of the workshop. Yes, sometimes we initially give them the wrong instructions as we present a new idea.
  • For example, we demo while i < password_length:, which produces the error TypeError: '<' not supported between instances of 'int' and 'str'.
  • We work as a group to solve the error and explain what data types are.
Challenges
  • At this point we've gone through all the steps to make the basic password generator program.
  • Invite the attendees to play around with their code for the remaining time (free time).
  • We present some features they can try to add to their program if they want a challenge.
  • The mentors will be available to help.
Ways to continue learning
  • Include links to ways they can learn more about Python/coding.
Conclusion
  • By the end of this workshop, your attendees have learned how to write basic Python code, use some basic branching and loop structures, use methods like input() and random.choice(), distinguish between different data types, and do some basic debugging. They've also written a useful program!
  • Now that this talk is over, you should have learned how to put together an intro to coding workshop (online or in person) and feel prepared to do so. If not, you can talk to us and we'll see if we can help. :)

Dawn (they/them) is a software engineer at Skip the Dishes and recovering serial intern. While they were at Simon Fraser University (SFU), they did 5 internships from frontend to backend and Microsoft to a startup. At SFU, they majored in Computer Science and Linguistics, were President of the Women in Computing Science (WiCS) for awhile, and were even named Woman of the Year 2019 for the Faculty of Applied Sciences. Dawn is no stranger to passing along knowledge. They've given workshops on interviewing, LinkedIn, and beginner programming, but PyCascades is their first conference talk.

Jennifer is a third-year Computing Science major at Simon Fraser University (SFU) in Vancouver, where she is the Co-President of Women in Computing Science (WiCS). She enjoys teaching programming to new coders because she believes that an accessible education in tech is the foundation of increasing diversity in this field. Jennifer was the Chair of try/CATCH 2020, a virtual conference for highschool girls to learn about programming. Last summer, Jennifer was a STEP intern at Google.

Doris is a second year CS student at Simon Fraser University. She is passionate about helping others learn to code. She taught Python to grade school students at her high school and hosted a workshop at the virtual try/CATCH 2020 conference for highschool girls.