CS 100: Software Construction

Fall Quarter 2004: September 23, 2004 - December 3, 2004

Contents

Basics

Catalog Description: Development and construction of software products. Topics include design, coding layout, and style; implementation strategies; quality attributes; prototyping, reuse, and components; debugging, testing, and performance; integration and maintenance; documentation; standards, analysis, and selection of tools and environment; and personal software processes.

Prerequisite(s): CS 141: Intermediate Data Structures and Algorithms. You must be reasonably comfortable with C++ programming and Unix to pass this course!

Time Requirements: Four units (12-16 hours/week): lecture (3 hours/week), laboratory (3 hours/week), individual study (6-10 hours/week; includes reading, writing, and hacking).

Coordinates

Instructor: Peter H. Fröhlich
Office Hours: Monday, Wednesday, Friday, 3:10 pm - 4:00 pm (email for additional appointments)
Location: Surge, Room 341

Lectures: Monday, Wednesday, Friday, 10:10 am - 11:00 am
Location: Sproul Hall, Room 2355

Assistant: Max Najim
Office Hours: Tuesday, 1:00 pm - 2:00 pm (email for additional appointments)
Location: Surge, Room 282

Lab: Wednesday, 11:10 am - 2:00 pm
Location: Surge, Room 171

Assistant: John Anderson
Office Hours: Monday, 2:00 pm - 3:00 pm (email for additional appointments)
Location: Surge, Room 282

Lab: Wednesday, 2:10 pm - 5:00 pm
Location: Surge, Room 171

Mailing List: cs100@lists.cs.ucr.edu (Archive)

Books

Required

Andrew Hunt, David Thomas: The Pragmatic Programmer. Addison-Wesley, 1999. A wealth of practical advice on various topics relevant to software construction, including design, implementation, testing, debugging, etc. Organized in 46 relatively small "lessons," extensively cross-referenced, including 70 "rules" and several check lists on a reference card. You can download additional material for this book here. An errata is available.

Recommended

Martin Fowler: UML Distilled. Addison-Wesley, 3rd edition, 2003. Succinct introduction to the Unified Modeling Language (UML) and also a concise summary of basic software engineering and software construction concerns. The 2nd edition is also good enough for the course, and it's available much cheaper.

Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides: Design Patterns. Addison-Wesley, 1995. The standard reference for object-oriented design patterns: well-documented solutions to recurring design and implementation problems. The case study in chapter 2 is also a great introduction to object-oriented design and programming. We'll discuss number of patterns in the course.

Also Running

Brian Kernighan, Rob Pike: The Practice of Programming. Addison-Wesley, 1999. Succinct discussion of a variety of programming topics. Deals with style, documentation, design, testing, debugging, portability, etc. Uses several programming languages (C, C++, Java, Perl) and discusses the tradeoffs involved. I used this one in Spring 2003 as the main text, but I think the new choice is more comprehensive and accessible; still, get this one if you feel like it, goes nicely with the current text. An errata is available.

Barbara Liskov, John Guttag: Program Development in Java. Addison-Wesley, 2001. Do not be fooled by the title. This is an excellent advanced programming text that deals with many software engineering concerns as well. If you want to learn some Java and along the way pick up lots of programming and design skills, get this book.

Steve McConnell: Code Complete. Microsoft Press, 1993. Another excellent advanced programming text, again covering many software engineering concerns as well. This is a real classic, but currently out of print as far as I know. An errata is available.

Schedule (Tentative!)

Warning: The schedule is under active revision for Fall 2004, there will be significant changes in the next few days!

Note the word tentative above. Things seldom go according to plan, and I expect changes here and there as we go along. Please also read the notes below.

