Skills for CSCI 3308

Skill Set 1: No Silver Bullet

This is an incredibly influential paper.  It distills many years of Brook's experiences working on OS/360 and has influenced many things that have come after it.  E.g., Extreme Programming promotes the "grow, not build software" and "rapid prototyping" strategies.  We will refer to this paper throughout the semester.

  1. You should understand why Brook believes there cannot be a silver bullet
  2. You should understand the difference between "essence" and "accidents" and be able to argue whether a given advance attacks the essence or the accidents of software development.
  3. You should understand why the "Promising approaches" are promising

Skill Set 2: Extreme Programming

Over the last few years, extreme programming has become a very hot methodology for modestly sized projects (around 30 programmers).  For larger projects, organization sometimes partition the project and use extreme programming on each partition.

  1. You should know what practices make up XP and the reason for including these practices in XP
  2. You should be able to write user stories
  3. Given user stories and acceptance tests, you should be able to use a test-driven methodology to write unit tests and use them to develop software

Skill Set 3: Testing

  1. You should know how to write functional (black box) test suites
  2. You should know how to write structural (white box) test suites
  3. You should know how to use coverage criteria (statement, decision, condition, multiple condition, path) to evaluate/construct a structural test suite.
  4. For each coverage criteria you should know when it works well and when it does not.

Skill Set 4: Design Patterns Background

As software becomes increasingly complex, it becomes more and more important to reuse code and ideas.  Such reuse frees up the programmer from having to conceive everything from a scratch and can therefore focus on aspects of the program that are unique.  At the simplest level, we can reuse classes and methods that others have developed.  For example, if we need a linked list, rather than writing on on our own, we can use the one that comes in the Java standard library.  At the other extreme we can reuse designs.  This is what design patterns are all about. 

  1. You should know what a design pattern is and why they are useful
  2. You should know what these mean and why they are needed: types, interfaces, abstract classes, classes, inheritance, dynamic dispatch, composition, delegation

Skill Set 5: Composite Pattern

  1. You should know how and when to use a composite pattern
  2. You should understand the issues with the composite pattern

Skill Set 6: Strategy Pattern

  1. You should know how and when to use the strategy pattern
  2. You should understand the issues with the strategy pattern

Skill Set 7: Decorator Pattern

This pattern is use a great deal in compilers.  Compilers often need to put annotations on their internal representation of the program being compiled.  For example, one could imagine placing an annotation "may modify variable x" on a call statement.  Different parts of the compiler may need to put different annotations; moreover some objects may have no annotations while others have many annotations.  The decorator pattern is perfect for this.

  1. You should know how and when to use the decorator pattern
  2. You should understand the issues with the decorator pattern

Skill Set 8: Abstract factory pattern

This pattern is very convenient since it enables one to create objects without knowing their concrete classes.  Thus, it is particularly relevant when the program follows good software engineering practices and separates interface from implementation.

  1. You should know how and when to use this pattern
  2. You should understand the issues with this pattern

Skill Set 9: Bridge pattern

  1. You should know how and when to use this pattern
  2. You should understand the issues with this pattern

Skill Set 10: Command pattern

  1. You should know how and when to use this pattern
  2. You should understand the issues with this pattern

Skill Set 11: Iterator pattern

This is one of the most commonly used pattern.  Just about any good implementation of a collection class supports it.  For example, the Java standard libraries support iterators.  These were deemed so important that in the newest version of the language, there is even language support for iterators so that using them is just as convenient as a counted for loop.

  1. You should know how and when to use this pattern
  2. You should understand the issues with this pattern

Skill Set 12: Visitor pattern

This is the pattern that I have found to be awesomely powerful.  In 1996, I was working on a compiler and my code kept getting really unmanageable.  Then I encountered this pattern and it completely transformed the code into something that was clean and manageable.  Since then I cannot think of any significant piece of software that I've written that did not use this pattern.

  1. You should know how and when to use this pattern
  2. You should understand the issues with this pattern

Skill Set 13: Observer pattern

The observer pattern is used extensively in user interfaces.  For example, whenever an event happens (e.g., mouse click) we need to identify many observers about it.  Some people also call this the listener pattern since the observers are effectively listening in for events.

  1. You should know how and when to use this pattern
  2. You should understand the issues with this pattern

Skill Set 14: Extract method refactoring

Refactorings play a crucial role in extreme programming: they are the steps that enable a programmer to evolve their code as needed.  With refactorings, programmers do not need to worry about thinking of all possible ways in which their code will be used; instead, they can write it for their current needs and then modify it using refactorings if and when the code turns out to be inadequate.

I attended a talk by Martin Fowler last week where he listed "eliminating duplicates" as one of the most important things to do while programming.  The extract method helps with that since the extracted method can be used by any number of clients, thus avoiding the need for code duplication.

  1. You should be able to apply this refactoring on a piece of code
  2. You should know when it is a good idea to apply this refactoring.

Skill Set 15: Move method and rename method refactorings

  1. You should be able to apply these refactoring on a piece of code
  2. You should know when it is a good idea to apply these refactoring.

Skill Set 16: Replace temp with query, inline temp, and split temporary variable refactorings

  1. You should be able to apply these refactoring on a piece of code
  2. You should know when it is a good idea to apply these refactoring.

Skill Set 17: Replace conditional with polymorphism, decompose conditional, pull up method, push down method

  1. You should be able to apply these refactoring on a piece of code
  2. You should know when it is a good idea to apply these refactoring.

Skill Set 18: When to apply refactorings

We have looked at 10 refactorings this semester.  In class I demonstrated how to use the refactorings to incorporate design patterns in the code.  In this skill set we focus on when to apply the refactorings in order to reduce "bad smells" in the code.  When doing this reading, you will find that it refers to not just refactorings that we have covered but also many that we have not.  Ignore the part that refers to refactorings that we have not covered.

  1. For the refactorings that we have covered (Skill sets 14, 15, 16, and 17) you should know when to apply them based on the smells they help to remove.

Skill Set 19: Pre and post conditions, weakest preconditions

  1. You should understand why preconditions, postconditions, weakest preconditions, and loop invariants are useful
  2. You should be able to write preconditions, postconditions, and weakest preconditions for simple code (e.g., a function that finds the maximum element in a list)

Skill Set 20: Developing programs and specifications hand in hand

  1. Given a postcondition for a simple function (i.e., don't worry about loops yet) you should be able to systematically develop the code for the function.

Skill Set 21: Loops

  1. You should be able to develop loop invariants and loop bound functions for simple loops
  2. Given loop invariants and bound functions, you should be able to develop simple loops