| Lecture 2: Models of Software Development | ||||||||||||||||||
How do people develop software? Don't ask. A recently published book says that making software reminds him of what Bismarck (some old German politician) said about sausages: You want to eat them but you don't want to know how they are made. How do people think other people should develop software? For a long time, people developed software in an ad hoc manner. Eventually they realized that finding and eliminating errors late in the game is extremely expensive (see Barry Boehm's influential article) and that they should create a systematic process. The waterfall modelWhat they came up with is the waterfall model of software development. According to this model, software companies
People have tried to develop according to this model, but they now understand that this model doesn't work. Can you imagine why? To this day, large companies stick to some variant of this process. In detail, however, the process is much more feedback oriented and is close to the scientific process of discovering the proper (in the sense of predictive) scientific model of the world. The iterative refinement modelThis iterative process works roughly like that:
Where do all the requirement engineering, specification writing, etc. go?It is still there, but it is a part of a cycle. Specifically:
Please compare this with the design recipe process advocated in How to Design Programs. One recent evolution of iterative refinement is extreme programming, a sellable buzzword-compliant version of the idea. While "iterative refinement" has evolved in the prototype-oriented academic community -- think Scheme and Prolog and similar languages -- the extreme programming community evolved in the academic fringe of industry, again fostered in an interactive language community (Smalltalk, now known as Squeak). In this course, I want to practice iterative refinement with you and some people-based techniques that make it feasible. Let's start with reading stories and teasing out the essential elements. From Stories to ConceptsConsider this story:
Let's identify the concepts that show up. To do so, look out for actors and information: TA (= professor), course homework assignment, deadline, homework solution student, name, id account, password storage on computerThe students, the TA, and the storage are actors; the remaining concepts are pieces of information. Draw lines between the concepts that are related. Here is an excerpt for the above concepts: +--------------------+ | TEACHING ASSISTANT | +--------------------+ | +------------+ +----------+ | assignment | ------- | deadline | +------------+ +----------+ | \-----\ | +----------+ +---------+ | solution | ------ | STORAGE | +----------+ +---------+It does show two actors and three pieces of information. It omits such things as students, student accounts, etc. To check your thinking, consider adding numeric quantities on each end of a link that show how a pair of concepts relates to each other: +--------------------+ | TEACHING ASSISTANT | +--------------------+ |1 | |n +------------+ 1 1 +----------+ | assignment | ------- | deadline | +------------+ +----------+ | 1 \n | n | \ | | \ | | n \1 | 1 +----------+ n 1 +---------+ | solution | ------ | STORAGE | +----------+ +---------+Here we see that one TA controls many assignments, but each assignment comes with a unique deadline. Identify the system and the outside. This may actually identify several systems and several "outsides": +--------------------+ | TEACHING ASSISTANT | +--------------------+ |1 ====|=================================== |n +------------+ 1 1 +----------+ | assignment | ------- | deadline | +------------+ +----------+ | 1 \n | n | ============================ | # \ | | n # \1 | 1 +----------+ n# 1 +---------+ | solution | -#---- | STORAGE | +----------+ # +---------+The redrawn picture identifies the two actors as being outside the system and the information as being a part of the system. This doesn't have to be the case as the next example shows.
Some of the concepts of this "story" are: player, token gameboard, properties, houses and hotels, chance cards, dice money, bankerIdentify the remaining concepts, draw a concept graph, and draw a line around the system to identify the interface between it and the world. Stories Change, Promised!When the story changes, you can identify the changes in concepts, their relationships, and even the system boundaries.
Naturally this leads to new concepts and new and modified relationships: +---------+ 2,3 1 +---------+ 1 n +----------+ | STUDENT | --------- | account | ------ | solution | +---------+ +---------+ +----------+ | 1 | | 1 +----------+ | password | +----------+Here we see that 2 or 3 students relate to an account now, yet each student still has one password. Furthermore, students are no longer directly related to homework solutions; instead, the account has become an important intermediary. From Concepts to Use CasesDrawing the system boundary identifies events and triggers that cause the pieces of the world to interact. Imagine those interactions and write them down. Turn the big story into little stories. Describe what happens not how. The descriptions of use cases are like the descriptions of dialogs in novels. You identify a dialog by an entry point into the system and an exit point. Example:
Practice writing use cases with both examples. Can you identify concepts in the monopoly game that are not needed in a game that only people play? Bibliography |
last updated on Tue Jun 9 22:03:19 EDT 2009 | generated with PLT Scheme |