Computer Science I
by
Robert Lowe
Introduction to the Gopher Course
=================================
Welcome to Computer Science I! This is the first in what I hope to
be a series of complete computer science courses in gopherspace.
Here, you will find a self-contained and complete course of study
complete with lectures and assignments.
This course is the first course in Computer Science, and as such, I
assume no prior knowledge of computers or computer programming.
This should provide anyone who wishes to learn with a firm
foundation for studying computing. I am presenting this course with
the same content and curriculum as I do when I teach this course to
my students at several different colleges. Even though the material
is the same, this course is not supported by any institution. I am
doing this simply to provide a resource to both serious students and
those with a casual interest in computer science.
Required Materials
==================
In order to get the most of the course, you will need a few things.
First, you will need a computer running some variant of UNIX.
(UNIX, Linux, Mac OS X, or even msys or cygwin will work just
fine). You will also need a few freely available pieces of
software. These are g++, make, gdb, and some text editor.
All of these resources are available on sdf.org, which is where this
course is being hosted. You will need an arpa level membership to
run all of these tools. For more information on how to acquire a
membership, please visit
http://sdf.org.
You may also wish to acquire a textbook for reference and reading
purposes. My hope is that this material will be self-contained
enough to be usable without a book, but more material never hurts.
There are many C++ texts out there. Bjarrne Stroustrup's book "The
C++ Programming Language" is a good reference. I've also had luck
using Walter Savitch's "Problem Solving with C++".
The First Programming Language
==============================
In this section, I will share with you my thoughts on a first
programming language. This is primarily for those of you that have
some programming experience, and may become upset because of my
choices. Even if you have no programming experience, you may enjoy
this section, but please do not be discouraged if you don't
understand some of these points. You will in time!
The programming language used in this course is C++. Many people,
myself included, have expressed strong emotions about using C++ as
an introductory programming language. Many people favor it, and
many people oppose it. I used to fall into the group of people who
opposed its use and I lamented the fact that it had supplanted C as
the language that is taught in the beginning. However, when I
looked at my reasons for this, I discovered that they were not
good. Rather, my reasoning was that I prefer to program in C,
therefore I should prefer to teach in C. This line of reasoning
opened me up to the idea that maybe C++ is a good first language.
I thought long and hard about the best starting language, and
I decided that I would likely choose C, C++, or LISP. As I started
to explore these options, I made a list of strong points for each
language. A summary of these are:
- C: The language is nice and small, so its syntax is easy to
learn. Also, it is a good model of how modern computers
work, and it is the most popular programming language in
the world.
- C++: The language has a C-like syntax, and has high level
functionality such as object oriented programming. In
spite of its high-level functions, it still performs low
level operations like C. It is one the most common
languages taught in modern universities.
- LISP: A LISP program is a thing of beauty! The syntax and
organization of LISP is similar to lambda calculus, and
so this is very close to theoretical computer science.
Theory of computation would be easily understood by a
LISP programmer.
So all the languages have strong points to recommend them. Next, I
looked I looked at their drawbacks:
- C: Practically mandates that a programmer work with low level
constructs such as memory pointers. This is great if you
know what you are doing, but is downright scary for the
novice. Abstraction is harder to achieve for the novice.
- C++: For every rule it creates, it creates ways around them.
Also, syntax can be misleading. It allows many details
to be abstracted which can be good, but can also allow
students to ignore low level details.
- LISP: Does not reflect the inner structure of most machines.
There is no real access to low-level operations. The
paradigm is also not as common. The skills gained in
lisp may not transfer well to other languages.
So there you have it; all programming languages are bad for novices!
Seriously though, thinking it through, I decided that I wanted to
choose a language which allowed for as much exploration as
possible. C++ is a multi-paradigm language, and can do both high
level and low level work. Thus, C++ let's us explore the whole of
computing. Also, C++ experience is readily transferable into
low-level languages like C and also high level languages such as
Java. The problems in C++ (the ability to ignore details) can be
handled by careful presentation, and that is what I have tried to do
with this course. Present C++ in a way that forces you to face up
to what is really going on, and not get mired in its very large
syntax!
Schedule of Postings
====================
I am treating this gopherspace as though it were my classroom. I
will be releasing materials here during the Fall 2013 semester with
roughly the same schedule that I am presenting them in the
classroom. Of course, after this semester is over, the text files
will remain. If you find this course after December 2013, all the
material will be here. If it's before then, check back every Monday
for the current week's material.
If you have questions, suggestions, or you just want to chat with an
ultra cool computer scientist, you are welcome to contact me. My
email is
[email protected]. I also hang out on sdf.org in com, and on
the bboard. I will post to bboard every time I add a new lesson,
and we can chat there. Of course, you don't have to be an sdf user
to make use of these courses, but that is sort of my home base.
I hope you enjoy reading the lectures and working through the labs.
See you on the server!
Copyright (C) 2013 Robert Lowe
This work is distributed under a Creative Commons
Attribution-ShareAlike 3.0 Unported License (CC BY-SA 3.0)
For more information, see
http://creativecommons.org