Refactoring lab session

version 1.0 (April, 13 of 2004)

The session concerns the refactoring of a system which simulates a Local Area Network.

Packaged resources and guidelines for a practical session on refactorings. The ultimate goal of this session is a reflection on the refactoring process. To stimulate this, this package simulates a real-life scenario in which a development team has implemented initial requirements for a system, has received requests for extra functionality, and decides to call in refactoring expertise to prepare the task of adding the new functionality. The expected duration of the session is 4,5 hours.

Two different packages have been prepared and used extensively:

  • Classroom course: DOWNLOAD Students version [ .zip (495 kb) | .tgz (394 kb)] or Teachers version [.zip (493 kb)]
  • Online course for individuals: VISIT [Dutch step-by-step instructions].This documentation (including source code) is freely available and allows you to perform a C++ version (using Eclipse CDT) of the Refactoring Lab Session on your own, without guidance. (Note: an English version is under construction).

Contents

The zip file contains the ingredients for a computer lab session on Refactoring.

The session concerns the refactoring of a system which simulates a Local Area Network. There are two equivalent implementations, one in Java and one in C++.

This lab has been tried out as follows:

  • Java Version: with Eclipse 2.1 for MacOSX, and Eclipse 3.0 for Windows, Ubuntu
  • C++ version: with gcc 3.3 and later under Darwin, Cygwin, Ubuntu, Solaris

The zip file contains

  • readme.txt
    The file you're reading right now.
  • SRe2LICRefacLabo.doc
    The teachers assignment for the lab. Note that the .doc document contains lots of hidden text containing instructions for the teacher. If you hand it out to students, make sure that the Hidden checkboxes are unchecked in the MSWord preferences, both for View and Printing. Of course as a teacher you should leave them on. (Present in the Teachers version only).
  • SRe2LICRefacLabo.pdf
    Is a printout of SRe2LICRefacLabo.doc without the teacher's comments, e.g. can be readily distributed to students.
  • LANSimulationDocu.pdf
    A few UML diagrams documenting the LAN simulation.
  • toDoList
    A list of the use cases that have been implemented so far, and the ones that are still left to be done
  • java
    The directory containing the java version of the code (organised into subdirectories for the different packages) The scripts compileLAN, generateJavaDoc, runLAN compile, run or javadoc the simulation. Patch these scripts for your environment.
  • cpp
    The directory containing the C++ version of the code. The documentation has been pregenerated using doxygen. The Unit testing framework used is cxxtest (http://cxxtest.sourceforge.net/). A slightly modified version (added macro TS_ASSERT_FALSE) is part of this distribution. Use 'make runtests' to compile and run the tests. Use 'make' to compile the code, then './lan s' to start a simulation run.

Credits

  • Serge Demeyer: director of the Lab On REengineering (LORE) and creator of the Lab Session.
  • Matthias Rieger and Bart Van Rompaey: creators of the CPP version, and packaged the Lab Session
  • Bart Du Bois: fine-tuning of the Lab Session and creator of the Eclipse CDT versionned step-by-step instructions