xiv HOW TO USE THIS BOOK
that she felt that these chapters treated the reader as if they were now a programmer. She is right, and by that
stage in the book you definitely are a programmer, just an inexperienced one. These chapters both show you
what can be done with what you know and provide you some useful extras that you can use in your own
programming.
The last chapter has the same title as the first exactly because you will have come full circle. You start as
someone who has the potential to be a programmer and you finish as someone who knows they can program.
Whether you move from Chapter 1 to Chapter 17 like a hare or a tortoise or in some other way, getting
to the end is a new beginning and one where you will truly be able to declare ‘‘I can do it, I can program.’’
Study Elements
There are various elements built into this book, all but one of which require your active participation. The
exception is that there are places where I give you an anecdote or an analogy to help you with your
understanding or motivation.
I use two ways of introducing you to new code. Sometimes I work through developing some code
writing about what I am doing at each stage. The purpose is to show you how programs come into existence
on a bit by bit basis. During that process I will expect you to work alongside me and create your copy of the
program by following in my footsteps.
Sometimes I will give you a finished piece of code and ask you to type it in and correct any typing
errors so that the program works. After you have done that I walk you through the code explaining what the
pieces do and how they work.
Why the two ways? Sometimes experiencing what a program does greatly aids in understanding how it
does it; at other times it is more important to learn how programs come into existence by actually following
the thought processes that lead to the finished program. Both ways are valuable t o you.
During the course of working through this book you will come across items that are marked as ‘‘tasks’’.
These are things that you should do before going on with reading. Sometimes they will require you to write
a program; sometimes they will simply require that you do something exactly as described. However they
share the property that I consider doing them to be an inherent part of successfully reading this book.
Sometimes you may eventually have to look at a solution that I have provided but you should think of them
as hurdles that you should seriously try to cross without knocking over.
I have also provided exercises. I have tried to choose these so that doing them will help you develop
your programming skills without asking you to write dozens of repetitive programs that lead nowhere. In
general doing the exercises will be good for you but missing a few will not be a disaster. Your personal pride
should motivate you to do the exercises unless they have been marked as ones for specialists (there are a few
marked as ‘‘for mathematicians’’).
There are some places where I explicitly invite you to try something for fun. These are only a reminder
that you should be trying the ideas you find in this book and it should be fun. You should be trying things
that you want to show to others. You may be lucky enough to have an appreciative family, friends or
colleagues but i f you haven’t (or even if you have) I want others to see your work and I invite you to send
me things you are proud of so they can be made public via the book’s website. Your best work will deserve a
wider audience so do not be too shy to put it forward.
End of Chapter Elements
Every chapter, bar the last, has an end of chapter section that contains one or more of the following elements:
Roberta’s Comments: In which my student author contributes whatever she feels like writing about the
chapter in hand. They are an example of something you might consider for yourself: keeping a diary of your
experiences. I hope that they will sometimes give you the consolation of discovering that someone else had
problems too, and sometimes allow you to feel superior because you didn’t. However do not feel too