Taking Math Courses Online
A Guide by Greg Landweber <greg@kaleidoscope.net>.
This guide is based on my own experiences running the Math 21a web site in
the spring of 1999, under the direction of Wilfried Schmid. We distributed
all course materials online, ran three computer lab sessions using Mathematica,
and offered a series of online quizzes. Please feel free to take any of
the materials presented here and use them in your own classes. If you have
any questions, don't hesitate to e-mail me.
Table of Contents
Handouts
All of the handouts were distributed on the web, for the students to view
or print out at their leisure. Most of these handouts were written using
TeX, and needed to be converted to a form that students could use via the
web. The two formats we used were "GIF" (Graphics Interchange Format)
and "PDF" (Portable Document Format). GIFs are used for images on the web
to be displayed on computer screens, while PDF is used to create high
resolution images suitable for printing. In some cases, we also
distributed handouts as PostScript files.
For displaying TeX files on screen, I recommend using 12 point fonts, and
displaying the image at 100 DPI (dots per inch).
Converting TeX (DVI) to GIF
If you have a DVI file that you want to convert to GIF format, follow these
instructions. You must do this on the Math department system, not on FAS.
For some reason, the convert command does not work correctly on FAS.
- Convert the first page of the document from DVI to PostScript:
dvips -pp 1 -D 300 filename
The -D 300 parameter tells dvips to produce a
PostScript file at 300 DPI (dots per inch) resolution. The normal
resolution is 600 DPI, which is much more than is needed to display
the file on a computer screen.
- Convert the PostScript file into a GIF file:
convert -density 300x300 -geometry 33.34%x33.34% -gamma 0.7 -colors
10 filename.ps filename1.gif
This file first renders the image at 300 DPI, but then downsamples it
to 100 DPI (1/3 the original resolution) using 10 shades of gray. This
is a technique called "anti-aliasing". The -gamma 0.7 setting
determines the contrast of the image. Values closer to 1 give a
smoother, but lighter image, while lower values give a darker, more
blocky image. You should try viewing the image on several different
monitors before deciding what gamma setting to use.
- Repeat steps (1) and (2) for each page of the document.
- String all of these images together in a single html file, using
multiple image tags.
Converting TeX (DVI) to PDF
- Convert the entire document from DVI to PostScript:
dvips filename
- Convert the PostScript file into a PDF file:
ps2pdf filename.ps
Smaller GIF images
In some cases, such as for the questions in an online quiz, you will want
to create smaller pictures taken from parts of a TeX document instead of
converting the entire document into images. To do this, I suggest viewing
the TeX file onscreen (at 100 DPI if possible), taking a screen shot, and
turning that picture into a GIF file using your favorite GIF-editing
application.
On a Mac, I use OzTeX to view the TeX file onscreen, with a PostScript
verson of the Computer Modern fonts. For information on OzTeX and these
fonts, see Gary L. Gray's Macintosh TeX/LaTeX Software
Page. (If you prefer Textures or some other TeX utility, then you can
use that instead.) In OzTeX, I set the configuration file to render the
DVI onscreen at 100 DPI. With the DVI file showing on the screen, I take a
screenshot by pressing <command>-<shift>-4 and dragging a
rectangle around the portion of the document I want to convert to an image.
This creates a file named "Picture 1" on your main hard disk. Then
double-click that file to open it up in SimpleText, choose "Select All"
from the "Edit" menu, followed by "Copy" from the "Edit" menu. The image
is now on the clipboard. Next open up a GIF-editing application (I use
"GifBuilder", which you can find by doing a web search, but any
GIF-editing application will do), paste in your image, and save the
resulting file as a GIF file. You might also want to set the transparency
color of the GIF to white, which will let the web page background show
through.
Online Quizzes
One of the major features of our class was a series of online quizzes.
These were used to gauge how well the students understood the material
and provide an incentive for them to study it. The quizzes were graded
mostly based on class participation.
To implement the online quizzes, I wrote a "CGI" (Common Gateway Interface)
script using the Perl language. This script handles all aspects of the
quiz. It first lets the students register for the quiz, choosing a password.
It also gives the online quiz and grades it automatically. Finally, it lets
the TFs view the quiz results, either individually or the totals for all the
quizzes.
To use this CGI script for your own web site, just download the file and
read the detailed instructions at the top of the file (it is a text file).
You'll need to modify a few assignments at the beginning of the code to
tell it what your class is and where it should find the supporting files it
needs. You should not need to modify the Perl code at all, with the
possible exception of one or two lines that specify the format of the
student database. (This script originally used the student database format
produced by the FAS scheduling program in Spring 1999 and earlier, but FAS
might be introducing a new scheduling program with a different format in
future semesters.) All of this is explained in the instructions.
Here is the online quiz CGI file:
quiz.cgi
If you have any questions, please send me e-mail at <greg@kaleidoscope.net>. Paul
Hsu is also familiar with Perl and the inner workings of the quiz script,
so he should be able to help you out, too.
Using Mathematica
In the Spring of 1999, we gave our Math 21a students three computer labs
using Mathematica. They completed these labs in the Windows computer
classroom SC 120, except for one section which did the labs at home.
Here is the information we put on our web site about these labs:
Mathematica Labs
If you are not familiar with Mathematica yourself, I recommend you read
through this page and try out "Lab 0: Introduction to Mathematica", which
is not specific to Math 21a.
Here are some of the things we learned in the process:
- Harvard has a site license for Mathematica which allows students to
use it in the computer classrooms and in their dorm rooms. However, Wolfram
Research is paranoid, and their copy protection scheme for Mathematica is
extremely frustrating. Even with Harvard's site license, getting Mathematica
up and running on any given machine is still a chore. Paul Hsu and I put
together detailed step-by-step instructions for installing Mathematica at home,
both under Windows and the Mac OS, available from our Mathematica Labs page.
Even with these
instructions, you should expect e-mails or calls from confused students.
Paul even went to the students' rooms to help them in person. Fortunately we
only had 20-30 students who needed to install Mathematica at home.
This could become a major problem if a class of over 100 students all
needed to install Mathematica, and it would require support from FAS Computer
Services. For more information, see the FAS Mathematica
at Harvard page.
- If you hold a lab in one of the computer classrooms, I recommend SC
120. It is a large, comfortable room, and in my experience Mathematica
runs best on Windows NT machines (I created the labs on a Power Mac, but I
was frustrated by the number of times it crashed--a problem with the Mac
version of Mathematica, not the Mac itself). Before holding a lab session,
make sure you check all that all the machines will actually run
Mathematica. The most common problem is a missing or incorrect MathID
number (Wolfram's serial number). Other problems included missing math
fonts or a corrupt registry. All of these problems can be fixed if they
are caught in advance.
- We had the students submit the labs by e-mailing them to the
math21a course account on FAS. Mathematica notebooks are just text
files, so there is not a problem of converting file formats. When
running labs in the computer classrooms, we had a few cases where
students sent us an e-mail message but forgot to attach the lab file
(and their lab was then deleted when they logged out). Because of
this, you need to be sure to help out people when submitting their
labs at the end of the session.
- Before running a lab session, make sure you have enough disk space
in the course account to hold all the labs that your students will
submit. For our second lab, more students than we expected came to the
final two sessions, and we nearly ran out of disk space.
- Students tend to procrastinate, and if you give them the
flexibility to choose which session they will attend, the majority of
them will opt to come to the final session. This is particularly true
if they have other things on their mind that week, such as midterms.
To make sure that the students are evenly distributed among the
sessions, we assigned a session time to each section of the class. If
students could not attend their scheduled session, we asked them to
send an e-mail saying which session they would attend. This discouraged
students from switching without a reason, and it gave us advance
warning if a session was going to be overcrowded.
- Keep the labs notebooks small! Our second lab included lots of 3D
graphs, which took up a huge amount of memory. This caused two problems.
First, Mathematica does not deal well with low memory situations, and
tends to crash without warning. This is very frustrating for the
students, particularly if Mathematica crashes while saving, thereby
corrupting the notebook file and destroying the students' work (that
is a major bug in Mathematica). Second, the larger the notebook file,
the more disk space you'll need to store them in the course account,
and the more strain it will put on the mail servers.
- Students will always take much longer than you expect to complete a
lab. We did trial runs with volunteers before each lab, but in every
case the actual lab ran much longer than our trial run did. This is
because the volunteer students are usually more comfortable with the
computers and the material before the lab, and because they had our
undivided attention during the trial. As a rule of thumb, make sure
that your volunteers can finish the lab in half the time you have
available for the session.
- To grade the labs, I transferred the files to the Math department
machines. Unfortunately, Mathematica does not seem to run very well on
the Math machines (ironic, isn't it!), particularly when using large
notebooks with lots of pictures. It might work out better if you set
it up so that the TFs can grade the labs on the Windows machines in SC
120.
Homework
Since we distributed all course materials online, we put the homework
assignments on the web site as well. In addition, we scanned in solutions
to the homework assignments and posted them on the web site after the
problems were due. Paul Hsu wrote a Perl script that automatically updated
the homework web pages each day to include links to the solutions. That
way, we didn't need to modify the web pages ourselves each time a problem
set came due. For more information, contact Paul at <bhsu@fas.harvard.edu>.
One important issue to consider is that you want to make the problem
solutions available only to Harvard students, not the general public.
There are two reasons for this concern. First, students from colleges
around the nation (and world) are quite good at searching the web for
solutions to their homework problems. Second, we scanned many of the
solutions from the instructor's version of the course textbook, and we
cannot distribute those scans outside of Harvard for copyright reasons.
Paul's script dealt with this by checking the internet domain each time
someone requested the homework page to confirm that they were indeed
within the "harvard.edu" domain. However, this caused problems for
students who wanted to check their homework when they were out of town
on vacations. Also, at one point the FAS server stopped resolving IP
addresses into domain names, so this method stopped working. The FAS
Instructor's Toolkit does provide a mechanism to restrict certain sections
of your web site to the Harvard domain. This would probably be a more
robust solution to this problem.