Department of Physics, Wake Forest University

Programming and Unix

Rick Matthews

Department of Physics


Current Instruction

Students are first formally introduced to computer programming in the second-year laboratory, Physics 166. Six labs are devoted to instruction in Unix, Fortran90, shells, and X.

Language: Fortran 90

Fortran 90 was chosen because

Environment: Unix

The supercomputers that many of our students will use all use the Unix operating system. Therefore, we teach them to program in the Unix environment.

Unless they have used Unix before, their accounts are configured for the shell "tcsh". We like this shell. It provides recall and editing of earlier commands, command completion, and spelling correction.

User Interface: X

In lab, all students use X client software (eXceed) on PC's. X provides a powerful and easy to use windowing environment (even under Unix!). With X, editing is easier, graphing is trivial.

Editor: emacs

The only editor we show the students is emacs. Emacs is very powerful. Under X, students find it very easy to use. Pop-down menus on the Emacs window make it seem much like every Windows application they have used.

Students are also given a one-page handout with key emacs keystroke commands. Students using dial-up connections and terminal emulators need this for modem access.

Graphing software: Gnuplot + wrapper

For simple graphing, gnuplot is used with a shell script driver call "GPlot" developed by graduate student Alan Tackett. Executed from the command line, students can use this for simple plots with only minutes of instruction.

Future plans and concerns

First, and most important, the six labs we devote to programming are not enough. The programming skills these students develop are not adequate for the needs of anyone wanting to pursue undergraduate computational physics projects.

The department has discussed requiring Introduction to Computer Science of all majors, or at least strongly encouraging our majors to take this course.

Some faculty have expressed their belief that the programming we offer is a sufficient introduction, and that our students can pick up the rest of what they need on their own (as many of the faculty did). Indeed, this model seems to have worked acceptably in the past.

This does not work so well now. Among the reasons:

The advantages of having the students take programming from the Computer Science department are:

If physics majors learn programming in the Computer Science Department, they will learn C++, not Fortran 90. I am not bothered by this. Students only need to learn to program once. A student well versed in C++ can learn Fortran 90 easily. Further, many physics majors pursue jobs which involve programming, and C++ experience is more marketable than Fortran 90 experience.

What will we do? Nothing has been decided. I hope that we will at least strongly encourage our students to take Introduction to Computer Science. If we do, we may wish to consider a very short course, certainly no more than 1 credit, than introduces Fortran 90 to students who already know C++.

Stay tuned.

Computer Enhanced Learning in Physics

Computer Enhanced Learning Initiative at Wake Forest

Wake Forest University Home Page