Thoughts about this Course and How to Learn Programming
This is the second time I've taught programming as a full course. As
such, I'm less certain than usual how the class will go. I am
confident that the course will be a success, but honest feedback on
the course will be especially important. Here are some general
thoughts on how to go about learning programming and also some
specific thoughts about the course.
- The only way to learn programming is to do it. A lot. I suppose
that this is true about learning just about anything. But it seems
somehow more true for programming than some other areas.
- I think that a key to meeting the goals of this course is to start
fast. I want to dive right in and have you do a lot of basic
programming in the first few weeks. I will be off-campus week two,
and so my plan is to cover a lot this week and then give you next
week to do a lot of work on your own. I will be available for help
via email while I am away.
- I have never taken a programming class. I learned C++ mostly on
my own, but had help from some friends and colleagues who are very
good programmers. I have been coding in C++ since 1995, have used it
extensively in my research, and have taught a class and several
tutorials in C++. I do not consider myself to be an expert
programmer, although I am certainly not a beginner, either. I am
relatively new to python and am still learning some of the details
of the language.
- I will use class time to explain general concepts and some
particularly tricky or subtle aspects of coding. Sometimes I will do
an example on the screen and then you will spend time modifying the
code and trying it out on your own. However, my aim will be to
complement the
text and not duplicate it. It will be essential for you to spend a
fair amount of time thoughtfully reading the book. I think the book
is well written and is almost always quite clear.
- This class likely will be a lot of work at times. It is difficult
to estimate how long it will take you to complete a programming
exercise. This is the nature of programming. Sometimes a program
compiles on the first try. Other times it may take days. Learning to
struggle and cope with this is part of the course.
- Particularly at first, you won't understand everything. I think
the best thing to do is to blast ahead anyway. When learning a spoken
language, it is inevitable that you'll have to use grammatical
constructions that at first you don't understand. Only after you've
learned quite a few things does the logic of the language come into
view. I think learning a programming language is similar. Don't feel
like you have to be perfectly comfortable with one chapter before
going on to the next.
- If you're not keen on python, don't worry. Once you know one
language it is relatively easy to pick up an additional language.
(Learning to program isn't the same thing as learning a particular
language.)
- Some of the programming exercises might be a little tedious. It
will be a while before you'll be able to code up anything really
interesting or new. I don't think there is any way around this.
However, by the end of the course you will be able to write your
own, reasonably complex original programs. You should have a fairly
large number of working programs that you can use as templates and
starting points for other programs that you might want to write in the
future.
- Programming is an art as much as a science. Effective programming
involves creativity and originality; it is not simply a technical
skill.
- Programming is also a "state of mind." To program effectively
requires patience, focus, and motivation. This state of mind has been
likened to that which is gained in practicing certain sorts of martial
arts.
Other's Thoughts
Here are some essays on how to learn programming, how to learn to be a hacker, and generally how to learn. I don't agree with all recommendations, but these make quite interesting reading.
- Undergraduation by
Paul
Graham. I think this is an excellent essay. Highly
recommended.
- Teach
yourself programming in ten years by Peter Norvig, director of
research at Google.
- How to become a
hacker, by Eric
Raymond.
- How to
be a programmer by Robert L. Read.
- Advice for computer science college students by Joel Spolsky