Week Lecture Lab Assignment Exam Reading
0 Welcome, Software Engineering - - - Preface; H 1, 5; browse
1 Project Overview, Teams & Individuals (H 41), Object-Oriented Programming [Counter Example] Welcome, Register Teams, Programming Review [Paul's Pointer Tutorial], LaTeX [Introduction] [Example] [Assignment 1] - H 2, 3, 4, 6, 41
2 Reviews & Inspections, Style & Documentation (H 44), Object-Oriented Design Register Teams, XHTML, doxygen, Discussion: Plain Text (H 14), Text Manipulation (H 19) [Assignment 2] - H 14, 15, 16, 19, 44
3 Configuration Management (H 17) [Subversion], Automation (H 42), Estimating (H 13) Tool Review: cron, make [Hawaii Tutorial], gdb [CMU Tutorial] [Assignment 3] [Quiz 1]
[Solution]
H 7, 8, 13, 17, 42
4 Debugging (H 18), Assertions (H 22, 23), Contracts (H 21) nana, LeakTracer, Discussion: Exceptions (H 24), Balancing (H 25); Other tools: Electric Fence, Garbage Collector, PyContract [Assignment 4] [debug.tar.gz] - H 18, 21, 22, 23, 24, 25
5 Algebraic Specifications, Midterm Review Open Lab: Introduction to Python [Instant Python], Midterm Review - [Midterm]
[Solution]
H 32, 35, 37, all of the above
6 Testing (H 34, 43), Coverage, Design Pattern: Composite, Performance xUnit [CppUnit], gcov [Peter's Tutorial], gprof, Discussion: Enough (H 4), Ready (H 38) [Assignment 5] - H 4, 34, 38, 40, 43
7 UML Case Study: Adventure, Design Patterns: Composite, Proxy & Iterator, Design Patterns: Observer & Views (H 29) Design Patterns: Template Method & Factory Method, Discussion: Reversibility (H 9), Coincidence (H 31), Refactoring (H 33) [Assignment 6] - H 9, 29, 31, 33, 39
8 OOP Heuristics & Law of Demeter (H 26), UML Case Study: Adventure, Design Pattern: Decorator UML Case Study: File System, Design Patterns: Strategy & Abstract Factory [Assignment 7] [Quiz 2]
[Solution]
H 12, 20, 26, 39
9 Design Pattern: Visitor, Requirements (H 36),
Holiday!
UML Case Study: TBD, Discussion: Bullets (H 10), Prototypes (H 11) [Assignment 8] [Beck Paper] - H 10, 11, 36, 45, 46
10 Legal Issues, Comprehensive Review Open Lab: Comprehensive Review - [Comprehensive]
[Solution]
H 27, 28, 30 complete text

Notes

Week 0 is the "pseudo week" starting Thursday, September 23. Open Lab means you can attend any lab section offered that week: You don't have to attend the one you're enrolled in, and you can even attend all of them if you want to; otherwise you need to go to the lab you're enrolled in.

The term "H s" refers to the required text by Hunt et.al.; for example, "H 27" refers to section 27. It's a good idea to skim related sections as well (as indicated in the book).

Bold sections are not discussed in lecture or lab (unless you ask about them), but the material is relevant. Some topics we go over in lecture or lab are not covered in the text; I will try to provide additional references for those.

You are expected to do the assigned reading before a topic is covered in lecture or lab. Reading assigned in the week of an exam is part of the exam! Please try to read ahead, you'll be surprised how much more sense the lectures make...

The department's programming guidelines make for quite interesting reading, often highly relevant to this course.

Slides

I try to write slides for my lectures, but I am not always very lucky in getting them done (either on time or ever). In other words, it's a good idea to always take notes in class. :-) That said, I decided to put all my slides into one PDF file instead of posting every lecture by itself. The advantage is that you never have to guess whether I forgot to post a certain lecture, or whether I never wrote the slides for it. The drawback is that the file evolves during the quarter, so the version you download in one week will be quite different from the one available three weeks later. Keep that in mind please.

I'll try to email the list whenever I post a new version of the slides, but of course I might forget. If in doubt, just check back here.

Project

There is not really a "distinct" project in CS 100, instead all project work is integrated with the weekly assignments. In Spring 2003, the assignments focused on an improved implementation of the standard Unix wc command, the so-called "word count" tool. In Fall 2003 the assignments focused on a "schedule generator" application called sg, which takes a plain text list of events and produces nice XHTML output. In Winter 2004 the assignments focused on a "find duplicate" application called fd, which recursively explores a directory tree and produces list of duplicate files and subtrees. In Spring 2004 the assignments focused on a "disk usage" application called du2, which recursively explores a directory tree and computes it's size in a variety of formats.

This quarter, the assignments will focus on a "circuit simulator" application called cs for obvious reasons. The basic cs tool accepts a combinatorial circuit as input and produces the circuit's truth-table as output. Combinatorial circuits consist of inputs, gates (such as and, or, and not), outputs, and wires. The truth-table of a combinatorial circuit shows the state of its outputs for each possible combination of inputs. More details on what cs must be able to do will be given as we go along, but this should be enough to get a "flavor" of the project.

Important Note: As long as you understand what the C++ expression (a || b) && c computes, you will be fine. We will review the basics of combinatorial circuits in lecture and lab, for the benefit of those who did not take CS 061: Machine Organization and Assembly Language Programming yet.

Teams

The following teams are currently registered. If there are any changes in your team, be sure to let us know, we need to approve those to keep track of what's going on in the course. Also, if any information below is wrong, tell us ASAP. Thanks!

Assessment

Assignments (8): 40%, Quizzes (2): 10%, Midterm (1): 20%, Comprehensive (1): 20%, Peer Review (1): 10%. See my policies for more information.

Updated: $Id: index.html,v 1.34 2004/12/01 08:38:08 phf Exp $ Validate: XHTML CSS
Copyright © 2003-2004 Peter H. Fröhlich. All rights reserved.