welcome back to the education track of
pike online 2021 and i am joined by the
fabulous tom kuntz and he's going to be
telling us about 10 tips for teaching
technical topics
uh which will be a fantastic talk um
i've never felt quite so lacking in a
pop filter as i do right now
um
tom a quick introduction to tom he's
been teaching programming professionally
for four years at the university of new
south wales he's a course administrator
for comp 1511 the programming
fundamentals course in unsw school of
computer science uh in that course he's
taught more than 200 students of varying
programmabilities the c language so i
can ask him all about c and python and
all of that stuff later in the questions
yes this is a subtle plug to write your
questions in the question um uh but
outside of teaching tom's an avid python
programmer having worked worked
professionally as a python software
development developer
uh and using it to make tools for
teaching uh as user-friendly debugging
systems and assignment marking and all
sorts of things
um now i have threatened an outrageous
amount of interpretive dance um but
rather than rather than fulfill that
promise threat now i'm gonna leave you
with tom uh for this fabulous talk thank
you so much
thank you very much um i'm very excited
to be here so yeah my talk is 10 tips
for teaching technical topics with tom
because i thought that a bit of
alliteration in the afternoon would be
acceptable
so
what do i want to get out of this talk
let's go to the first slide there we go
which is i have sort of three aims for
three different groups of people if
you're new to teaching coding i'm hoping
that this will just be a bunch of tips
that will help you
this talk was originally written for new
tutors at the school of computer science
at unsw
so the hope was you know just giving
people tips that are useful but i
realized coming to a conference like
pycon where in the education track
some of you may also already be very
experienced teachers in which case i
hope what this talk gives you is easier
ways to communicate what are important
things about teaching programming to
other people and maybe as a sort of
reference or something like that that
other people can use and even if you're
not a teacher at all i still think that
this talk is useful because anything
that you're doing involving technology
is really communication and hopefully
some of these tips will help you do
things like bring on a new hire at work
or work on um
any sort uh any sort of project um and
communicate during that project so let's
go through
my first tip is just a really simple one
which is like what is it to be a teacher
um i think that teaching breaks down
into two different parts the first part
is transferring a mental model from your
head into another person's head and the
second part is figuring out where
somebody else's mental model diverges
from yours but your question might be
what's a mental model it's a way of
explaining the world so for instance you
might think of a variable and say well a
variable is just a thing inside of a box
that you can change out it's got a name
that you can refer to and that's going
to explain how python or any other
language works as far as it goes now
obviously if you're then going into the
internals of python and you're making
some you know deep changes to the
semantics of things that might not be
enough but the idea is it's an
appropriate level of understanding that
will explain the behaviors that you see
and so my thesis is that probably for
the first 10 minutes of when you're
teaching something what you're doing is
you're trying to construct a mental
model and transfer it to somebody else
but unfortunately the process from going
from your brain to your mouth to the
other person's ears and then into their
brain is a lossy one and so i've had
this image here of just like the sort of
compare the pair almost between two
different images and you can see there
are all these little changes and so most
of our work as teachers in my experience
is finding those little differences and
bringing them to light and explaining
them away so that you and your student
eventually end up with the same model of
how the world works i've got a few
examples here of what that looks like so
the first one is an exercise that we do
in com151 in our very first week and i
think this works for any any uh
programming language what we ask people
to do is to make a peanut well give
instructions to that tutor to make a
peanut butter sandwich you might think
this has nothing to do with programming
at all but the idea is by asking
students to make a peanut butter
sandwich just with instructions and then
by really messing up their instructions
so you know they'll tell you to get a
piece of bread and you'll just like grab
a whole
loaf or something like that
you you teach them this idea that your
programming has very specific
instructions that there is you know you
need to be precise in what you're doing
and also that you need to break things
down into smaller steps and we're giving
them a taste of that frustration that
i'm sure we've all felt if you know i'm
trying to teach this thing uh teach this
computer how to do what i want but i'm
trying to communicate it in a way that
it doesn't understand
so
this is an exercise that is one way of
transferring a mental model from your
brain to your student's brain um but
then a little bit later on in the course
another example that we might have
is this piece of python code so we teach
in c but i'll give my examples in python
here is an example of having two
variables one set to one and the other
one is set to an input string and so
students will try and add those two
things together and they'll say why
can't i add one plus three and so here
their understanding of variables is
perfect their understanding of printing
is perfect but clearly what they don't
understand here is
that adding a string and an integer
isn't possible or maybe it's you know
they don't understand the difference
between integers and strings and then
there's actually a distinction there and
so a lot of our job then will be finding
out that place where their understanding
differs and giving them a good mental
model of why the world works the way
that it works so make this error not
only to fix this error but to make it
make sense
and so the first tip here is just
always ask yourself what is different
about the person's mental model to yours
or alternatively like what mental model
do you want to communicate to them
so that's tip number one no more tips to
go uh but i'll mention as well
practically try not to just be a code
fixer when you're giving
when you're helping a student you don't
just want to like go in and fix the code
that's there you actually want to
understand why they thought that that
code was correct and to make it better
and to make their understanding better
as well
um so tip number two is then creating an
environment for learning so if we're all
agreed that the the important thing here
is uh you know creating a mental model
and transferring it to someone else
that's not going to work if you're not
in in an environment where you can
actually learn and so there's this great
idea of psychological safety and
google's teams study which was a study
they did of different high-performing
teams said that psychological safety was
the number one thing for high
performance and it's just as important
in education so what is psychological
safety here's like a textbook definition
but really what it means is just that
feeling when you're with people and you
know that it's okay to mess up you can
make a mistake and that's not a problem
you're not going to get judged for it
you're not going to feel belittled and
your peers aren't going to you know
ridicule you in some way and so
um this is this is a concept that's
that's so important in teaching because
if you don't have psychological safety
somebody's not going to show you the
reasons why they didn't understand
something they're not going to let you
into their problems and and allow you to
correct the misunderstandings that have
grown into this incorrect program that
they've shown you
so here's an example of this maybe so
you know a student gives you a program
where my number equals two and you're
saying well if my number is is less than
zero print out positive this program is
supposed to print out positive if it's a
positive number but it's only printing
out
negative numbers as positive i believe
so you know if a student came to you
with this code i'm hoping most people
here wouldn't say well this is just an
incorrect program here's how you fix it
what's probably better is to say this
this is a great program it's doing
almost exactly what you want and if you
changed positive to negative it would
work perfectly and hopefully students
will almost by themselves figure out you
know okay so maybe i've gotten the the
positioning of the of the
less than sign wrong or something like
that and so if you work through this
example you don't just say no this is
wrong but you
know make them feel like they've gotten
somewhere and they've just got a little
bit further to go that's when you're
going to get that sort of
psychologically safe feeling and that's
when you're going to be able to get that
student to learn something
so again tip number two here is
practically it's just that sort of
psychological safety but i think another
way of talking about it is that like
students remember the way that they feel
so it's not just about you know exactly
what you're doing and what you're
teaching them but it's also about
uh the feeling that they come away with
you know if you remember your best
teachers they're almost certainly the
ones who you felt comfortable with them
who you could bring your problems to
them it's not just you know that they
taught you calculus well um and so as a
practical sort of uh corollary from that
basically just never say no that's a
that's a rule that we pretty much teach
most of our tutors at unsw is you don't
just say no to something don't just say
like this incorrect you can almost
always find a way in which this is the
correct answer to a slightly different
problem that if you just make a slight
shift in how you understand things it's
all going to become clear
so that's tip number two tip number
three is well okay we've created a
psychologically safe space and we've
also understood that you know our job is
to transfer a mental model so how do you
actually find the mental model and to me
this requires sort of three steps the
first thing is you're never going to
find a mental model without interacting
with the student in some way so you
don't just want to look at their code
and make a guess as to what went wrong
you probably want to have a chat with
them as well and say okay so
you know what why is this why did this
error come up what were you trying to do
all those sorts of questions
when you're chatting with them i
recommend starting two steps back from
wherever you actually uh whatever
question they asked you so maybe they're
asking you a question about this if
statement start and ask you know why are
you asking me about this if statement or
what are you trying to achieve
and like i said pretty much all of this
is going to be asking them questions
even though they've asked you a question
you're trying to understand the
rationale behind the question and what
they're what they're trying to
understand
is how you're going to find that mental
model
and the biggest tip i can give here is
beware of what's called the x y problem
so the x y problem is basically somebody
wants to know one thing
and they think that the way that they
solve this problem is by understanding
another thing so they ask you about that
other thing without asking you
without telling you the reason why they
think that that's the right solution and
so the reason this is so problematic is
because a student will come up to you
and say i'm trying to understand
let's say how do i connect to the
internet and maybe you tell them oh
you've got to go and install the
requests library and do this thing and
that thing and they go off and about
three hours later they come back to you
and they say
this really specific thing isn't working
and you look at their code and it's just
nowhere close to what they wanted
had you stopped and said and taken a
step back and said why do you want to
connect to the internet maybe you'd find
out oh they actually wanted to do this
other thing and really what they wanted
was the answer to an entirely separate
question and so again all of this is
going back to finding what their mental
model of the world is finding the
reasons why they're asking the questions
that they're asking and understanding is
that the right question to be asking
so here's another example again um so
here's a here's a list with six numbers
in it they're trying to print out five
of those numbers and maybe they've asked
you you know why is that last five in my
list not getting printed out and the
answer is well in this case it's just
because there's a five in that range
statement so they're going from zero up
to five but not including five
but this really
you you could give them the answer oh
five isn't getting printed out because
the range statement's wrong change the
five to a six
but that's really not going to give them
the full answer that you want if you ask
them the question okay what are you
trying to do and they say i'm trying to
print out my numbers well then you can
say okay well maybe there's a different
way of doing it maybe instead of using
for i in range we could just use four
number in my numbers or maybe you could
do something even crazier and say oh
maybe you just want to print out my
numbers as a whole array and so if
you're asking these questions you'll
probably get a better answer to them and
one that actually fixes their mental
model or helps grow their mental model
in a great way
um so yeah the tip here is sort of try
to start from two steps back and
understand their mental model
and then practically i would suggest
before you answer a question make sure
it's the right question uh and and often
that's going to involve asking questions
before you actually answer a question
cool
so now we understand okay we've got to
understand a mental model we've got to
have a psychologically safe space how do
i actually communicate that that that
message how do i communicate the the
mental model there are a bunch of tools
that i'd suggest considering that you
might have at your disposal so things
like you might start off with paper you
might use your hands as you're seeing
i'm gesturing wildly approximating
interpretive dance
you might have models you might have
analogies you might have cahoots
all of these different tools or
different ways that you can communicate
your message to somebody else
even more simply than that underneath
the tools that you're using you can
often design the way in which you're
asking questions uh to make them
advantageous to you so for instance you
can use somebody's experience of maybe
they understand how a shopping list
works and if you're trying to explain to
them a list if you ask your questions in
terms of well how would this work on a
shopping list a whole category of
problems that they're you know maybe
they don't understand why like adding to
a list works or something like that that
whole category of problems goes away if
you're asking the questions in such a
way that maybe it uses their own
experience or it ties back to an analogy
that they already understand so when
you're trying to get your message across
both think about the actual tools that
you've got so things like cahoots or
whiteboards and also think about the way
in which you're asking those questions
those are both really important ways of
of getting your message across and so
the tip here is you know think about the
methods that you're using to communicate
and why not learn some new ones as well
so one of the nice things i've seen
today at pycon is you know different
people talking about all these useful
tools that people have and so you can
maybe experiment with these new tools as
well to communicate better or to
communicate differently
so my fifth tip here is something that i
think we often have to tell to newer
tutors and that is because they'll start
off by watching another tutor or
watching the person who taught them
they'll try and copy the style that that
person has and that's a great way to get
started if you're really not sure what
you're you know how to teach copying
what someone else has done is a good way
to just find your feet and get your
confidence but you don't need to teach
like everybody else
so there are different things that you
can try so maybe you can try you know
making uh good jokes or maybe you can
try
you know being being serious or maybe
you can try being a little bit uh sort
of sarcastic all of these different
things with a different person might
work really well
similarly i've done some lecturers who
love using memes some lectures who love
using little games
um some people who just like draw a lot
and each of those again can work really
well with a different lecturer
how do you interact with students if you
can find tools like using your hands or
using poles or using a chat if there is
one all these sorts of things again are
great ways of
having a style that you can experiment
with that you can change and that you
can maybe reach people better with and
so what i'd recommend here and i'll talk
about this a little bit more in a second
is you know ask yourself what are the
teachers that you've enjoyed done are
there things that you've noticed helped
you when you were learning and that
maybe you can integrate into your own
style more and more for me i know that
there are certain phrases that i've
heard throughout my uh time teaching
that i've sort of borrowed so um that
one one of my favorites is uh you know
if you if you try something once and it
feels good let's do it again and so i
love that phrase you know we'll talk
about while loops and that's something
i'll bring up or um
all these sorts of different
jokes maybe or phrases or ways of
explaining something they're all great
things that you can use to to improve
your uh improve your style or just
change your style
um yeah so tip five is explore your
style
tip six is a really concrete one and
this is something that we definitely
hammer in during tutor training
never touch the keyboard and so
the reasoning behind this is that the
moment that you are touching a student's
keyboard or touching anybody's keyboard
really you're taking away from their
opportunity to learn
and you can often cover up the fact that
they're not understanding something by
you convincing yourself that oh i'm
explaining to them what i'm doing and
i'm just touching the keyboard
unfortunately
if they're not the ones doing the typing
now they can start thinking about oh
what's for dinner or i'm you know
thinking about another course or
whatever whereas if they're the ones
having to type they're actually in the
moment they're having to understand what
you're saying they're at least
understanding you know there are keys
that i'm pressing and maybe they're
getting something out of that but it
means that they're in the in the moment
they're they're actually with you when
they're listening to you so
absolutely a great rule of thumb is
never touch the keyboard if you're able
to interact with somebody's screen or
interact with their keyboard i would
just suggest avoiding it
and here's an example of this right so
if let's say this small python program
and you're looking at it you're just
saying this is they've gotten the right
code but it could be so much better
if they just said you know if my number
is in this list of special numbers it
would work so much easier
and if you give into that temptation to
just sort of edit their code what
happens is that they'll look at their
code and it won't be their code anymore
they won't understand what they've
written they won't understand what what
you've been thinking and i've often had
a situation where i'll have a student
come into a consultation and they'll say
here's a piece of code that my tutor
helped me with and i really don't
understand it and and often i think a
cause of that is when a student has had
part of the code written for them or
dictated to them
without explanation and they really
don't understand what's going on
so yeah tip six never touch the keyboard
tip seven don't teach alone um so i
realize that you know not everyone is in
the same position where they have this
luxury of being able to go and find
uh lots of other people to watch them
teach um
but where possible i would suggest
watching how other people teach so you
know if you can find
different presentations online or
different ways of explaining the same
topic
what you're going to do over time is
you'll see the different ways in which
people
present something
you can keep an eye on their style
as well as that what you'll often find
is that you can um when you're getting
taught something you can have in the
back of your mind you know like how is
this person trying to teach me this
thing how are they doing it and that
again can be super handy because if
you're watching them and trying to
understand you know what are they trying
to teach me and how are they doing it
that's a really good way of of
understanding um
of seeing teaching styles and seeing is
this good or is this not good
um practically though the other reason
why it's really useful to not teach
alone is because if a student doesn't
understand you you can bring somebody
else across uh you can you know
somebody might have a different style
and i i sometimes students get really
worried when or
sometimes new tutors i should say get
really worried when they're like the
student i've been sitting with them for
10 minutes they don't understand what
i'm saying often it's just that you know
maybe you have a slightly different
teaching style or maybe
you use different analogies and it
doesn't quite click with them so having
a second person there can be really
handy because it means
somebody else is is there to
sort of collaborate with you and jump in
and give them a break and even that like
short break even if you're the only
person there is amazing because if
there's a short break there you can
change your style
sorry
yeah so
being able to change your style in a
short break like i just did there um
can be amazing because it gives you
uh a distance from your previous
explanation and now you go to a new
explanation and maybe that helps better
so even if you're the only teacher there
i can still recommend you take a break
or even if there's like another person
there
maybe get them in an and and see if
having another person who could that you
can work with or a more experienced
student who maybe understands the
content already bring them in
to just play around and see if having
another person there will help
so yeah tip seven find other people to
learn from and to teach with
cool
tip eight
dealing with particular types of
students this is a bit of a big tip um
whenever you're teaching more than one
person you'll almost always have a
spectrum so that's from students who are
struggling who maybe missed previous
content who uh you know maybe they've
got other things going in on their in
their lives then the other end of the
spectrum is you know you've got really
fast students who are working
uh way ahead of the content maybe
they've already learnt programming and
it can be really difficult to run a
class of even a few people if there's
this sort of spectrum
the the thing that we generally point
our tutors at is this sort of one-third
rule so you can't teach everyone at once
so try and aim for a third of people
thinking it's too fast
that's generally a good balance between
most of the class being able to follow
and being able to learn
and being engaged maybe there's one or
two people at the bottom of the spectrum
who you need to
sorry
who you need to um catch up later
or
maybe there's a few people at the top of
the spectrum who you need to um
uh sort of give extra work to but that's
generally a good middle spot
when you're dealing with those
struggling students i'd suggest you know
some patience of course giving them
tasks to do and coming back to them
later is often also a useful trick so if
you have spent a while with a single
student or you've spent a while with a
group of students
give them something simple to do so they
can sort of have a break from your
explanation and then come back to them
later and of course remember remember
psychological safety
for faster students um we have this
concept called speed bumps and that's
the idea of a
a tool
to you know a really complicated problem
that gets them engaged in something and
means that they're not going to be sort
of um
just
holding up the rest of the class with
their sort of interesting question
that's way ahead of the class
the other thing you can do as well is
get them to help now of course some
students might not have the the skills
that you they need to help another
student but often if you pair people up
together the fast students can be useful
to those slower students or or to the
struggling students
so yeah tip eight uh any group of people
will form this sort of continuum
have strategies to deal with all of them
and see if you can sort of target that a
little bit below the middle
um
cool
tip number nine
uh dealing with imposter syndrome so
what is impostor syndrome it's this idea
of you're you're not feeling um
uh confident or or capable of doing this
job of teaching people
and i know it's something that almost
every shooter uh struggles with at some
point and there are two tips that i've
or two sub tips here that i've got which
can help kind of combat it the first one
is to think that even if you're not the
best at this particular subject often
there's a student in your class who's
been doing it for years and you're like
oh my goodness this student is way
better than me
teaching is a separate skill and it's a
skill that's you know just as relevant
and valid and so maybe you're not the
best at this particular coding topic but
you've still got the skill of
communicating it to other people and so
if you think about your skills in that
way sometimes that can help with the
thought of you know like oh i'm not good
enough because there's one person knows
how to code better than me
the other thing is to think even if
still you're not the best person in the
room you have a set of unique
experiences and a perspective that
people might find useful so it's really
important to think about okay even if
somebody else could program better than
me and can teach better than me there
are some people in this room who have a
shared experience maybe they're gamers
and they love
mario and you can use mario themed
examples or maybe um you know they come
from the same background as you so
you have some sort of context there that
you can share so
everybody i think is has a unique
experience that makes them a good
teacher in their own way and so i often
think that remembering those things can
be useful uh for for dealing with that
imposter syndrome so yeah you have
unique experiences and that's why you're
a teacher
um my final tip uh sometimes it's better
not to know
so a really common question that i get
from from newer tutors is like what do i
do if i don't know the answer to
something and that can be scary it's
really scary to be standing in front of
a class and have a student ask you
something that you don't know the answer
to but if you don't know something
counterintuitively that's actually a
good thing because most of the work of
being a computer scientist or being a
person who codes
is finding out the answer to a question
that you don't know
so
what you can do is you can say i don't
know this is a great question and so
next what you've got to do is show them
how to find out you know go on google go
on stack overflow
often we'll get people to open up a text
editor and actually write a program to
try and answer the question
and so making these mistakes or not
knowing something is really a good thing
it means that you're um you're showing
somebody a skip the skill of how to
learn
and it also kind of helps because it
shows that you're not perfect you know
it can often look like a person who's
been programming for a while is just on
some different level and it's an
unachievable level of perfection in
their programming but the secret is
everyone you know learned how to program
and everyone has their own challenges in
writing code so
showing that off and and making that
okay is sometimes a is a good thing and
it definitely contributes to
psychological safety as well
um so yeah tip number 10 the last tip is
it's okay not to know something show
people how you would find it out
um so that's the 10 tips i'm sure that
there's
things that you tell your your students
or you tell other people who are
teaching that i've missed here so i'm
really curious to know what people think
i've missed what other questions there
are if there's any other discussion i'll
be really keen for that
but that's the end of the talk
hello fantastic thank you so much tom
um i wasn't sure we were gonna get
through all ten but we did
that was great
indeed um okay we've got a couple of
questions and we've got a couple of
minutes so it'll totally work out and
then they'll be dancing as promised
um
uh the first question here we go um
stack overflow
lacks psychological safety indeed it
does uh what would you do to help fix
that
oh this is an interesting question i i
love i love that is like outside
the the talk but like so relevant
it's absolutely relevant um
look i'll be honest i think part of the
issue and part of the way that unsw
fixes this is that we have our own
forums um and i understand that you know
fixing stack overflow is going to be a
big task so having safer spaces where
students can feel confident to ask those
questions
um
is a really good thing and also teaching
those students good practice in terms of
how are you respectful online how are
you
teaching other people well um that's
definitely something i i would focus on
and then you can sort of transition to
linking those students to external
resources that are good examples of
being sort of psychologically safe
and hopefully that means that over time
those students have seen some of that
stack overflow stuff without being
exposed to the worst of it um
in terms of fixing a platform as big as
stack overflow i think that there's you
know there's a large sort of societal
change and and changes to the platform
that almost certainly needed to
cause that big of a shift in how it
works but i think for our students there
are definitely things that we can do to
make them feel safe even when they're
going onto those platforms or to
create experiences that avoid them going
onto those platforms
i i guess that actually leads us into
this second question uh we may have time
for third one afterwards how do you
encourage psychological safety in your
course if students want to ask a
question
um that's a that's a that's a great
question one of the examples that i
removed from the talk which i can bring
up now is
often trying to avoid asking a single
person something is a really great way
of making people feel safer to answer
questions so uh one thing that we
especially use a lot now that we're
online is polls so if you sort of ask a
question and then you know everybody can
answer together it's a lot less scary to
click a button and and fill in a poll
than it is to answer a question and put
your hand up and and possibly be wrong
the other thing as well which i talked
to some of our new tutors about is this
idea of contribution being kind of like
a battery where you need to recharge
effectively so students they come in
they don't really want to contribute
they can do small things like you know
filling in a poll and as the lesson goes
on if they're having fun and if they're
feeling safe they'll feel more likely to
be able to put their hand up or
contribute something bigger so
conserving that battery and thinking
about you know
structuring things in a way that doesn't
use up too much of it and that you're
creating experiences where people feel
safe and are recharged to contribute
again those are both things that i would
be thinking about yeah there are so many
things to balance here making sure that
everyone is
actually engaged and welcome and feels
able to contribute and safe to
contribute at the same yeah
gosh it's it's hard challenge teaching
is hard is difficult man
what
almost like we should have a whole track
about it at python ah almost almost up
there are uh there's another question
and i'm sure people have more questions
but we are at time
so i'm going to throw this question over
to the hallway track and invite you and
you lot uh on the stream to jump over
there as well
and up next
is me and amanda and we're going to be
talking about
the education showcase the student
showcase and i am
very excited about that so tom thank you
so much um
uh we will chat more in the hallway
track uh and i hope you'll all join us
to see what these students have come up
with this year thanks so much
you