ECE 417/617 Elements of
Software Engineering
Spring 2009

In this course students will learn to build high-quality, reliable, and extensible software systems that are too large for a single programmer.  Emphasis is placed upon good programming practices (object-oriented design and clean, well-documented code), teamwork skills (planning, communicating, and interacting), and bringing the project to completion (testing and verification).  A semester-long project complements the theory with practice.



Week Topic Assignment
1 introduction / overview learning report #1 (1/16):  Pollice
2 C++ and Visual Studio IDE  
3 More C++, object-oriented programming, and CVS learning report #2 (1/30): 
S/W Chronic Crisis and Bugs
4 Software life cycles  
5 Software process and modeling (UML) learning report #3 (2/13):  Royce
6 Project management  
7 Agile methods learning report #4 (2/27):  Microsoft
(Cusumano-Selby and Guth)
8 Requirements  
9 System design learning report #5 (3/13):  Brooks
(article and review)
10 [Spring break]  
11 Testing  
12 Risk analysis learning report #6 (4/10)
13 User interfaces  
14 Formal methods  
15Ergonomics final system demo (4/24)

Other dates:


Textbook and Resources

Recommended books:

Suggested readings:

Additional software engineering resources

  1. Introduction
  2. Condensed Crash Course on C++
  3. Concurrent Versions System (CVS)
  4. The Software Process
  5. Modeling
  6. Design
  7. User Interface Design
  8. Testing
  9. Project Management
  10. Software Practice
  11. Formal Methods
  12. Repetitive Strain Injury (RSI)
Learning Reports

