In this paper, we discuss the advantages and disadvantages of using network simulators to teach networking concepts versus having students write programs. The authors have experience developing laboratory exercises for classroom use in both realms. Two case studies, TCP versus UDP protocol performace, and routing algorithm convergence are described. For both studies, students either wrote a program that implemented the protocols being tested or created a simulation using the OPNET Modeler package. Issues specific to these projects are discussed. Student opinion reflected that simulation software allows more focus on the performance of the protocol and visualization of results. Programming, though viewed by students as more difficult, allows them to practice and gain skills that will be useful in their future careers. The authors feel that a balance of both programming and simulation activities is the best practice.