Skills for CSCI 3308
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.
- You should understand why Brook believes there cannot be a silver bullet
- 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.
- You should understand why the "Promising approaches" are promising
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.
- You should know what practices make up XP and the reason for including
these practices in XP
- You should be able to write user stories
- 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
- You should know how to write functional (black box) test suites
- You should know how to write structural (white box) test suites
- You should know how to use coverage criteria (statement, decision, condition,
multiple condition, path) to evaluate/construct a structural test suite.
- 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.
- You should know what a design pattern is and why they are useful
- You should know what these mean and why they are needed: types,
interfaces, abstract classes, classes, inheritance, dynamic dispatch,
composition, delegation
- You should know how and when to use a composite pattern
- You should understand the issues with the composite pattern
- You should know how and when to use the strategy pattern
- You should understand the issues with the strategy 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.
- You should know how and when to use the decorator pattern
- 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.
- You should know how and when to use this pattern
- You should understand the issues with this pattern
- You should know how and when to use this pattern
- You should understand the issues with this pattern
- You should know how and when to use this pattern
- You should understand the issues with this 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.
- You should know how and when to use this pattern
- You should understand the issues with this 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.
- You should know how and when to use this pattern
- You should understand the issues with this 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.
- You should know how and when to use this pattern
- 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.
- You should be able to apply this refactoring on a piece of
code
- You should know when it is a good idea to apply this refactoring.
Skill Set 15: Move method and rename method
refactorings
- You should be able to apply these refactoring on a piece of
code
- 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
- You should be able to apply these refactoring on a piece of
code
- 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
- You should be able to apply these refactoring on a piece of
code
- 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.
- 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
- You should understand why preconditions, postconditions, weakest
preconditions, and loop
invariants are useful
- 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
- 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.
- You should be able to develop loop invariants and loop bound functions for
simple loops
- Given loop invariants and bound functions, you should be able to develop
simple loops