The material of this class is highly non-linear and does not lend itself well to the traditional model of teaching in which the instructor imparts knowledge to the students.  Instead, much of the learning must be self-directed in order to be meaningful.  The purpose of the learning reports is to give you the opportunity to learn material related to the course as your interest and needs dictate.  Take a few hours to study a topic that interests you, or read one of the articles linked from the web page, and write a summary report of what you have learned.  Note that for the first several reports the topic is given, while for the remaining ones the topic is up to the student.  Reports should be the equivalent of 1-2 pages of a traditional report (single-spacing, 12-point font, 1" margins).  A hardcopy of the report should be turned in during class on the day it is due. 

The format of the report should be as follows:

Grading of the reports will be as follows.  Everyone will start with a baseline grade of 85 points for each report.  Points will be subtracted as follows:

Points will be added as follows:

Recall that the purpose of this class is two-fold: practice, and theory. On the practice side, you are all learning CVS, C++, VC++, etc. Gaining experience with these tools is essential to being a good software engineer. On the theory side, we are exploring concepts such as modeling, design, project management, etc. The milestones and class-wide project focus primarily on the practice, with some theory applied. The purpose of the learning reports is to focus primarily upon the theory, with some practice sprinkled in. Thus, while there is overlap between practice and theory, the aim of the learning reports is to stretch you to consider the theory in more detail. For this reason, you are highly encouraged you to ready and study the 'suggested readings' above, as well as any other relevant material that you come across.


A main part of the class is a semester-long project in which the entire class participates. The project is written in C++ using Microsoft's Visual C++ 6.0 integrated development environment (IDE).  The code is checked into a central repository using the concurrent versions system (CVS).  This semester our client is Dr. Christina Wells and her lab in Horticulture Department.  Our goal is to to document, verify, test, and extend our open-source Rootfly application which is being used by horticulture researchers.  The code is released under the GNU General Public License.

Project organization

Students are divided into groups to develop different components of the application.  Within groups, students are paired (pair programming).  Each group is responsible for dividing up the work among its members, scoping the work to be done, and keeping track of the accomplishments of each member as well as the accuracy of the time estimates.  For each milestone the group should submit the source code itself (via CVS); a summary of the work done including a detailed task list with the responsible individuals, estimation times, and completion dates (hardcopy brought to class); and a list of tasks/goals for the next milestone.  If an individual is not pulling his or her weight, the group has the right to fire that individual from the group; such decisions should be communicated to the instructor as soon as they are made.

Coding conventions

Writing code that compiles and runs is not enough.  An important part of software engineering is writing code that is also easy to read by other programmers, not only those in your team but also those whom you've never met.  Since we will be reading each other's code,  it is important for us to have an agreed-upon set of conventions.  Since the conventions themselves are somewhat arbitrary, the following list has been compiled using some of the more common approaches adopted in the industry.


    This class keeps track of time.
    @author Ima Coder
   class TimeManager
       typedef int SecondType;
       double GetTime(int day, const TimeStamp& another_time);
    double m_day_of_the_week;


Among the many standards on the web, Todd's very extensive and helpful C++ coding standard is similar to that above and also contains some insightful points about software engineering in general.  Wallach has a shorter coding convention list.  Lott maintains an extensive list of conventions, some of which are quite extensive :).   Linus Torvald's conventions for the Linux kernel makes a fun read, though it's geared toward C rather than C++.  And, for something completely different, don't forget to check out Microsoft's Hungarian notation.

CVS (concurrent versions system) instructions

CVS is a command-line tool for managing source code revisions using a single repository.  WinCvs is a popular GUI for CVS that makes it much easier to use.  (Other interfaces exist, such as tortoisecvs).  To start using CVS through WinCvs, do the following:

  1. Download and install WinCvs/MacCvs/gCvs on your development machine
  2. Run WinCvs (wincvs.exe)
  3. Now CVS is ready for you to add your own files, modify them, etc.!  For reference, see the on-line CVS Cederqvist manual or Redbean manual

Alternatively, if you would prefer to just use the command-line version (not recommended),

  1. Download and install the cvs client on your development machine
  2. Use a text editor to create a ~/.cvsrc file that contains a single line that looks like this:
    cvs -d
    (Replace yourid with your student id)
  3. type cvs login at the command prompt, along with your password (this will store your password locally in your ~/.cvspass file)
  4. cd to the directory in which you want to copy files from the repository
  5. type cvs checkout name, where name is defined below
  6. Now CVS is ready!  For reference, see one of the manuals above

Replace name with class/rootfly (Spring 2005, 2007, 2008, or 2009), or class/seebreeze (Spring 2006).

For the grader: 

VC++ 6.0

When checking in code, be sure to check in all .cpp, .h, .dsp, .dsw, and .rc files, along with the res directory that contains .ico and .rc2 files.  The .ico file is binary, while all others are text-based.  Do NOT check in all the other files that Visual Studio creates automatically, such as .aps, .clw, .ncb, or .opt.  When in doubt, check out your code to a new temporary directory and verify that it compiles and runs.


Individual Milestones:

Class Project:

The semester-long project will be divided into three phases:


For the project, students should:

Rootfly bugs and features can be found at sourceforge

List of desired Rootfly features/bug fixes:

  1. Top priority:
    1. bug:  out of memory error
    2. optimize sluggish performance: 
      1. sluggish with 40+ sessions, 33 windows, and 36 tubes
      2. click thumbnail, there is a delay in redrawing
      3. cache for thumbnails to improve redraw speed
    3. Add 'start annotating' button; then autodetect, and autocopy
      1. remove 'autodetect' button and 'done annotating' button
      2. simplify bits for whether autodetect run
      3. make sure that .rfy file reading/writing still works (what bits in file are affected?)
    4. Progress window
      1. Simplify interface for Progress Window by collapsing colors for 'done annotating' and 'root drawn'
      2. progress window needs page button for many tubes
      3. progress window should show all sessions for single tube, rather than all tubes for single session
    5. UI
      1. when zoomed out, should be able to select and edit any root, whether or not its primary window is the center window
      2. replace gaudy pencil icon
      3. hand icon for panning
      4. rephrase dialog box in tools.options:  "Automatically detect roots when image loaded"
      5. MoveAll should move all roots in all windows
      6. when drawing new root, set window of root using centroid of all the points (instead of using the window of the first point)
      7. if user moves root outside image, cannot select point on root (?)
      8. arrow keys shortcut:  when zoomed in, move w/i image; otherwise, navigate to next WS
      9. need prettier pan/zoom buttons; put magnifying glass icon on Zoom in / zoom out buttons
  2. High priority:
    1. remember last TWS after exiting program; store in registry or file on disk so that automatically navigates there
    2. new, select directory: need less scary interface for file format; should parse filenames automatically and display interpretation overlaid; then provide 'details' button if user wants to change this.
    3. replace click, move, click with click-n-drag
    4. Copy dialog
      1. copy... should copy to current TWS by default (rather than *from* current TWS)
      2. copy shortcut key
      3. copy... should jump over missing session; i.e., don't allow copy from empty session
      4. if copy to session containing roots, do not lose existing roots
      5. copy session thru ... (empty warning box) -- str empty in uc_copysession::execute
    5. calibration:
      1. average multiple calibrations
      2. calibration:  allow user to adjust endpoints
    6. remove Debug item from main menu
    7. autodetect warning if roots already present (give three options:  copy roots before autodetect, don't copy roots, cancel)
    8. quickjump button jumps to the next window, first session with no data (like typewriter carriage return)
    9. store experiment info (e.g., name of experiment) in resulting .csv file
    10. put 'Zoom:' label just above group of zoom buttons
    11. all images should be the same size (provide warning if loading an image with different size);
      See ApplicationData::ReloadImageBuffers -- question for user:  What should happen if images not all same size?
    12. open old .rfy file => should not ask you to navigate to image directory
    13. (?) copy only data for single root (in case user went back to earlier session and added a root that was missed)
    14. (?) copy only certain data for single root (in case user went back to earlier session and changed state of root from dead to live)
    15. (?) button on each side of thumbnails allows user to quickly jump to first session or last session
  3. Bugs:
    1. conversion => in debug mode it fails b/c window of color box does not yet exist
  4. Internal refactoring:
    1. optimize redraw function
    2. ProgressData has a duplicate copy of whether image has been annotated; really should only be in Tube; see OnCHECKDoneAnnotating
    3. remove old zoom in/out check buttons (but be careful b/c they may be still being used in the code)
    4. develop documentation with Doxygen
    5. rename Tag to TubeName; many Tag methods are not used -- either delete them or justify existence; use Tag / TubeName in Tube
    6. nobody calls ApplicationData::getMainImage
    7. ImageScanned = ImageAnnotated
    8. TubeControl does what?
    9. TestBar is not used
  5. Future version:
    1. autosave
    2. wraparound/panoramic camera
    3. (?) toolbar to replace buttons; would require SDI implementation rather than dialog box
    4. (?) copy data backwards to earlier session
    5. slider for setting autodetect sensitivity
  6. Completed:
    1. improve results with RootDetect.dll (old version is better)
    2. Make converter .exe to handle versions before 1.8.25 (see "START new file version starting with 1.8.25" in DataStructures.cpp)
    3. non-Bartz format
    4. jpegs and bmps
    5. resize application window
    6. zoom out image; display multiple images simultaneously and allow user to trace root across them; this would take the place of displaying windows in tube as contiguous (able to turn off for researchers who skip windows)
    7. user-defined condition code (allow for up to two of them); 'Custom'
    8. user preferences should be saved (user-defined condition code is specific to experiment)
    9. tube name includes transect (if one)
    10. move entire root
    11. copy... button brings up dialog box to enable different options
      • copy all data from previous session
      • copy only data from previous window (how to handle root that spans multiple windows?)
    12. select all, move roots (this would replace need for register button)
    13. root can span multiple windows
    14. keep thumbnails the same size as window is resized; fit as many as we can
    15. multiple diameters per root
    16. do not allow circle to drag off root
    17. allow user to customize colors for drawing roots
    18. delete individual points in root
    19. display date
    20. bug:  when parsing Bartz format, get session directly from the field for session rather than inferring from the date
    21. (?) auto-copy session when go to next session; auto-copy window when draw
    22. add scrollbar on left and bottom
    23. provide stub for automatic root detection algorithm; need to store bit per window/session indicating whether algorithm has already been run; also need to store set of likely false positives per window.
    24. bug:  rootfly is slow when advancing to the next image (scan directory is the problem?); ok to have all the images in one directory if we can fix this.
    25. file export bug:  should not change filename
    26. copy previous bug, needs to remember alignment
    27. allow user to change id of root (?)
    28. undo

Instructor: Stan Birchfield, 207-A Riggs Hall, 656-5912, email: stb at clemson
Office hours:  3:30-5:00pm Monday, or by appointment
Grader: Prakash Chockalingam, cchocka at clemson
2:30 - 3:20 MWF, 227 Riggs Hall