CSC 270
Survey of Programming Languages
Fall, 2009
This course meets from 9:25-10:50 on Tuesdays and Thursdays
in Science 227.
The last time I taught this course was Fall 2008.
Announcements
Throughout the semester (ideally every few days),
I'd like you to fill out the
daily survey to help me keep track of what
people are finding easy, and what people are having trouble with. This
can also be used as an anonymous "suggestion box".
Getting Help
My office hours
(in my new office, Post 203; if I'm not there, look in the computer
lab in Post 102) are TTh 1:30-4:00 and W 2:30-4:00.
Who should take this course?
This course is intended primarily for students majoring or minoring
in computer science or information systems. It assumes CSC 171 and 172
as prerequisites. If you're taking 172 concurrently with 270, you'll
have a more difficult time, but you should be able to survive the
course; talk to the instructor.
Subject matter
The official subject of this course is programming languages. But I
feel it would be irresponsible to teach programming languages without
discussing software engineering at the same time. Software
engineering includes such simple ideas as the "edit-compile-run-debug"
cycle you all learned in last year's CS courses, the aspects of "programming
style" I've discussed in class (and many others), and lots of other techniques
people have learned over the years for writing good, working, efficient,
readable, modifiable programs quickly. For some of these ideas, please
read my
List of
Adages on Software Engineering.
Reading
- Several chapters from my Scheme-based
textbook, covering posns, structs, and lists. Just ignore anything
that talks about "animations", since we haven't discussed them in this
course.
- Cay Horstmann's tips on Moving from Java to C++
- The University of Wisconsin's on-line tutorial on C++ for Java Programmers
- My collection of adages on software
engineering
- An article on How
to Become a Hacker
- An article on Programming
Paradigms for Dummies (which is not at all "for dummies";
it's a high-level view of, allegedly, every conceivable programming
language and every conceivable programming paradigm, and how they all
fit together).
- Different people learn (and teach) in different ways.
Try taking a Learning Styles Questionnaire to discover your own style and get
some tips on how to handle classes taught in a different style.
If you're having trouble with the way I explain things, it could just be
that I'm strongly intuitive and global, while you're strongly sensitive
and sequential (or something like that);
point it out to me, and I'll try to find another way to explain.
- The Scheme-based on-line textbook How to Design Programs
- Amzi's Prolog
Tutorial
- On the history of programming languages: see Eric Levenez's
History of Computer Languages,
especially the very cute timeline diagram.
- Also on the history of programming languages: a recent article
entitled The
Semicolon Wars.
- How Not
to Program in C++ (book free on-line if you're an ACM member)
- The book Effective Java, by
Joshua Bloch (no relation); once you know how to write legal
Java, this book will teach you how to write good Java.
- 99 bottles of
beer, showing how to produce the lyrics to the song "99 Bottles of
Beer" in over 1000 different programming languages.
Software
- Scheme
There are several Scheme implementations available, but the one most
widely-used in education is DrScheme, freely downloadable for
Windows, Macintosh, Unix, etc. One of its nice features is language
levels: if you're a "Beginning Student", you'll get error messages
for certain things that are technically legal in Scheme but which a
beginning student doesn't need. If you decide you do need a
certain feature, you can promote yourself to "Intermediate Student",
"Advanced Student", etc. with a few mouse-clicks. The latest version of
DrScheme, by the way, includes not only six pedagogical subsets
of Scheme, but four subsets of Java and one of Algol 60....
Some of the Scheme we do will be in the PLAI dialect, which doesn't
come with the download of DrScheme above. Here's how to get it:
- Windows machines in campus labs:
- Download this file, expand it (it
doesn't matter where), and open the folder it expands to (which
should be named "plai"). Double-click the file "copy-plai.bat" in this
folder; it'll copy a bunch of stuff into the right places on your
computer. Then run DrScheme, choose the "Language" menu, click the
triangle next to "Programming Languages: Application and Interpretation",
select "PLAI Scheme", and click "OK".
- Macintoshes in campus labs:
- Download this file into your Downloads
folder, expand it, and open the folder it expands to (which should be
named either "plai" or "plai-mac"). Double-click the file
"copy-plai" in this folder; it'll copy a bunch of stuff into the
right places on your computer. Then run DrScheme, choose the
"Language" menu, click the triangle next to "Programming Languages:
Application and Interpretation", select "PLAI Scheme", and click
"OK".
- Your own Macintosh or Windows machine:
- Start DrScheme. In the "Language" menu, choose "Module" and
click "OK". You should see the words "#lang scheme" in the
Definitions pane. Replace them with "#lang planet plai/plai:1:4" and
click the "Run" button. It'll take several minutes to download and
install the software the first time, but this only happens once.
Quit DrScheme, run it again, choose the "Language" menu, click the
triangle next to "Programming Languages: Application and Interpretation",
select "PLAI Scheme", and click "OK".
General Development Environments
I recommend Eclipse,
a professional-level development environment
which is available for free download and has "plug-ins"
available to work with several different languages: Java, C, C++, Prolog, etc.
Another possibility is jGRASP, which is designed
for first-year programmers and therefore has fewer "professional"
bells and whistles, but provides a cute graphical annotation of the
control flow of your program. It works best on Java, but it can support
C, C++, and Ada as well.
C++ and C
Microsoft Visual C++ may be installed on the Windows machines
in the lab, but I don't particularly like it. Eclipse is also
installed, as is (I think!) a C/C++ compiler. If you want to use
Eclipse for C/C++ programming at home, first install
Eclipse; then you'll need a C/C++
compiler. On Windows, see
these directions (updated Oct.
15, 2009) to get
Eclipse working with the C and C++ compilers. On Mac and Unix, you've
already got a C/C++ compiler, so you can use these simpler directions
instead.
Prolog
In past semesters, I've used the Amzi Prolog + Logic Server, but I've
been having trouble getting it to work this semester. So let's try SWI
Prolog instead, which has the advantage of being free and easier to
install.
- If you're on a Windows XP machine like the ones in our labs, ...
- Download and expand this file.
- Run the "SWI Prolog Windows Installer". When it asks where to
install the software, pick a location on the F: drive (so it'll
still be there next week). It may give you a warning about being
unable to modify the Registry; don't worry about that.
- Open the "setup-editor" folder and run the "setup" program.
Again, install it somewhere on the F: drive. It may be a good idea
to "save configuration settings in INI-files", and put those on the
FD: drive too, rather than "in Registry", but I don't know how
important that is. Once it finishes installing, it will run the
editor.
- Now you can delete the "SWI Prolog" folder that you downloaded
in step 1.
- If you're on a Mac, I haven't set up a similar download for you yet;
watch this space.
- In all other situations,
- visit this
page, choose an appropriate package, download and install it
according to the directions.
- That will give you a Prolog interpreter that runs from Terminal.
It would be nicer to have an IDE with syntax highlighting, an integrated
interpreter/editor, etc. but I'm still looking for that; the one
described above only works for Windows.
Partners for upcoming assignments
If you need a partner for the next homework, please e-mail me immediately and I'll try
to match you up with someone.
Software support
I've set up some
forms for entering and viewing PSP data.
You may use these forms to record defects, time allotted, time spent,
and program size, but I won't require this information.
To use the forms successfully, make sure your browser accepts JavaScript and
cookies. (For those with a moral opposition to cookies, I assure you
that they're all "temporary" -- they disappear as soon as you quit the
browser.)
(For more information about PSP, see the PSP page at
Carnegie-Mellon or read
Watts
Humphrey's Introduction to the Personal Software Process.)
Last modified:
Stephen Bloch / sbloch@adelphi.edu