Signs of Triviality

Opinions, mostly my own, on the importance of being and other things.
[homepage] [index] [] [@jschauma] [RSS]

Teaching "Advanced Programming in the UNIX Environment"

Book CoverWhen I was a student, one of my favorite classes -- and one of the classes where, in hindsight, I learned the most -- was "Advanced Programming in the UNIX Environment", which follows the classic book. At Stevens Institute of Technology (no connection to the book's author W. Richard Stevens), that class was not taught by any of the professors, but only based on availability of external instructors. As the local System Administrator for the CS Department at the time, I somehow "inherited" this class in 2002. Teaching it for the first time was incredibly intimidating -- all of a sudden, I actually had to understand the matter to the level of explaining it to others. (Which, frankly, I really didn't at the time; teaching it really taught me more than my students.)

This Fall semester, I'm teaching the class for the 5th or 6th time -- much to my appreciation, the class has now become a required course for a Master's degree in CS from Stevens -- and I always thoroughly enjoy covering the material and learning new things about fundamental UNIX basics myself in the process. Each year, I also change some of the assignments or code examples slightly (based on my own understanding of the material or the reference platforms I have access to). Here's what I'm doing differently this semester:

(1) Add a twitter account. This is an idea I had last semester for the other class I teach at Stevens, and I was generally content with how it turned out. Using a class specific twitter account, I can easily share with students interesting links relating to the course subject. Students are not required to have a twitter account or even to read the things I post there, but I use it as another simple means of communication.

(To my surprise, not a whole lot of students seemed to have a twitter account, and the number of people following the account is still very small. But the feedback I've so far gotten is positive).

Code Reading by Diomidis Spinelli(2) First assignment: read code. In the past, I've noticed how little experience students have in not only writing code, but even more so in reading code. That is, reading code written by other people. And understanding it.

While one could base an entire class on the topic (perhaps following the book Code Reading by Diomidis Spinellis), I wanted to give students a simple first assignment that gives me, the instructor, a good idea of the level of code understanding a student has and that gives the students an opportunity to understand how the same tool can be implemented in different ways, with no (necessarily obvious) "better" way. To this end, I asked them to compare two basic NetBSD programs to their Solaris/Linux equivalents.

Having just graded the submissions for this assignment, I think that it was a success. Students picked a few programs and discovered interesting similarities/discrepancies between different implementations of initially as trivial assumed programs. For example, echo(1) (the binary, not (necessarily) the shell builtin) on Linux vis-à-vis on NetBSD and the handling of --/getopt(3) seemed illuminating. I plan on using this or a similar assignment again in the future.

(3) Have students present and review code. Another thing that I find students sorely missing is the ability to actually talk about their own code or to review and provide feedback on other peoples' code.Code Review, WTF/min To hopefully help improve this, I'm planning on having students present their own code in class and have others provide feedback. This is not to open a forum for a public flogging, but to help students gain the self-confidence to present their own code, to help make them focus on the quality and readability of their code and to be able to see how others are trying to solve the same problem they have.

While this is not real Code Review, I hope that it will help students eventually be able (and get used) to perform code review on their and their peers' work. Let's see how this works out this semester. Lecture #3 is coming up on Monday, and at least one (un)lucky student will present their submission for HW#2...

September 23, 2011

[Ever wonder why they're called "asswords"?] [index] [Learning Programming Languages for Fun and Profit]