return to first page linux journal archive
keywordscontents

Linux in Education

Sharing Pedagogy with Java

An educator uses Linux and Java to share teaching tools with others.

by Robert A. Dalrymple

Let's begin by looking at a particular teaching problem I have. Wave motion of all types, including those on the surface of a body of water, can be decomposed into trains of sinusoidal waves which propagate at different speeds and amplitudes. If the frequencies of these waves are similar, the wave motion is characterized by wave groups. In the simplest case of a wave group, take two waves that propagate at nearly the same speed, while the group they create by superposition travels at a different speed (depending on water depth for water waves). Now, how do you clearly present this concept to a class?

Or, on the other hand, what happens when the two wave trains are traveling in opposite directions? Is there a wave group? If the two oppositely directed wave trains have the same frequency, a standing wave system results with no propagation of energy. How do you conveniently introduce these latter variations on the same theme?

Finally, what happens when more wave trains are added or when a wave group reflects back onto itself?

The traditional method of explaining these ideas to a class is to take chalk in hand and draw pictures illustrating the concepts. These pictures, however carefully drawn, are static and fail to transmit the idea that the waves and wave groups are dynamic entities, moving at different speeds and superimposing to create the resulting wave forms.

An alternate method is to use a graphical computer program, allowing students to see the result of superimposing wave trains with any frequencies, amplitudes and directions they wish. By trying different combinations of wave amplitudes, directions and wave periods, students can empirically discover the behavior of the water surface. Also, by allowing them to see the separate wave component waves, it is clear, for example, that a standing wave is comprised of two oppositely directed progressive wave trains.

The graphical program I use to demonstrate this concept and more than a dozen others was developed with Java on my Linux computer. By writing these programs as applets, they are available via the Internet to students with a Java-enabled browser (preferably Netscape Navigator), to use in classroom instruction, or for anyone who is curious about waves and coastal processes.

Figure 1. The Wave Superposition Applet, Showing a Wave Group

Sharing the Pedagogy

In the traditional model of university instruction, a professor develops the notes for a course. A textbook is often used to provide either a structure to the course material or to augment the professor's lectures. These textbooks thus provide a passive means of utilizing the expertise of another individual to augment the professor's own knowledge, or they contain a desirable format or outline for presenting the material. However, the textbook forces the instructor to adopt most, if not all, of the author's style or approach to a subject. A major financial commitment is made by the students, who must invest in one or more texts.

Java and the Internet provide another avenue of utilizing other pedagogies without making a large investment of time or money in someone else's approach. In addition, the applets can provide useful graphical and computational tools.

The applets discussed here are provided on the Internet (address given in the following section) and are used by a number of other professors around the world to augment classroom instruction as homework, and as laboratory experiments for courses in water wave theory and coastal processes. They were written to support two graduate courses taught at the University of Delaware. Each applet illustrates a single concept, such as the particle motions and velocities under a wave of the user's choice. By typing in new data, the user can explore different scenarios, such as the nonlinear influence of wave height on water wave speed (Stream Function Wave Theory applet).

Java and the Applets

Using Java-enabled web browsers, these programs can be run locally by accessing my web site that hosts the applet code. As an alternative, these programs can also be provided as applications, which run locally on the user's machine equipped with Java--especially easy for Linux machines that recognize Java byte code.

My contribution is the Java Applets for Coastal Engineering site that I have developed. This web site provides Java applets which can assist in the teaching of water waves and coastal processes and provide useful tools for others. The applets are hosted at http://www.coastal.udel.edu/faculty/rad/ on my Coastal Engineering Java Page. The index.html page at this URL lists the titles of the applets, a terse description of their purposes, and dates that indicate when the Java code for the applet and the HTML page was last modified. Clicking on an applet title on the list results in the applet running on the user's computer. The applet generally consists of several graphical windows: the first allows the user to input data to the applet and the second shows the results of the computation. In addition, HTML text associated with the applet provides a description of the use of the applet, the concepts it illustrates, and some idea of this theory in the Java program.

Once compiled, all the program elements become separate code segments, referred to as classes. These elements have been converted by the compiler into machine-independent byte code, which is downloaded by clicking on the applet's name on the Coastal Engineering Java Page. The user's browser converts the byte code into a local version of the applet, which then runs on his/her machine. The load on my machine is the downloading of the byte code.

While the web site is hosted by a Sun workstation, the programming and debugging was done with a PC running Linux and the Linux port of Java. The site, http://www.blackdown.org/, has the latest information on the Linux port of Java, an HTML version of the Java-Linux HOW-TO and a list of mirror sites for downloading the Java Development Kit (now JDK 1.1.5). Another reference is the October 1996 issue of Linux Journal (http://www.linuxjournal.com/issue30/), which had a number of articles on Java.

Implementation

As this project has developed, the applets have evolved, in part due to user comments and suggestions. The HTML page for each applet has a mailto: tag to allow the user to send e-mail directly to me. Also, I have learned new Java tricks and thought of improvements. So, the code-change dates are provided on the index page. Future improvements will include homework-type problems with each applet.

After several months of hosting the applets, it became clear that some academic programs were being hampered by long download times in using the applets over the Internet. I now provide an archive file created with tar containing all the source code and HTML pages, so that the Java programs can be run locally at other universities. This tar file contains a Makefile, which provides a convenient way for the system administrator to compile all the source code at once. After installation, the local user points a web browser at the directory containing the applets and then proceeds in the same way as the user on the Internet, but faster. If you want to try this or see the source code, the anonymous FTP site is www.coastal.udel.edu and the file javapp.tar.Z is in the /pub/programs directory.

I could improve access speed for the Internet user in a couple of ways. For each applet, I could compress all the class files for a particular applet into a single zip file, reducing the number of times the downloading browser has to connect with my machine. (For Internet Explorer users, the files would need to be in CAB format.) Another option would be to move to the Java bean model. The problem with this solution is that the language is evolving rapidly, so the applets would also have to evolve.

Implications

I view the pedagogical advantages of applets such as these to be paramount and potentially leading to large changes in the way education material is delivered (until the next more convenient tool comes along). Another major implication deals with free delivery of course content. What is the motivation for people to provide these programs and what is the benefit to their institutions, particularly if there is a reduced need for textbooks?

Several scenarios may play out in the future. Free course content may soon dominate the Internet. This would follow the model of the Linux operating system and other free software packages. What do the developers get? Recognition. What do the institutions get? The same as they now get with textbooks--recognition. Alternatively, the advent of methods to bill small amounts of money safely over the Internet might permit such sites to charge for each use. This will most likely happen for sites that deliver an entire course on-line.

Conclusion

Java offers a new and flexible way to provide active educational content to augment classroom instruction, both for the local institution and institutions everywhere. Through the Internet or local downloads of applets or applications, the examples developed by one instructor can be shared by all.

Acknowledgements

Robert A. Dalrymple (rad@udel.edu) directs the Center for Applied Coastal Research (http://www.coastal.udel.edu/) at the University of Delaware. He has written LJ articles on Scilab, Xfig, Xfm and EXT2tools. He has been using Linux at home and work since 1.0 came out. This spring he built ORCA, a parallel computer consisting of 8 Pentium II machines linked with a high-speed Ethernet switched network.

  Previous    Next