Chapter 5 Faculty Notes

As is quite appropriate, the first experiments in the book call for modifications to programs available from Purdue University. The directions for obtaining the software are found on page 20. You may wish to do this yourself and make the materials available to your student at your school.

Note that the solutions for Experiment 5.1 are contained in the /ch5/exp5.2 directory.

Experiment 5.1 requires the students to compile and test an echo client. It is possible that the procedure will not be completely transparent to some students (it takes a few minutes thought to see how things are organized), but detailed directions are to be found on the page for this experiment. The Optional Extensions are interesting and are not difficult. I would encourage students to perform further experiments such as the one described on the page. Anytime you encounter "odd" behavior, it is good to call attention to and seek an explanation. It is also interesting to compare the behavior of software that a student writes with "the real thing", and then to ask what it would take to write it the real way.

Experiment 5.2 requires adding some features. This requires familiarity with the basic string handling functions in C. The first Optional Extension is of great interest. The comment that "Sending the remote user's name with each line of text wastes network bandwidth" is of special interest. Expect the objection, "So sending David costs an extra 6 bytes? Why worry about 6 bytes?" It is the principle! Watch out for the second Optional Extension. It is, in my opinion, extremely difficult. See the page for this experiment for details. As best as I can tell at the moment (I plan to come back to this one once I am further along), changing the terminal settings require modification to the library code provided. Nasty, but challenging. For some students this is the way to go. What I plan to do next time around is postpone this extension until Experiment 6.2. I will also change 6.2 to require a chat client/server instead of an echo client/server. This is the way I did it, and I found that in that context it is easier, but certainly not too easy. It is a great exercise!

Experiment 5.3 introduces the student to file transfer. This idea will appear again in Experiment 6.3, and then again in Expriments 8.3 and 8.4. It so happens that I had done both of those previously, so the solutions do not contain code for this experiment, but it is easy to do.



This site is maintained by by W. David Laverell of the Computer Science Department at Calvin College.
For assistance or corrections, please contact him at lave@calvin.edu.