Lecture 1
-
What is CX121?
-
Why learn about Computer Science?
-
Is this the right course for you?
-
Details from the syllabus
-
Course web page
-
Text
-
Software
-
Assignments and exams
-
CS 121 and the Honor Code
-
So what's computing all about?
What is CX 121?
CX 121 ("Introduction to Computer Science") is a problem solving course
that requires reasoning and logical thinking. There are other courses
at Middlebury that involve "solving problems" and "logical thinking"
(for example, calculus, physics, and courses that have you write papers
where you have to express your thoughts in a well thouhgt out, logical
manner). CX121 differs somewhat from other similar courses in that our goal
is to be able to solve problems using computers. Since computers use a
different language than humans (computers see everything in "binary" 0s
and 1s), we will need to frist express the "algorithms" or recipes for solving
problems in a limited form of English called a "computer language" and then
have a "compiler" translate the "computer program" we have written into
a binary form the computer can then understand and execute.
CX 121 is not a "programming course" (although we will write
"programs" to accomplish our goals).
CX 121 is not a "course in Java" (although we will need to learn Java to
write our programs). I have taught this course in BASIC, Pascal, and Modula-2.
Even though the languages have changed, the basic goals of the course have not.
The hard part of the course is still the problem solving process. The frustrations
of how to express an algorithm in a computer language and how to get a computer to
execute what you "meant it to" will need to be dealt with at various times. Such
frustrations seem to be part of the "programming" process but are more mechanical
than the intellectual aspect of "problem solving". The exams used in this course
during the past years have also essentially focused on the problem solving aspect
of this course and not the mechanical aspects dealing with a language or a computer.
CX 121 is not a "computer course" (although we will need to learn to use
a computer and to interact with one using an operating system to accomplish our goals).
CX 121 is an introduction to algorithm development emphasizing structured,
object-oriented design. Algorithms will be implemented as programs in
the Java programming language. The programs will be compiled into Java
byte code which can then be executed by a Java Virtual Machine (JVM) on
most modern computers.
Why learn about Computer Science?
There are many reasons to learn about Computer Science:
- Computer technology is pervasive. Understanding the principles
behind programming will help you to better understand what is possible
and what is not possible with computers.
- Computers are important tools. It is useful to learn to create programs
to solve problems. Even if you aren't writing a program "from scratch",
the skills you learn can be helpful. Spreadsheets, for example, can be
programmed.
- The process of learning about Computer Science will help you to develop
clear and careful thinking. It will help you build your analytical and
problem-solving skills.
- Later in some of your Middlebury courses, you may be called upon to modify
existing programs to help solve a problem. This would require you to have a reading
knowledge of a computer language and the ability to make small changes in the
program. You may also be called upon to write your own programs in a language
such as Perl, C, JavaScript, AppleScript, Visual Basic, or Microsoft Excel
Macro. What you learn in this course (in Java) should extend to these languages as well.
You may be called upon to create a Web page in another course and even enhance
the page by placing JavaScript code and applets onto the page. CX 121 should help
you perform such tasks.
Is this the right course for you?
This course is intended for students with little or no programming
experience. If you have significant programming background (even if it's
not in Java), then either CX 205 (Disctete Mathematics) or CX 214 (Data Structures)
might be more appropriate for you. You can talk to me about it after class.
The expectation in CX 121 is that students are at least thinking about taking
additional courses in computer science and possibly even majoring in our
department. For those of you who do go on, either of the above two courses
would be the approprite next course to take. I'll say more later in the
semester about what a computer science major involves and what our courses are
like.
We do have a totally different "introductory" course (CX 103 Introduction to
Computers) that many students take as well. This is a course intended for
students who want to learn more about the Web and most likely only want to take one
course in our department. CX 103 had just a modest amount of programming in it, is
a little broader in its scope, and has less focus on "problem solving". If you have
questions about which "introduction" is right for you, please talk to me soon. It is
important to get started properly! Many students who have finished CX 103 have decided
they do want to take more courses with us (the next course for these students is CX 121).
If you have little or no programming experience, then the best way
to choose an appropriate CS course is to answer the following question:
What interests you the most?
- If you're interested in learning to program and want to build your
problem-solving skills, then you're in the right place.
- If you're more interested in learning about the technology behind
the web, then CS 105 is the course for you.
- If you're interested in learning about the Web and are planning to take
only one course in our department, take CX 103.
- If you're interested in some of our advanced courses, then you should
take CX 121. It's required for all of them.
The CX department has a great selection of courses. Pick the one that
fits you best.
Details from the syllabus
Course web page
http://www.middlebury.edu/~rmartin/cx121.html
Text
There are two textbooks required for this course:
- An Introduction to Programming and Problem Solving with Java, by Lewis and Loftus
- Java: an Eventful Approach, by Bruce, Danyluk, and Murtagh
The Lewis and Loftus text is available in the college store. The "Eventful
Approach" test is available online.
Chapters from the second text will be made available from the course web
pages. We've developed a unique approach to teaching introductory
CS and are developing a text to convey that approach. Since our approach
is most different from standard approaches in the beginning of the course,
we'll be relying primarily on the online text during those weeks. The Lewis and Loftus
text will become much more useful about four weeks into the semester.
Software
We'll be using the "Java Development System/Kit" (the JDK) to write and
execute our programs. Ballou Lab (W507) has 20 very nice Dell machines that
can dual boot into either Linux (Debian this semester) or Windows 2000. There
are versions of the JDK available for either environment as well as MacOS Xbut we will
primarily use Linux in this course. You can set up your own dorm computers to write
your programs. Most of you are probably using Windows and many students have
installed Linux on their machines. You should keep in mind, however, that we'll be
testing your programs in the Linux environment. If you choose to use a Windows machine
or MacOS X in completing your assignments, you should test them on a Lab machine
before actually turning them in.
Assignments and exams
There will be weekly labs
- Attendance at labs is mandatory.
- Labs are a great place to learn. Much of the learning you'll do in
this course will take place in lab sessions.
- You will generally receive the lab assignment on the Friday before the
lab. This will give you the opportunity to plan your solution before coming
to lab. In lab you'll work on writing and debugging the program. The
hours you spend in lab will give you a good start. Labs are generally due
on Monday.
There are some exceptions to this rule, however. Always be sure to check
the due date that's given in the lab handout.
- Late labs are not accepted. However, the lowest score on a submitted
lab will be dropped.
There will be two exams in this course in addition to the final. Exams will
be taken during class/exam time. Dates for the exams (including the final) can
be found on the course syllabus. How your final grade will be determined can also
be found on the course syllabus.
While attendance in class doesn't count as a specific percentage in your final
grade, it can affect your final grade. Problem solving (using Java and a computer)
can be very difficult. It is hard to learn on your own. Missing class will only
make it harder for you to learn.
CX 121 and the Honor Code
In this course you'll be getting constant feedback on the quality of
your programs. As you develop a program and attempt to run it, you'll
certainly know whether it's working or not! You'll likely find that this
will have an interesting effect on the way you work. While you might feel
comfortable turning in an imperfect paper for a History class ("It's not
perfect, but it's ok..."), experience tells us that students don't feel
comfortable turning in a program unless it runs correctly. This is both
a good thing and a bad one. On one hand, it's great to work until you
get it right. On the other hand, you don't want it to make you crazy.
Here are some tips to help you take advantage of the good while maintaining
your sanity:
- Don't wait until the last minute to work on an assignment.
- Ask for help when you need it.
- Remember that programming is about correctness, but it's also about
style. Try to maintain a balance between the two.
and most important of all, don't ever be tempted to cheat. We much prefer
incorrect programs to programs that aren't your own work!
So what's computing all about?
It used to be all about manipulating numbers and performing calculations.
But today it's about much more. Today computing involves modelling,
manipulating, and presenting many different kinds of information:
- numbers
- text
- images
- sound
We need:
- clever ways to represent these in a computer: data structures, and
- algorithms to manipulate them correctly and efficiently.
Many aspects of data structures and algorithms are studied in Computer
Science. For example, Computer Scientists are concerned with
- performance analysis - thinking about the relative efficiency of
different data structures and algorithms,
- computability theory - the analysis of what is and what isn't
computable,
- language design - the design of the programming languages used to
write data structures and algorithms,
- and many more.
At this level, our concern will be to learn how to write good algorithms.
To see why this is necessary, consider
- how common bad instructions are,
- and the fact that computers are not tolerant of bad instructions.
(Shampoo example.)
Learning how to write good programs is not easy!
Characteristics of a good algorithm (i.e., a set of instructions):
- executable by intended processor
- understandable by a human
Why do we care about understandability? Why isn't it good enough to have
a program that simply works?
- Must be convinced that it works if you are to trust it.
- Good programs are constantly updated and revised.
Our first labs are tomorrow morning. It will be fun to get started!