Hello and welcome to the third sequence of
lectures in the course on design and pedagogy
of the introductory programming course.
Our topic for today is pedagogy.
So a quick review of where we are.
We have defined the topics to be covered in
the syllabus in the last lecture and in the
earlier lectures we have said why introductory
programming is important and we have discussed
some problems and some challenges in teaching
this course.
Now that we have defined the topics to be
covered in the syllabus and we have done a
detailed discussion of the rationale, scope
and the depth of each topic, our goal is to
think about how do we teach all this.
Having a set of topics is quite different
from the way we present them and of course
the way we present them did have an effect
or whether we can present these topics properly
did have an effect on why we chose certain
topics and why we did not choose certain topics.
However today we are going to go into detail
in the teaching, in the delivery, how do we
deliver all this material to students.
The first question is how do we motivate all
these topics to students.
The topics should appeal to students’ tastes,
career goals and not only that also the sense
of fun.
Should we use any scaffolding?
We have discussed scaffolding some time ago.
By scaffolding we mean extra code to be given
to students to get started quickly.
So, this is sort of like putting training
wheels on a childrens’ bicycle.
So, if you put training wheels the child can
start cycling and the training wheels in fact
help the child get the basic competency and
sometimes the child can learn to ride a bike
by himself without anyone even helping.
So, can we have some scaffolding by which
our other students will be encouraged to play
around and maybe learn a lot without us helping
them too much?
We could have scaffolding for the purpose
of getting started quickly but the scaffolding
can also be used to enable appealing programming
applications.
So, without scaffolding we are being limited
to some set of applications.
If we throw in some code then may even be
able to get a richer set, a more interesting
set of programs as examples in our lectures.
And also as assignments that we give to students.
In addition, when we decide how to teach we
can think about how the course has been taught
earlier and what teaching problems have we
noticed.
So, one teaching problem that plagues this
course is what might be called the slow start
problem.
So, typically several initial weeks get spent
without writing exciting programs.
Now we may say that we cannot write exciting
programs unless students know many things
and that is true.
However, that puts a big damper on the enthusiasm
that students have at the beginning.
They come into the course they are ready to
go they have a higher energy levels and we
have to somehow get them to work very quickly.
Then some other problems that have been noticed
are that looping constructs are hard to learn
for many students and as we know looping is
sort of a very basic programming idea.
Iteration and recursion are two core elements
of programming and looping is iteration and
you want every student to master the looping
and of course recursion is hard to understand.
So, anything that we can do to go over these
two obstacles seconds would be a good thing.
So, here is the outline of today's sequence
of lectures so were going to talk about the
main ideas in our pedagogy course.
Then we are going to talk about the scaffolding
were going to use.
The scaffolding is going to consist of a graphics
library and a so called repeat statement.
Then after that we do a quick tour through
the core topics in the syllabus.
Well it is not going to be quick in the sense
of it will take an hour or longer.
But it will be quick in the sense of the entire
syllabus.
So we are going to cover the entire syllabus
in it and talk about how specific topics could
be taught.
So, we will have detailed remarks and now
on to some basic ideas in our pedagogy.
Let us begin with some educational principles.
So, the first thing and the most important
thing perhaps as far as learning is concerned
is motivation.
Students need to be motivated so if students
do not want to learn, if students do not see
the point of learning then however the value
to the rest of your teaching it is not going
to sink in.
If on the other hand students themselves want
to learn then even if you are teaching falls
short their own energy will carry them through
the material.
So, what can the motivations be for learning
I cannot get a degree unless I learn this
that could be even motivation.
Those are the rules of the university, another
motivation is that my teacher tells me it
will be useful later or the motivation as
we have discussed before: it could be that
I like what my teacher is telling me and I
see it useful.
It is not just useful that students respond
to.
Students may sometimes not know what is useful
but students also respond respond to clever
or somehow the students do have a sense of
figuring out that look this idea is somehow
deep.
Well, it is a bit of a learned ability but
certainly students can figure out that this
idea might be useful, this idea seems to be
powerful.
So, if you tell students powerful ideas and
useful ideas and also fun ideas students set
up and start working on their own.
Here is a quote that I quite like.
It says if you want to build a ship do not
drum up people together to collect wood and
do not assign them tasks and work.
But rather teach them to long for the endless
immensity of the sea.
So, tell them what the payoff is going to
be.
Do not tell them that you have to do this
this this and this.
Tell them what you are going to get out of
all the hard work and then they will work
hard.
Now I have had this discussion about motivation
with many teachers and there is a university
with which I consult and in one of the sessions
I advised them that please, please make sure,
tell your students why we are learning something
and only then teach that and their teachers
how reported to me that this strategy has
changed the way students respond to them.
So, I am a firm believer in conveying motivation.
So, whatever you teach there should be a lot
of motivation given to students.
Okay some more educational principles.
In this let us think about how learning is
assimilated.
Students do not come to us as a blank slate
in fact no human being is a blank slate.
Even a baby has some likes and dislikes.
And even a baby has some expectations.
So as far as we are concerned, we could safely
say that new learning must be reconciled with
prior knowledge.
So, new learning may contradict or may seem
to have a conflict with what has been learned
before -- that is a problem.
New learning might boost what has (been) learned
before -- that is an advantage.
So, if you reconcile, or if you sort of alert
students to the connections between what they
have learned earlier and what they are learning,
students can ask a few questions about possible
contradictions.
And if the contradictions go away or if the
students somehow see that the new idea or
the so-called new idea that you are talking
about is really an idea that they maybe saw
in some other form in some other course, then
that actually helps.
It improves the quality of the learning of
both (ideas).
So, by drawing on prior knowledge learning
can be speeded up and also qualitatively improved.
What kind of prior knowledge do our students
have?
Well they have learned a lot in mathematics
arithmetic, algebra, geometry, calculus, statistics.
They have learnt a lot of physics and we have
seen earlier that much of this learning is
algorithmic.
They have learned algorithms to solve various
kinds of problems.
So, we certainly should try and connect whatever
we do with this prior learning.
Our students are somewhat mature; they are
adults, young adults and so they have some
amount of life experience I should say.
So they know networks of various kinds -- family
trees, web pages these days these days everybody
knows about internet they certainly know about
transportation networks.
So, somehow we should connect computer programming
to all these areas.
If we do that then it will get assimilated
much better so students know many algorithms
in these areas so we should build up on these.
And I have found that students actually say
that when they learn programming that it actually
helps them in better understanding the math
that they had learned.
Specifically this came about in connection
with the topic of Newton's method for finding
roots.
So, in the math course they had not really
used it, they are not really thought about
it a lot and when they learnt it again in
computer programming course -- and by the
way this is in the book that we are either
referring to and it will be in the slides
in some animated form if you choose to get
the slides of the book -- so students say
that by writing programs the quality of the
math is actually improving.
And of course if you remind them that this
topic about which you are writing the program
has been studied earlier, their programming
motivation as well as the quality of the program
that they write will get better.
I think it is safe to say that students are
excited by the connections, of the synergy
between various topics.
Of course I should warn you here that when
you say that you learned this in that course
students might also forget a little bit.
So you should think about revising a little
bit if possible though not to go over the
entire lecture.
But maybe just have a slide stating what they
expect to know and giving the students a minute
to assimilate what you expect and that will
often be enough for the student’s memory
to be jogged and you can start of moving from
that.
Another set of educational principles is that
any subject consists of principles or essence
and then there are lots of details.
So, we have to teach each details but we have
to do it in a manner that they do not overwhelm
the principles or the essence.
So, the principles still stand out the student
should still get all the details or maybe
sometimes it works better if you do not discuss
all the details in the classroom.
But you say look read the book and the book
will tell you all the details but my job in
the classroom is to hit the principles hit
the high notes.
So, of course this requires us to figure out
what is the essence of the subject that we
are teaching what is the essence of computer
programming.
So, we should have that in mind and whenever
you teach a topic it is useful to make this
distinction what is what is the big idea what
are the small ideas.
Then you can ask how does learning really
happen so this is a quote I have told you
before but this is such an important quote
that I do not feel any hesitation in revising
it.
So, confucious says I hear and I forget, I
see and I remember and I do and I understand.
So, if you use the principles that are being
taught you learn the best, if you see them
in action you learn the best.
So, pictures should be there animation should
be there.
Even more interesting: if the student herself
does the animation.
So, we should get the students to themselves
make the ideas that they are learning and
generate pictures of it.
So, if they see pictures it is more likely
that they will remember what they were learning.
So, again I do not mean this in a frivolous
sense.
I am not trying to say that we should turn
everything into a game.
But very often there is a geometric connection
or very often interesting problems arise out
of geometrical considerations.
After all of our student’s science and technology
majors.
In both these fields there is a very common
practice of drawing graphs and explaining
things via pictures.
So, I think that explanation via pictures
should get into our programming examples and
assignments that we give.
So, I am really saying that some kind of graphics
like scaffolding will be very useful to have
because that will help students remember more
vividly whatever it is that they are learning.
So, doing and experiencing is very important.
And of course we should give programming assignments
for pretty much every principle that we want
them to learn.
Then a principle from day to life: first impressions
are important.
On the first day students are most fresh,
most energetic, and possessing their most
positive attitude.
So, as the days go on some irritants might
crop up, students might get busy, students
may just get a little tired because they have
been working hard on other topics.
And on your own topic as well.
So it is important to catch the students when
they are most liveliest, most attentive and
which is the first day, and get something
exciting done on that day.
Another way, and this is also an equally good
way to express what I want to say over here,
can be produced love at first sight?
Love at first sight applies to loving individuals
but it also applies to loving topics, loving
subjects.
Can we present computer science or computer
programming in such a way that students fall
in love with it?
For this we must rise to the occasion and
provide them excitement and also a challenge.
I want to underline the word challenge over
here.
Because we may think that our students are
lazy or they are uninterested.
But that I think is completely wrong.
I think if we nurture them properly I think
they will want challenging things.
So, they will want challenges which they can
which they can rise to, which they can overcome
and overcoming the challenges will give them
great pleasure and so we have to tell them
on the first day itself.
Show them not just tell them, somehow show
them that our subject is exciting and will
provide them challenges which if they overcome
-- and we will help them overcome -- they
will get a lot of pleasure and a lot of satisfaction.
So, what I am saying really is put forward
your best foot on the first day.
Exhibit the best features of your subject
and get your students to actively participate.
Of course this is not easy.
Our students have not learned anything at
all when they come into our course on the
first day.
So, naturally there is a question how will
they understand interesting ideas and perhaps
it is just preposterous to say that we can
get them to participate.
But were going to try and tell you how to
do this.
I believe that textbooks are pretty important
for pedagogy.
I think there is a tendency of using slides
and encouraging students to study from slides.
I think slides and lectures are useful but
they also have their limitations.
As I said a minute ago, it is much better
to get the details out of a book rather than
getting every detail out in the classroom.
But there are many other problems as well.
So, for some reason or another, even the best
teacher will not always connect all students.
You may really be a great teacher but quite
possibly 10% percent of the students may have
some problem or other with you.
It it could be as trivial as somehow they
do not like your manner.
But maybe they do not follow your accent.
India is such a big country.
People all over the country have many many
different accents and teachers maybe from
one community students maybe from another
community and it is not always easy to follow
everyone's accent.
So, in that case having a book is very useful.
(Also) students may not be able to take good
notes.
Actually many students have difficulty in
understanding spoken English.
So, because of that students may not follow
you class at all.
But if they have a good book they will be
able to read it.
They will be able to read it at their own
pace.
Go over it several times.
Look up the meaning of a word in the dictionary
and they can do it in the privacy of their
home.
So, for this reason as well as for the difficulty
in taking good notes, I think a text book
is really useful provided you sort of stick
to the textbook.
A student could be absent and then what then
he or she talks to his or her friends but
it is much better if he or she can refer to
a book for the topic that could cover.
So, essentially am I suggesting that a good
textbook helps out and serves as a safety
net.
So, if everything else fails and the student
is falling the student will fall on the safety
net and not have any injury.
So, the student should be able to go back
and read the textbook, if he or she for some
reason does not follow in class.
Okay now the textbook should be chosen very
carefully.
I have seen textbooks and it is clear that
they have not been read.
There are really a large number of books in
which the explanations are not good.
Simply.
So, here are the things that we too should
have which you should look for does the textbook
motivate each topic in a manner that the student
can understand?
Not in the manner that “look this is what
experts think you should do”, in a manner,
in the language of the students, giving reasons
that the students can understand.
So here are some typical things that you might
want a book to tell you: why do we need dynamic
memory allocation, why do we need inheritance.
These questions are very valid questions which
a textbook and a teacher must explain.
There are some topics which are considered
difficult -- are they explained well, e.g.
how exactly does a function call execute.
So, this is something that is very puzzling
-- how do the arguments get copied, do they
even get copied, can we have variables with
the same name and why so.
A very precise explanation of what goes on
goes a long way towards clearing up the students’
doubts towards getting the student to understand
exactly what happens when a function call
executes.
Sometimes the explanation is too verbose so
you do not want that either.
So, it is a tricky thing.
The textbook should also discuss alternate
ways of writing the same logic.
Because after all we are teaching the language
to the student as well.
There may be there are several ways of explaining/expressing
the same logic and in different contexts different
ways might be more appropriate.
So the student should have a feeling for that.
Okay so how do you select and use a textbook?
Also you have to check whether there are good
problems.
The book should give problems from many areas
-- maybe physics, day to day life, mathematics.
If the book uses problems from physics, if
it is self-contained as we said earlier, the
book should perhaps point out that these are
the relevant facts that are needed from physics.
You could say that the book could leave it
to the student.
But we are not going to, we are not expecting
to ask very deep problems in physics when
we ask our students to write programs.
So, the simple principle could be restated;
it would be a lot of comfort for the student.
So, the relevant scientific information should
be given.
Now introductory programming mostly will work
with fairly on small programs and by that
I mean maybe of the order of twenty lines.
Because even mastering 20-line program is
not easy.
Our first set of lecture said that 30% of
the students fail and that is because they
cannot even write 20 line programs.
So, 20 line programs are most common but you
know that industrial programs are million
lines.
We do not need to go that far.
But we could think about 100 line programs
and towards the end of the course the student
should be able to write some 100 line programs
or at least conceive of some 100 line programs.
Now 100 line programs are qualitatively different
from 20 line programs.
So 100 line programs will have to be written
slightly differently.
They have to be organized differently and
so how to organize programs will be an important
question that has to be discussed for this.
Some case studies are probably the best idea
and you should check does your textbook your
selected textbook do such case studies, and
only through these case studies will your
students understand issues such as how do
I organize large programs.
If you use a textbook and we are saying that
you should use a textbook, you should assign
the reading from the book so that students
learn to become independent leaners.
So, from time to time you should say look
read this from the book because later in life
they are only going to be learning from books
so get them some practice.
Ask them to read from the book and ask them
to report to you, “did you have problems”,
“Maybe I should be teaching you how to read
a book as well”.
The important point as far as you are concerned,
as far as teachers are concerned is that a
textbook actually reduces our work.
A good textbook is there for helping us, so
let it help you.
So, motivation is needed and it should come
from the student’s world.
Motivation is why do we want to study this
topic.
We 
want to study this topic because we want to
write a program to do whatever; without the
current topic that we are studying, we would
not be able to write that program.
You should use programming examples from math
and science and even fun and art to have synergy
with the prior knowledge and career goals
of the students.
In an era of cellphones graphical input and
graphical output are very important if the
students are to take us seriously.
And graphics is of course very important for
science and math visualization.
Finally, do not let the details overwhelm
you, keep the focus on understanding computations
and structure rather than the language syntax.
Okay so the language syntax will get learned
okay if there are motivating programs to be
written.
So it is like fables like Panchatantra.
There are stories -- each story reminds you
of a principle you remember the story because
it is interesting, it is fun, but then you
remember the principle as well.
So, if you can make a story, sort of a killer
application as it is called sometimes, for
loops for a while loop (what application do
I think when I think of a while loop?), if
you can somehow get the students to think
in that manner they will understand and remember
the syntax with very minimal effort.
And finally you want to get to interesting
programming examples on day 1, to use the
enormous energy that the students have in
the beginning.
And last but not the least use a good textbook.
Okay so we will take a break here and after
that we will come to the scaffolding.
Thank you.
