Safe Home

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 124

Quick Overview of SafeHome

 The SafeHome company has developed an innovative HW box that


implements wireless Internet (802.11) connectivity in a very small
form factor (the size of a matchbook).
 The idea is to use this technology to develop and market a
comprehensive home automation product line.
 This would provide security functions, control over telephone
answering machines, lights, heating, air conditioning, and home
entertainment devices.
 The first generation of the system will only focus on home security
and surveillance since that is a market the public readily
understands.

CS550 Intro. to SE
Spring 2007 1
How a Project Starts (pg 48)
 The scene: of a small matchbook. We can attach
 Meeting room at CPI Corporation, a it to sensors of all kinds, a digital
(fictional) company that makes consumer
camera, just about anything. Using
products for home and commercial use.
the 802.11 b wireless protocol. It
 The players:
allows us to access the device's
 Mal Golden, senior manager, product
development; output without wires. We think it'll
 Lisa Perez, marketing manager; lead to a whole new generation of
 Lee Warren, engineering manager; products.
 Joe Camalleri, executive VP, business  Joe: You agree, Mal?
development.
 Mal: I do. In fact, with sales as flat as
The conversation:
they've been this year, we need
 Joe: Okay, Lee, what's this I hear
something new. Lisa and I have been
about your folks developing a what? doing a little market research, and
A generic universal wireless box? we think we've got a line of products
 Lee: It's pretty cool, about the size that could be big.
 Joe: How big... , bottom-line big?
CS550 Intro. to SE
Spring 2007 2
 Lee: (jumping in) Engineering's done a
 Mal: (avoiding a direct technical feasibility study of this idea, Joe.
commitment): Tell him about our It's doable at low manufacturing cost.
idea, Lisa. Most hardware is off the shelf. Software is
 Lisa: It's a whole new generation of an issue, but it's nothing that we can't do.
what we call "home management  Joe: Interesting. Now, I asked about the
products." We call 'em SafeHome. They bottom line.
use the new wireless interface,  Mal: PCs have penetrated 60 percent of all
provide homeowners or small households in the USA. If we could price
business people with a system that's this thing right, it could be a killer-App.
controlled by their PC--home Nobody else has our wireless box--it's
security, home surveillance, proprietary. We'll have a two-year jump
appliance and device control. You on the competition. Revenue? Maybe as
know, turn down the home air much as $30-40 million in the second year.
conditioner while you're driving  Joe (smiling): Let's take this to the next
home, that sort of thing.
level. I'm interested.
CS550 Intro. to SE
Spring 2007 3
Selecting a Process Model, Part 1(pg 85-86)
 The scene: see it at the moment. No doubt,
 Meeting room for the software we've got a lot of work to do to
engineering group at CPI Corporation, a
(fictional) company that makes consumer
simply define the thing, but I'd
products for home and commercial use. like you guys to begin thinking
 The players: about how you're going to
 Lee Warren, engineering manager; approach the software part of this
 Doug Miller, software engineering project.
manager;
Doug: Seems like we've been
 Jamie Lazar, software team member;
 Vinod Raman, software team member; pretty disorganized in our
 Ed Robbins, software team member. approach to software in the past.
 The conversation: Ed: I don't know, Doug. We

 Lee: So let's recapitulate. I've spent always got product out the door.
some time discussing the SafeHome Doug: True, but not without a lot
product line as we of grief, and this project looks like
it's bigger and more

CS550 Intro. to SE
Spring 2007 4
complex than anything we've push paper around.
done in the past. Doug: Give it a chance before
Jamie: Doesn't look that hard, you go negative on me. Here's
but I agree ... our ad hoc approach what I mean. [Doug proceeds to
to past projects won't work here, describe the process framework
particularly if we have a very tight described in Chapter 2 and the
timeline. prescriptive process models
Doug (smiling): I want to be a presented to this point.
bit more professional in our Doug: So anyway, it seems to me

approach. I went to a short course that a linear model is not for us ...
last week and learned a lot about assumes we have all requirements
software engineering ... good up front and knowing this place,
stuff. We need a process here. that's not likely.
Jamie (with a frown): My job is Vinod: Yeah, and that RAD

to build computer programs, not model sounds way too IT-

CS550 Intro. to SE
Spring 2007 5
oriented ... probably good for
building an inventory control
system or something, but it's just
not right for SafeHome.
Doug: I agree.

Ed: That prototyping approach


seems OK. A lot like what we do
here anyway.
Vinod: That's a problem. I'm
worried that it doesn't provide us
with enough structure.
Doug: Not to worry. We've got
plenty of other options, and I
want you guys to pick what's best
for the team and best for the
project.
CS550 Intro. to SE
Spring 2007 6
Selecting a Process Model, Part 2(pg 90-91)
 The scene: sense and I really like the flow of
 Meeting room for the software that spiral model thing. That's
engineering group at CPI Corporation, keepin' it real.
a company that makes consumer
products for home and commercial
 Vinod: I agree. We deliver an
use. increment, learn from customer
 The players: feedback, replan, and then deliver
 Lee Warren, engineering manager; another increment. It also fits into
 Doug Miller, software engineering the nature of the product. We can
manager; have something on the market fast
 Ed and Vinod, members of the and then add functionality with
software engineering team. each version, er, increment.
 The conversation:  Lee: Wait a minute, did you say
 (Doug describes evolutionary that we regenerate the plan with
process options.) each tour around the spiral,
 Ed: Now I see something I like. Doug? That's not so great, we
An incremental approach makes
CS550 Intro. to SE
Spring 2007 7
need one plan, one schedule, and  Doug (smiling): Then you'll have
we've got to stick to it. to reeducate them, buddy.
 Doug: That's old school thinking,
Lee. Like Ed said, we've got to
keep it real. I submit that it's better
to tweak the plan as we learn
more and as changes are
requested. It's way more realistic.
What's the point of a plan if it
doesn't reflect reality?
 Lee (frowning): I suppose so, but
senior management's not going to
like this ... they want a fixed plan.

CS550 Intro. to SE
Spring 2007 8
Considering Agile Software Development
 The scene:
(pg 113-114)
Doug: And? 
 Doug Miller's office.  Vinod: I was talking to a friend at
 The players: another company, and he was telling
 Doug Miller, software engineering me about Extreme Programming. It's
manager; an agile process model, heard of it?
 Jamie Lazar, software team member;
 Vinod Raman, software team member.
 Doug: Yeah, some good, some bad.
 The conversation:
 Jamie: Well, it sounds pretty good to
us. Lets you develop software really
 (A knock on the door)
fast, uses something called pair
 Jamie: Doug, you got a minute? programming to do real-time quality
 Doug: Sure Jamie, what's up? checks ... it's pretty cool, I think.
 Jamie: We've been thinking about  Doug: It does have a lot of really
our process discussion yesterday ... good ideas. I like the pair
you know, what process we're
going to choose for this new
SafeHome project.
CS550 Intro. to SE
Spring 2007 9
programming concept, for  Doug: So you guys think we
instance, and the idea that should use XP?
stakeholders should be part of the  Jamie: It's definitely worth
team. considering.
 Jamie: Huh? You mean that  Doug: I agree. And even if we
marketing will work on the choose an incremental model as
project team with us? our approach, there's no reason
 Doug (nodding): They're a why we can't incorporate much of
stakeholder, aren't they? what XP has to offer.
 Jamie: Jeez ... they'll be requesting  Vinod: Doug, before you said
changes every five minutes. "some good, some bad." What was
 Vinod: Not necessarily. My friend the "bad"?
said that there are ways to  Doug: The thing I don't like is the
"embrace" changes during an XP way XP downplays analysis and
project. design ... sort of says that writing
code is where the action is.
CS550 Intro. to SE
Spring 2007 10
 (The team members look at one  Doug: I think we can, Vinod. In
another and smile.) fact, I'm sure of it.
 Doug: So you agree with the XP
approach?
 Jamie (speaking for both):
Writing code is what we do, Boss!
 Doug (laughing): True, but I'd
like to see you spend a little less
time coding and then re-coding
and a little more time analyzing
what has to be done and
designing a solution that works.
 Vinod: Maybe we can have it both
ways, agility with a little
discipline.

CS550 Intro. to SE
Spring 2007 11
Communication Mistakes (pg135)
 The scene:  Ed: What do you mean?
 Software engineering team workspace.  Jamie: Well, I gave Lisa Perez a
 The players: call. She's the marketing honcho
 Jamie Lazar, software team member; on this thing."
Vinod Raman, software team member;
Vinod: And ... ?


 Ed Robbins software team member.
 Jamie: I wanted her to tell me
 The conversation:
about SafeHome features and
 Ed: What have you heard about functions ... that sort of thing.
this SafeHome project? Instead, she began asking me
 Vinod: The kick-off meeting is questions about security systems,
scheduled for next week. surveillance systems ... I'm no
 Jamie: I've already done a little bit expert.
of investigation, but it didn't go  Vinod: What does that tell you?
well."  (Jamie shrugs.)
 Vinod: That marketing will need

CS550 Intro. to SE
Spring 2007 12
us to act as consultants and that  Vinod: I saw Doug reading a
we'd better do some homework on book on "requirements
this product area before our kick- engineering." I'll bet that lists
off meeting. Doug said that he some principles of good
wanted us to "collaborate" with communication. I'm going to
our customer, so we'd better learn borrow it from him.
how to do that.  Jamie: Good idea ... then you can
 Ed: Probably would have been teach us.
better to stop by her office. Phone  Vinod (smiling): Yeah, right.
calls just don't work as well for
this sort of thing.
 Jamie: You're both right. We've
got to get our act together or our
early communications will be a
struggle.

CS550 Intro. to SE
Spring 2007 13
Preliminary System Engineering (pg163-164)
 The scene:  Jamie: That's why we have
 Software engineering team workspace additional meetings scheduling
after the SafeHome kickoff meeting has for the next five days. By the way,
occurred.
I suggested that two of the
 The players: "customers" move over here for
 Jamie Lazar, software team member; the next few weeks. You know,
 Vinod Raman, software team member;
live with us so we can really
 Ed Robbins, software team member.
communicate, er, collaborate.
 The conversation:  Vinod: How did that go?
 Ed: I think it went pretty well.  Jamie: Well, they looked at me
 Vinod: Yeah ... but all we did was like I was crazy, but Doug [the
look at the overall system--we've software engineering manager]
got plenty of requirements likes the idea--it's agile--so he's
gathering work left to do for the talking to them.
software.  Ed: I was taking notes using my
PDA during the meeting, and I
CS550 Intro. to SE
Spring 2007 14
 came up with a list of basic panels, various sensors, and
applicance/device controllers.
functions.
 All will communicate via wireless
 Jamie: Cool, let's see. protocols (e.g., 802.11b) and will be
 Ed: I've already e-mailed both of designed for new-home construction
and for application within existing
you a copy. Take a look and we'll homes.
talk.  All hardware with the exception of our
 Vinod: How about after lunch? new wireless box will be off the shelf.

 (Jamie and Vinod received the


 Basic software functionality that I
following from Ed) Preliminary could glean from our kick­off
notes of the structure/functionality conversation.
of SafeHome:  Home security functions:
 The system will make use of one or  Standard window/door/motion sensor
more PCs, various wall-mounted and/or monitoring for unauthorized access
handheld control (break-ins).
 Monitoring for fire, smoke, and CO
levels.

CS550 Intro. to SE
Spring 2007 15
 Monitoring for water levels in  Home management functions:
basement (e.g., flood or broken water  Control lighting.
heater).
 Control appliances.
 Monitoring for outside movement.
 Control HVAC.
 Change security setting via the
Internet.
 Control video/audio equipment
throughout house.
 Home surveillance functions:  Ability to set house for "vacation/travel
 Connect to one or more video cameras mode" with one button sets.
placed inside/outside house.  Set appliances/lighting/HVAC
 Control pan/zoom for cameras. accordingly.
 Define camera monitoring zones.  Set answering machine message.
 Display camera views on PC.  Contacts vendors to stop paper, mail,
 Access camera views via the Internet. etc.
 Selectively record camera output
digitally.
 Replay camera output.

CS550 Intro. to SE
Spring 2007 16
 Communication management  Other functions:
functions:  As yet undefined.
 Answering machine functions.  All functions are accessible via the
 List of callers via caller ID. Internet with appro­priate password
protection.
 Messages, time-stamped.
 Message text via voice recognition
system.
 E-mail functions (all standard e-mail
functions).
 Standard e-mail display.
 Voice read of e-mail via phone access.
 Personal phone book.
 Link to PDA.

CS550 Intro. to SE
Spring 2007 17
Conducting a Requirements Gathering Meeting
(pg188)
 The scene:
The scene:  The conversation: The conversation:
 A meeting room. The first  Facilitator (pointing at white
requirements gathering meeting is in
progress.
board): So that's the current list of
objects and services for the home
 The players:
security function.
 Jamie Lazar, software team member;
 Vinod Raman, software team member;
 Marketing person: That about
 Ed Robbins, software team member; covers it from our point of view.
 Doug Miller, software engineering  Vinod: Didn't someone mention
manager;
that they wanted all SafeHome
 three members of marketing;
functionality to be accessible via
 a product engineering representative;
the Internet? That would include
 a facilitator.
the home security function, no?
 Marketing person: Yes, that's
right ... we'll have to add that
functionality and the appropriate
objects.
CS550 Intro. to SE
Spring 2007 18
 Facilitator: Does that also add  Ed: That's easier said than done
some constraints? and....
 Jamie: It does, both technical and  Facilitator (interrupting): I don't
legal. want to debate this issue now.
 Production rep: Meaning? Let's note it as an action item and
proceed. (Doug, serving as the
 Jamie: We better make sure an
recorder for the meeting, makes
outsider can't hack into the
an appropriate note.)
system, disarm it, and rob the
place or worse. Heavy liability on  Facilitator: I have a feeling there's
our part. still more to consider here.
 Doug: Very true.  (The group spends the next 45
minutes refining and ex­panding
 Marketing: But we still need
the details of the home security
Internet connectivity . just be sure
function.)
to stop an outsider from getting
in.

CS550 Intro. to SE
Spring 2007 19
Developing a Preliminary User Scenario
 The scene:
(pg190)
 The conversation:
 A meeting room, continuing the first
requirements gathering meeting.  Facilitator: We've been talking
 The players: about security for access to
 Jamie Lazar, software team member; SafeHome functionality that will be
 Vinod Raman, software team member; accessible via the Internet. I'd like
 Ed Robbins, software team member; to try something.
 Doug Miller, software engineering  Let's develop a user scenario for
manager;
access to the home security
 three members of marketing;
function.
 a product engineering representative;
 a facilitator.
 Jamie: How?
 Facilitator: We can do it a couple
of different ways, but for now, I'd
like to keep things really informal.
Tell us (he points at a marketing
person) how you envision
accessing the system.
CS550 Intro. to SE
Spring 2007 20
 Marketing person: Um. .. , well,  Vinod (interrupting): The Web
this is the kind of thing I'd do if I page would have to be secure,
was away from home and I had to encrypted, to guarantee that we're
let someone into the house, say a safe and....
housekeeper or repair guy, who  Facilitator (interrupting): That's
didn't have the security code. good information, Vinod, but it's
 Facilitator (smiling): That's the technical. Let's just focus on how
reason you'd do it .. . tell me how the end-user will use this
you'd actually do this. capability, OK?
 Marketing person: Um . . . the  Vinod: No problem.
first thing I'd need is a PC. I'd log  Marketing person: So, as I was
on to a Web site we'd maintain for saying, I'd log on to a Web site
all users of SafeHome. I'd provide and provide my user id and two
my user id and ... levels of passwords.
 Jamie: What if I forget my
password?
CS550 Intro. to SE
Spring 2007 21
 Facilitator (interrupting): Good security system control panel
point, Jamie, but let's not address along with a list of functions that I
that now. We'll make a note of can perform--arm the system,
that and call it an "exception." I'm disarm the system, disarm one or
sure there'll be others. more sensors. I suppose it might
 Marketing person: After I enter also allow me to reconfigure
the passwords, a screen security zones and other things
representing all SafeHome like that, but I'm not sure.
functions will appear. I'd select  (As the marketing person
the home security function. The continues talking, Doug takes co­
system might request that I verify pious notes. These form the basis
who I am, say by asking for my for the first informal use-case
address or phone number or scenario. Alternatively, the
something. It would then display marketing person could have been
a picture of the asked to write the scenario, but
this would be done outside the
meeting.)
CS550 Intro. to SE
Spring 2007 22
Developing a High-Level Use-Case Diagram (pg195)
 The scene:  The conversation:
 A meeting room, continuing the  Facilitator: We've spent a fair
requirements gathering meeting.
amount of time talking about
 The players: SafeHome home security
 Jamie Lazar, software team member; functionality. During the break I
 Vinod Raman, software team member;
sketched a use-case diagram to
 Ed Robbins, software team member;
summarize the important
 Doug Miller, software engineering
manager; scenarios that are part of this
 three members of marketing; function. Take a look.
 a product engineering representative;  (All attendees look at Figure 7.3.)
 a facilitator.  Jamie: I'm just beginning to learn
UML notation. So the home
security function is represented by
the big box with the ovals inside
it? And the

CS550 Intro. to SE
Spring 2007 23
ovals represent use-cases that we've adapted things a bit. I don't think it
written in text? creates a problem.
 Facilitator: Yep. And the stick
 Vinod: Okay, so we have use-case
figures represent actors--the people narratives for each of the ovals. Do
or things that interact with the we need to develop the more
system detailed template-based narratives
I've read about?
 as described by the use-case ... oh, I
use the labeled square to represent
 Facilitator: Probably, but that can
an actor that's not a person, in this wait until we've considered other
case, sensors. SafeHome functions.
 Doug: Is that legal in UML?
 Marketing person: Wait, I've been
looking at this diagram, and all of a
 Facilitator: Legality isn't the issue.
sudden I realize we missed
The point is to communicate
something.
information. I view the use of a
human-like stick figure for
 Facilitator: Oh really. Tell me what
representing a device to be we've missed. (The meeting
misleading. So I've continues.)

CS550 Intro. to SE
Spring 2007 24
Preliminary Behavioral Modeling (pg199)
 The scene:  The conversation:
 A meeting room, continuing the  Facilitator: We've just about
requirements meeting.
finished talking about SafeHome
 The players: home security functionality. But
 Jamie Lazar, software team member; before we do, I want to discuss the
 Vinod Raman, software team member;
behavior of the function.
 Ed Robbins, software team member;
 Doug Miller, software engineering
 Marketing person: I don't
manager; understand what you mean by
 three members of marketing; behavior.
 a product engineering representative;  Ed (laughing): That's when you
 a facilitator. give the product a "timeout" if it
misbehaves.
 Facilitator: Not exactly. Let me
explain.
 (The facilitator explains the

CS550 Intro. to SE
Spring 2007 25
basics of behavioral modeling to  Facilitator: See, you can do it.
the requirements gathering team.)  Jamie: It'll also be polling the PC to
 Marketing person: This seems a determine if there is any input
little technical. I'm not sure I can from it, for example Internet-
help here. based access or configuration
 Facilitator: Sure you can. What information.
behavior do you observe from the  Vinod: Yeah, in fact, configuring
user's point of view? the system is a state in its own
 Marketing person: Uh... , well the right.
system will be monitoring the  Doug: You guys are rolling. Let's
sensors. It'll be reading commands give this a bit more thought . . . Is
from the homeowner. It'll be there a way to diagram this stuff?
displaying its status.  Facilitator: There is, but let's
postpone that until after the
meeting.

CS550 Intro. to SE
Spring 2007 26
The Start of a Negotiation (pg202-203)
 The scene:  Lisa (smiling): Yeah, they actually
 Lisa Perez's office, after the first told me they got into it, and it
requirements gathering meeting. wasn't a propeller head activity.
 The players:  Doug (laughing): I'll be sure to
 Doug Miller, software engineering take off my techie beanie the next
manager
time I visit ... Look, Lisa, I think
 Lisa Perez, marketing manager.
we may have a problem with
 The conversation: getting all of the functionality for
 Lisa: So, I hear the first meeting the home security function out by
went really well. the dates your management is
 Doug: Actually, it did. You sent talking about. It's early, I know,
some good people to the but I've already been doing a little
meeting ... they really contributed. back of the envelope planning
and....

CS550 Intro. to SE
Spring 2007 27
 Lisa: We've got to have it by that  Doug: I understand your
date, Doug. What functionality situation, I really do. The problem
are you talking about? is that in order to give you
 Doug: I figure we can get full Internet access, we'll need a fully
home security functionality out by secure Web site up and running.
the drop-dead date, but we'll have That takes time and people. We'll
to delay Internet access till the also have to build a lot of
second release. additional functionality into the
first release . . . I don't think we
 Lisa: Doug, it's the Internet access
can do it with the resources we've
that gives SafeHome "gee whiz"
got.
appeal. We're going to build our
entire marketing campaign  Lisa (frowning): I see, but you've
around it. We've gotta have it! got to figure out a way to get it
done. It's pivotal to home security
functions and to other functions as
well ... the other

CS550 Intro. to SE
Spring 2007 28
 functions can wait until the next
releases . . . I'll agree to that.
 Lisa and Doug appear to be at an
impasse, and yet they must
negotiate a solution to this
problem. Can they both "win"
here? Playing the role of a
mediator, what would you
suggest?

CS550 Intro. to SE
Spring 2007 29
Developing Another Preliminary User Scenario
(pg219)
 The scene:
The scene:  SafeHome surveillance function.
SafeHome surveillance function.
 A meeting room, during the second Let's develop a user scenario for
requirements gathering meeting. access to the home security
 The players: function.
 Jamie Lazar, software team member;  Jamie: Who plays the role of the
 Ed Robbins, software team member;
actor on this?
 Doug Miller, software engineering
manager;  Facilitator: I think Meredith (a
 three members of marketing; marketing person) has been
 a product engineering representative; working on that functionality.
 a facilitator. Why don't you play the role.
 The conversation:  Meredith: You want to do it the
 Facilitator: It's time that we begin same way we did it last time,
talking about the right?
 Facilitator: Right ... same way.
 Meredith: Well, obviously the
reason for surveillance is to
CS550 Intro. to SE
Spring 2007 30
allow the homeowner to check out homeowner do this--and the
the house while he or she is away, second part is the actual
to record and play back video that surveillance function itself. Since
is captured ... that sort of thing. the layout is part of the
 Ed: Will the video be digital, and configuration activity, I'll focus on
will it be stored on disk? the surveillance function.
 Facilitator: Good question, but  Facilitator (smiling): Took the
let's postpone implementation words right out of my mouth.
issues for now. Meredith?  Meredith: Um ... I want to gain
 Meredith: Okay, so basically there access to the surveillance function
are two parts to the surveillance either via the PC or via the
function ... the first configures the Internet. My feeling is that the
system including laying out a Internet access would be more
floor plan--we need tools to help frequently used. Anyway, I want
the to be able to display camera views
on a PC and

CS550 Intro. to SE
Spring 2007 31
control pan and zoom for a  Meredith: Okay, then I want
specific camera. I specify the thumbnail views from all the
camera by selecting it from the cameras. I also want the interface
house floor plan. I want to to the surveillance function to
selectively record camera output have the same look and feel as all
and replay camera output. I also other SafeHome interfaces. I want
want to be able to block access to it to be intuitive, meaning I don't
one or more cameras with a want to have to read a manual to
specific password. And I want the use it.
option of seeing small windows  Facilitator: Good job, now, let's go
that show views from all cameras into this function in a bit more
and then be able to pick the one I detail....
want enlarged.
 Jamie: Those are called thumbnail
views.

CS550 Intro. to SE
Spring 2007 32
Use-Case Template for Surveillance (pg222-223)
 Use-case:  Scenario:
 Access camera surveillance--display 1. The homeowner logs onto the
camera views (ACS-DCV). SafeHome Products Web site.
 Primary actor: 2. The homeowner enters his or her user
ID.
 Homeowner.
3. The homeowner enters two passwords
 Goal in context: (each at least eight characters in
 To view output of camera placed length).
throughout the house from any remote 4. The system displays all major function
location via the Internet. buttons.
 Preconditions: 5. The homeowner selects "surveillance"
from the major function buttons.
 System must be fully configured;
appropriate user ID and passwords 6. The homeowner selects "pick a
must be obtained. camera."
7. The system displays the floor plan of
 Trigger: the house.
 The homeowner decides to take a look
8. The homeowner selects a camera icon
inside the house while away.
from the floor plan.

CS550 Intro. to SE
Spring 2007 33
9. The homeowner selects the "view" 3. Homeowner selects "view thumbnail
button. snapshots for all cameras"--see use-
10. The system displays a viewing case: "view thumbnail snapshots for
window that is identified by the all cameras."
camera ID. 4. A floor plan is not available or has not
11. The system displays video output been configured--display appropriate
within the viewing window at one error message and see use-case:
frame per second. "configure floor plan."
An alarm condition is encountered--
 Exceptions: 5.
see use-case: "alarm condition
1. ID or passwords are incorrect or not encountered."
recognized—see use-case: "validate ID
and passwords."
 Priority:
2. Surveillance function not configured Moderate priority, to be implemented
for this system--system displays after basic functions.
appropriate error message; see use-  When available: Third increment.
case: "configure surveillance function."
 Frequency of use: Infrequent.

CS550 Intro. to SE
Spring 2007 34
 Channel to actor: 1. Is security sufficient? Hacking into this
feature would represent a major
Via PC-based browser and Internet
invasion of privacy.
connection to SafeHome Web site.
2. Will system response via the Internet
 Secondary actors: be acceptable given the bandwidth
System administrator, cameras. required for camera views?
 Channels to secondary actors: 3. Will we develop a capability to provide
video at a higher frames-per-second
1. System administrator: PC-based rate when high bandwidth connections
system are available?
2. Cameras: wireless connectivity
 Open issues:
1. What mechanisms protect
unauthorized use of this capability by
employees of the company?

CS550 Intro. to SE
Spring 2007 35
Data Flow Modeling (pg231-232)
 The scene:  Jamie: I took a software
 Jamie's cubicle, after the last engineering course in college, and
requirements gathering meeting has they taught us this stuff. The prof
concluded.
said it's a bit old fashioned, but
 The players: you know what? It helps me to
 Jamie, Vinod, Ed clarify things.
all members of the SafeHome software
engineering team.
 Ed: That's cool. But I don't see any
 The conversation: classes or objects here.
 (Jamie has sketched out the
 Jamie: No ... this is just a flow
models shown in Figures 8.9 model with a little behavioral stuff
through 8.12 and is showing them thrown in.
to Ed and Vinod.)  Vinod: So these DFDs represent
an I-P-O view of the software,
right?
 Ed: I-P-O?

CS550 Intro. to SE
Spring 2007 36
 Vinod: Input-process-output. The  Jamie: Yeah, but first we've got to
DFDs are actually pretty develop a complete analysis
intuitive ... if you look at 'em for a model, and this isn't it.
moment, they show how data  Vinod: Well, it's a first step, but
objects flow through the system we're going to have to address
and get transformed as they go. class-based elements and also
 Ed: Looks like we could convert behavior aspects, although this
every bubble into an executable state diagram does some of that.
component . . . at least at the  Ed: We've got a lot of work to do
lowest level of the DFD. and not much time to do it.
 Jamie: That's the cool part, you  (Doug--the software engineering
can. In fact there's a way to manager--walks into the cubical.)
translate the DFDs into a design
architecture.
 Ed: Really?

CS550 Intro. to SE
Spring 2007 37
 Doug: So the next few days will
be spent developing the analysis
model, huh?
 Jamie (looking proud): We've
already begun.
 Doug: Good, we've got a lot of
work to do and not much time to
do it.
 (The three software engineers look
at one another and smile.)

CS550 Intro. to SE
Spring 2007 38
Class Models (pg238-239)
 The scene:  Ed: So when the homeowner
 Ed's cubicle, as analysis modeling
begins. wants to pick a camera, he or she
has to pick it from a floor plan.
 The players:
I've defined a FloorPlan class.
 Jamie, Vinod, Ed
all members of the SafeHome software
Here's the diagram.
engineering team.  (They look at Figure 8.14.)
 The conversation:  Jamie: So FloorPlan is a class that
 (Ed has been working to extract is put together with walls that are
classes from the use-case template composed of wall segments, doors
for Access camera surveillance-- and windows, and also cameras;
display camera views" [presented that's what those labeled lines
in an earlier sidebar in this mean, right?
chapter] and is presenting the  Ed: Yeah, they're called
classes he has extracted to his "associations." One class
colleagues.)  is associated with another
according to the associations
CS550 Intro. to SE
Spring 2007 39
I've shown. [Associations are  Jamie: And the same goes for
discussed in Section 8.7.5.] windows and doors. Looks like
 Vinod: So the actual floor plan is camera has a few extra attributes.
made up of walls and contains  Ed: Yeah, I need them to provide
cameras and sensors that are pan and zoom info.
placed within those walls. How  Vinod: I have a question. Why
does the floor plan know where to does the camera have an ID but
put those objects? the others don't?
 Ed: It doesn't, but the other classes  Ed: We'll need to identify each
do. See the attributes under, say, camera for display purposes.
WallSegment, which is used to  Jamie: Makes sense to me, but I
build a wall. The wall segment
do have a few more questions.
has start and stop coordinates and
the draw () operation does the rest.

CS550 Intro. to SE
Spring 2007 40
 (Jamie asks questions which result
in minor modifications.)
 Vinod: Do you have CRC cards
for each of the classes? If so, we
ought to role play through them,
just make sure nothing has been
omitted.
 Ed:" I'm not quite sure how to do
them.
 Vinod: It's not hard, and they
really pay off. I'll show you.

CS550 Intro. to SE
Spring 2007 41
CRC models (pg 245-246)
 The scene:  Ed: What's the status of that?
 Ed's cubicle, as analysis modeling Marketing kept changing its mind.
continues.  Vinod: Here's the first cut use-
 The players: case for the whole function ...
 Vinod, Ed we've refined it a bit, but it should
members of the SafeHome software
give you an overall view.
engineering team.
 The conversation:
 Use-case: SafeHome home
management function.
 (Vinod has decided to show Ed
how to develop CRC cards by
 Narrative: We want to use the
showing him an example.) home management interface on a
PC or an Internet connection to
 Vinod: While you've been control electronic devices that
working on surveillance and have wireless interface controllers.
Jamie has been tied up with The system should allow me to
security, I've been working on the turn specific lights
home management function.

CS550 Intro. to SE
Spring 2007 42
on and off, to control appliances One is home, another is away, a
that are connected to a wireless third is overnight travel, and a
interface, to set my heating and air fourth is extended travel. All of
conditioning system to these situations will have settings
temperatures that I define. To do that will be applied to all devices.
this, I want to select the devices In the overnight travel and extended
from a floor plan of the house. travel states, the system should
Each device must be identified on turn lights on and off at random
the floor plan. As an optional intervals (to make it look like
feature, I want to control all someone is home) and control the
audio‑visual devices--audio, heating and air conditioning
television, DVD, digital recorders, system. I should be able to
and so forth. With a single override these settings via the
selection, I want to be able to set Internet with appropriate
the entire house for various password protection.
situations.

CS550 Intro. to SE
Spring 2007 43
 Ed: The hardware guys have got  Vinod: I thought you didn't
all the wireless interfacing figured understand CRC.
out?  Ed: Maybe a little, but go ahead.
 Vinod (smiling): They're working  Vinod: So here's my class
on it, say it's no biggy. Anyway, I definition for
extracted a bunch of classes for HomeManagementlnterface.
home management, and we can  Attributes:
use one as an example. Let's use
the HomeManagementlnterface
 optionsPanel--provides info on
class. buttons that enable user to select
functionality
 Ed: Okay . . . so the
responsibilities are ... the
 situationPanel--provides info on
attributes and operations for the buttons that enable user to select
class, and the collaborations are situation
the classes that the responsibilities  FloorPlan--same as surveillance
point to. object but this one displays
devices
CS550 Intro. to SE
Spring 2007 44
 devicelcons--info on icons  Responsibility Collaborator
representing lights, appliances,  displayControl OptionsPanel
HVAC, etc. (class)
 devicePanels--simulation of  selectControl OptionsPanel
appliance or device control panel; (class)
allows control  displaySituation
SituationPanel (class)
 Operations:
 selectSituation
 displayControl(), selectControl(), SituationPanel (class)
displaySituation(), selectSituation(),
accessFloorplan(), selectDevicelcon(),
 accessFloorplan FloorPlan
displayDevicePanel(), (class) ...
accessDevicePanel(), . . .  •
 Class:  •
 HomeManagementInterface
 •

CS550 Intro. to SE
Spring 2007 45
 Ed: So when the operation  Ed: Good way to find omissions
accessFloorplan() is invoked, it or errors.
collaborates with the FloorPlan  Vinod: Yep.
object just like the one we
developed for surveillance. Wait, I
have a description of it here.
(They look at Figure 8.14.)
 Vinod: Exactly. And if we wanted
to review the entire class model,
we could start with this index
card, then go to the collaborator's
index card, and from there to one
of the collaborator's collaborators,
and so on.

CS550 Intro. to SE
Spring 2007 46
Design Concepts (pg270-271)
 The scene:  Vinod: Did you get anything out
 Vinod's cubicle, as design modeling of the seminar?
begins.  Ed: Knew most of the stuff, but it's
 The players: not a bad idea to hear it again, I
 Vinod, Jamie, Ed suppose.
members of the SafeHome software
engineering team . Also, Shakira, a
 Jamie: When I was an undergrad
new member of the team. CS major, I never really
 The conversation: understood why information
 (All four team members have just hiding was as important as they
returned from a morning seminar, say it is.
entitled "Applying Basic Design  Vinod: Because ... bottom line ...
Concepts," offered by a local it's a technique for reducing error
computer science professor.) propagation in a program.
Actually, functional independence
also accomplishes the same thing.

CS550 Intro. to SE
Spring 2007 47
 Shakira: I wasn't a CS grad, so a whenever I can that sort of thing.
lot of the stuff the instructor  Ed: Modularity, functional
mentioned is new to me. I can independence, hiding, patterns ...
generate good code and fast. I see.
don't see why this stuff is so  Jamie: I still remember the very
important.
first programming course I took ...
 Jamie: I've seen your work, Shak, they taught us to refine the code
and you know what, you do a lot iteratively.
of this stuff naturally ... that's why  Vinod: Same thing can be applied
your designs and code work.
to design, you know.
 Shakira (smiling): Well, I always  Ed: The only concept I hadn't
do try to partition the code, keep
heard of before was "refactoring."
it focused on one thing, keep
interfaces simple and constrained,
 Shakira: That's used in Extreme
reuse code Programming, I think she said.

CS550 Intro. to SE
Spring 2007 48
 Ed: Yep. It's not a whole lot
different than refinement, only
you do it after the design or code
is completed. Kind of an
optimization pass through the
software, if you ask me.
 Jamie: Let's get back to SafeHome
design. I think we should put
these concepts on our review
checklist as we develop the design
model for SafeHome.
 Vinod: I agree. But as important,
let's all commit to think about
them as we develop the design.

CS550 Intro. to SE
Spring 2007 49
Refining an Analysis Class into a Design Class (pg273)
 The scene: as part of the surveillance and
 Ed's cubicle, as design modeling home management functions.
continues.  Vinod (nodding): Yeah, I seem to
 The players: recall that we used it as part of
 Vinod, Ed our CRC discussions for home
members of the SafeHome software
management.
engineering team.
 The conversation:
 Ed: We did. Anyway, I'm refining
it for design. Want to show how
 (Ed is working on the FloorPlan we'll actually implement the
class [see sidebar discussion in FloorPlan class. My idea is to
Section 8.7.4 and Figure 8.14] and implement it as a set of linked lists
has refined it for the design [a specific data structure]. So ... I
model.) had to refine the analysis class
 Ed: So you remember the FloorPlan (Figure 8.14) and,
FloorPlan class, right? It's used actually, sort of simplify it.

CS550 Intro. to SE
Spring 2007 50
 Vinod: The analysis class showed collaborates with FloorPlan, and
only things in the problem obviously, there can be many
domain, well, actually on the cameras in the floor plan.
computer screen, that were visible  Vinod: Phew, let's see a picture of
to the end-user, right? this new FloorPlan design class.
 Ed: Yep, but for the FloorPlan  (Ed shows Vinod the drawing
design class, I've got to add some shown in Figure 9.3.)
things that are implementation  Vinod: Okay, I see what you're
specific. I needed to show that
trying to do. This allows you to
FloorPlan is an aggregation of
modify the floor plan easily
segments--hence the Segment
because new items can be added
class--and that the Segment class
or deleted to the list--the
is composed of lists for wall
aggregation--without any
segments, windows, doors, and so
problems.
on. The class Camera
 Ed (nodding): Yeah, I think it'll
work. Vinod: So do I.
CS550 Intro. to SE
Spring 2007 51
Choosing an Architectural Style (pg295-296)
 The scene:  Jamie: But . . . ?
 Jamie's cubicle, as design modeling  Ed: But . . . I have trouble
continues.
visualizing what an object-
 The players: oriented architecture is. I get the
 Jamie, Ed call and return architecture, sort of
members of the SafeHome software
a conventional process hierarchy,
engineering team.
but 00 .. I don't know. It seems
 The conversation: sort of amorphous.
 Ed (frowning): We've been  Jamie (smiling): Amorphous,
modeling the security function huh?
using UML. . . you know classes,
relationships,
 Ed: Yeah . . . what I mean is I can't
visualize a real structure, just
 that sort of stuff. So I guess the design classes floating in space.
object-oriented architecture' is the
right way to go.
 Jamie: Well, that's not true. There
are class hierarchies . . .

CS550 Intro. to SE
Spring 2007 52
think of the hierarchy  Jamie: Doug'Il have no problem
(aggregation) we did for the with that. He said that we should
FloorPlan object [Figure 9.3]. An consider architectural alternatives.
00 architecture is a combination of By the way, there's absolutely no
that structure and the reason why both of these
interconnections—you know, architectures couldn't be used in
collaborations--between the combination with one another.
classes. We can show it by fully  Ed: Good. I'm on it.
describing the attributes and
operations, the messaging that
goes on, and the structure of the
classes.
 Ed: I'm going to spend an hour
mapping out a call and return
architecture, then I'll go back and
consider an 00 architecture.

CS550 Intro. to SE
Spring 2007 53
Architecture Assessment (pg305-306)
 The scene: product, and that's a good thing. I
 Doug Miller's office as architectural guess my question is, how are we
design modeling proceeds. going to choose the one that's
 The players: best?
 Vinod, Jamie, Shakira, Ed  Ed: I'm working on a call and
members of the SafeHome software
return style, and then either Jamie
engineering team.
 Doug Miller
or I are going to derive an 00
manager of the software engineering architecture.
group.  Doug: Okay, and how do we
 The conversation: choose?
 Doug: I know you guys are  Shakira: I took a course in design
deriving a couple of different in my senior year, and I remember
architectures for the SafeHome that there are a number of ways to
do it.
 Vinod: There are, but they're a bit
academic. Look, I think we
CS550 Intro. to SE
Spring 2007 54
can do our assessment and choose  Vinod: True, but it also tells us
the right one using use-cases and whether the architectural design is
scenarios. convoluted, whether the system
 Doug: Isn't that the same thing? has to twist itself into a pretzel to
get the job done.
 Vinod: Not when you're talking
about architectural assessment.  Jamie: Scenarios aren't just
We already have a complete set of another name for use-cases?
use-cases. So we apply each to  Vinod: No, in this case a scenario
both architectures and see how implies something different.
the system reacts--how  Doug: You're talking about a
components and connectors work quality scenario or a change
in the use-case context. scenario, right?
 Ed: That's a good idea. Makes sure  Vinod: Yes. What we do is go
we didn't leave anything out. back to the stakeholders and

CS550 Intro. to SE
Spring 2007 55
ask them how SafeHome is likely to
change over the next, say, three
years. You know, new versions,
features, that sort of thing. We
build a set of change scenarios.
We also develop a set of quality
scenarios that define the attributes
we'd like to see in the software
architecture.
 Jamie: And we apply them to the
alternatives.
 Vinod: Exactly. The style that
handles the use-cases and
scenarios best is the one we
choose.

CS550 Intro. to SE
Spring 2007 56
Refining a First-Cut Architecture (pg315)
 The scene:  (Ed shows Jamie Figure 10.17,
 Jamie's cubicle, as design modeling which she studies for a few
continues. moments.)
 The players:  Jamie: That's cool, but I think we
 Jamie, Ed can do a few things to make it
members of the SafeHome software
simpler ... and better.
engineering team.
 The conversation:
 Ed: Such as?
 (Ed has just completed a first-cut
 Jamie: Well, why did you use the
design of the monitor sensors sensor input controller component?
subsystem. He stops in to ask  Ed: Because you need a controller
Jamie her opinion.) for the mapping.
 Ed: So here's the architecture that I  Jamie: Not really. The controller
derived. doesn't do much, since we're
managing a single flow path for

CS550 Intro. to SE
Spring 2007 57
incoming data. We can eliminate  Jamie: Yep. And while we're
the controller with no ill effects. making refinements, it would be a
 Ed: I can live with that, I'll make good idea to implode the
the change and ... components format display and
generate display. Display
 Jamie (smiling): Hold up! We can
formatting for the control panel is
also implode the components
simple. We can define a new
establish alarm conditions and select
module called produce display
phone number. The transform
controller you show isn't really  Ed (sketching): So this is what
necessary, and the small decrease you think we should do?
in cohesion is tolerable.  (He shows Jamie Figure 10.18.)
 Ed: Simplification, huh?  Jamie: It's a start.

CS550 Intro. to SE
Spring 2007 58
The OCP in Action (pg332)
 The scene: guys have come up with.
 Vinod's cubicle.  Shakira: Amaze me.
 The players:  Vinod (laughing): They call it a
 Vinod, Shakira doggie angst sensor.
members of the SafeHome software
engineering team.
 Shakira: Say what?
 The conversation:  Vinod: It's for people who leave
 Vinod: I just got a call from Doug their pets home in apartments or
[the team manager]. He says condos or houses that are close to
marketing wants to add a new one another. The dog starts to bark.
sensor. The neighbor gets angry and
complains. With this sensor, if the
 Shakira (smirking): Not again, dog barks for more than, say, a
jeez! minute, the sensor sets a special
 Vinod: Yeah ... and you're not alarm mode that calls the owner on
going to believe what these his or her cell phone.
 Shakira: You're kidding me, right?
CS550 Intro. to SE
Spring 2007 59
 Vinod: Nope. Doug wants to know deal.
how much time it's going to take to  Shakira: Knowing Doug, he'll keep
add it to the security function. us focused and not deliver the
 Shakira (thinking a moment): Not doggie thing until the next release.
much ... look. [She shows Vinod  Vinod: That's not a bad thing, but
Figure 11.4] We've isolated the actual can you implement now if he wants
sensor classes behind the sensor you to?
interface. As long as we have specs  Shakira: Yeah, the way we designed
for the doggie sensor, adding it
the interface lets me do it with no
should be a piece of cake. Only thing
hassle.
I'll have to do is create an
 Vinod (thinking a moment): Have
 appropriate component ... uh, class,
you ever heard of the "Open-Closed
for it. No change to the Detector
Principle"?
component at all.
 Shakira (shrugging): Never heard of
 Vinod: So I'll tell Doug it's no big
it. Vinod (smiling): Not a problem.

CS550 Intro. to SE
Spring 2007 60
Cohesion in Action (pg336-337)
 The scene:  Ed: We originally defined five
 Jamie's cubicle. operations for camera. Look ...
 The players: [shows Jamie the list]
 Jamie, Ed  determineType() tells me the type of
members of the SafeHome software camera.
engineering team who are working on  translateLocation() allows me to move
the surveillance function. the camera around the floor plan.
 displayID() gets the camera ID and
 The conversation: displays it near the camera icon.
 Ed: I have a first-cut design of the  displayView() shows me the field of
camera component. view of the camera graphically.
displayZoom() shows me the
Jamie: Wanna do a quick review?


magnification of the camera
 Ed: I guess ... but really, I'd like graphically.
your input on something.  Ed: I've designed each separately,
 (Jamie gestures for him to and they're pretty simple
continue.) operations. So I thought

CS550 Intro. to SE
Spring 2007 61
it might be a good idea to combine  Ed (mildly exasperated): So what?
all of the display operations into The whole thing will be less than
just one that's called 100 source lines, max. It'll be
displayCamera()--it'll show the easier to implement, I think.
ID, the view, and the zoom.  Jamie: And what if marketing
Whaddaya think? decides to change the way that we
 Jamie (grimacing): Not sure that's represent the view field?
such a good idea.  Ed: I'll just jump into the
 Ed (frowning): Why? All of these displayCamera() op and make the
little ops can cause headaches. mod.
 Jamie: The problem with  Jamie: What about side effects?
combining them is we lose  Ed: Whaddaya mean?
cohesion. You know, the  Jamie: Well, say you make the
displayCamera() op won't be single-
change but inadvertently create a
minded.
problem with the ID display.

CS550 Intro. to SE
Spring 2007 62
 Ed: I wouldn't be that sloppy.  Jamie: Good decision.
 Jamie: Maybe not, but what if
some support person two years
from now has to make the mod.
He might not understand the op
as well as you do and, who
knows, he might be sloppy.
 Ed: So you're against it?
 Jamie: You're the designer . . . it's
your decision . . . just be sure you
understand the consequences of
low cohesion.
 Ed (thinking a moment): Maybe
we'll go with separate display ops.

CS550 Intro. to SE
Spring 2007 63
Coupling in Action (pg338-339)
 The scene:  Shakira: Well, each of the sensors
 Shakira's cubicle. recognizes an alarm condition of
 The players: some kind, right?
 Vinod, Shakira  Vinod (smiling): That's why we call
members of the SafeHome software them sensors, Shakira.
engineering team who are working on
the security function.
 Shakira (exasperated): Sarcasm,
 The conversation: Vinod. You've got to work on your
interpersonal skills.
 Shakira: I had what I thought was
a great idea ... then I thought
 Vinod: You were saying?
about it a little, and it seemed like  Shakira: Okay, anyway, I figured ...
a not-so­great idea. I finally why not create an operation within
rejected it, but I just thought I'd each sensor object called makeCall()
run it by you. that would collaborate directly with
 Vinod: Sure, what's the idea? the OutgoingCall component, well,
with an interface to the
OutgoingCall component.
CS550 Intro. to SE
Spring 2007 64
 Vinod (pensive): You mean rather outgoing call. Besides, different
than having that collaboration occur sensors might result in different
out of a component like phone numbers. You don't want
ControlPanel or something? the sensor to store that
 Shakira: Yeah ... but then I said to information because if it changes.
myself, that means that every  Shakira: It just didn't feel right.
sensor object will be connected to  Vinod: Design heuristics for
the OutgoingCall component, and coupling tell us it's not right.
that means that it's indirectly  Shakira: Whatever….
coupled to the outside world
and . . . well, I just thought it made
things complicated.
 Vinod: I agree. In this case, it's a
better idea to let the sensor interface
pass info to the ControlPanel and
let it initiate the

CS550 Intro. to SE
Spring 2007 65
Violating a UI "Golden Rule“ (pg359-360)
 The scene:  Jamie: Well, what if we eliminate
 Vinod's cubicle, as user interface design the floor plan entirely? It's flashy,
begins. but it's going to take serious
 The players: development effort. Instead we
 Vinod, Jamie just ask the user to specify the
members of the SafeHome software camera he wants to see and then
engineering team.
display the video in a video
 The conversation: window.
 Jamie: I've been thinking about the  Vinod: How does the homeowner
surveillance function interface. remember how many cameras are
 Vinod (smiling): Thinking is good. set up and where they are?
 Jamie: I think maybe we can  Jamie (mildly irritated): He's the
simplify matters some. homeowner, he should know.
 Vinod: Meaning?  Vinod: But what if he doesn't?
 Jamie: He should.

CS550 Intro. to SE
Spring 2007 66
 Vinod: That's not the point ...  Vinod: Uh huh.
what if he forgets?  Jamie: Which one will marketing
 Jamie: Uh, we could provide a list like, do you think?
of operational cameras and their  Vinod: You're kidding, right?
locations.  Jamie: No.
 Vinod: That's possible, but why  Vinod: Duh ... the one with the
should he have to ask for a list?
flash ... they love sexy product
 Jamie: Okay, we provide the list features ... they're not interested in
whether he asks or not. which is easier to build.
 Vinod: Better. At least he doesn't  Jamie (sighing): Okay, maybe I'll
have to remember stuff that we prototype both.
can give him.  Vinod: Good idea ... then we let
 Jamie (thinking for a moment): the customer decide.
But you like the floor plan, don't
you?

CS550 Intro. to SE
Spring 2007 67
Use-Cases for UI Design (pg368)
 The scene:  Vinod: There's also the system
 Vinod's cubicle, as user interface design administrator role. Even if it's the
continues. homeowner playing the role, it's a
 The players: different point of view. The
 Vinod, Jamie "administrator" sets the system
members of the SafeHome software up, configures stuff, lays out the
engineering team.
floor plan, places the cameras ...
 The conversation:  Jamie: All I had marketing do was
 Jamie: I pinned down our play the role of a homeowner who
marketing contact and had her wants to see video.
write a use-case for the surveillance  Vinod: That's okay. It's one of the
interface. major behaviors of the
 Vinod: From who's point of view? surveillance function interface.
 Jamie: The home owner's, who else But we're going to have to
is there?

CS550 Intro. to SE
Spring 2007 68
examine the system  (Jamie shows the informal use-
administration behavior as well. case to Vinod.)
 Jamie (irritated): You're right.  Informal use-case: I want to be
 (Jamie leaves to find the able to set or edit the system
marketing person. She returns a layout at any time. When I set up
few hours later.) the system, I select an
administration function. It asks
 Jamie: I was lucky. I found our
me whether I want to do a new
marketing contact and we worked
set-up, or whether I want to edit
through the administrator use-
an existing set-up. If I select a new
case together. Basically, we're
set-up, the system displays a
going to define "administration"
drawing screen that will enable
as one function that's applicable to
me to draw the floor plan onto a
all other SafeHome functions.
grid. There will be icons for walls,
Here's what we came up with.
windows, and doors so that
drawing is easy. I just

CS550 Intro. to SE
Spring 2007 69
stretch the icons to their edit the setting for cameras and
appropriate lengths. The system sensors. In every case, I expect the
will display the lengths in feet or system to do consistency checking
meters (I can select the and to help me avoid mistakes.
measurement system). I can select  Vinod (after reading the
from a library of sensors and scenario): Okay, there are
cameras and place them on the probably some useful design
floor plan. I get to label each, or patterns or reusable components
the system will do automatic for GUIs for drawing programs.
labeling. I can establish settings I'll betcha 50 bucks we can
for sensors and cameras from implement some or most of the
appropriate menus. If I select edit, administrator interface using
I can move sensors or cameras, them.
add new ones or delete existing  Jamie: Agreed. I'll check it out.
ones, edit the floor plan, and

CS550 Intro. to SE
Spring 2007 70
Preparing for Testing (pg392)
 The scene: talking about testing.
 Doug Miller's office, as component-  Vinod: True, but we've all been
level design continues and
construction of certain components
just a little busy. And besides, we
begins. have been thinking about it ... in
 The players: fact, more than thinking.
 Doug Miller  Doug (smiling): I know ... we're
software engineering manager; all overloaded, but we've still got
 Vinod, Jamie, Ed, Shakira to think down the line.
members of the SafeHome software  Shakira: I like the idea of
engineering team.
designing unit tests before I begin
 The conversation: coding any of my components, so
 Doug: It seems to me that we that's what I've been trying to do.
haven't spent enough time I have a pretty big file of tests to
run once code for my components
is complete.

CS550 Intro. to SE
Spring 2007 71
 Doug: That's an Extreme component to me, I'll integrate it
Programming [an agile software and run a series of regression tests
development process, see Chapter 4] on the partially integrated program.
concept, no? I've been working to design a set of
appropriate tests for each function
 Ed: It is. Even though we're not
in the system.
using Extreme Programming per se,
we decided that it would be a good
 Doug (to Vinod): How often will
idea to design unit tests before we you run the tests?
build the component—the design  Vinod: Every day ... until the system
gives us all of the information we is integrated ... well, I mean until the
need. software increment we plan to
 Jamie: I've been doing the same deliver is integrated.
thing.  Doug: You guys are way ahead of
 Vinod: And I've taken on the role of me!
the integrator, so every time one of  Vinod (laughing): Anticipation is
the guys passes a everything in the software biz, Boss.

CS550 Intro. to SE
Spring 2007 72
Preparing for Validation (pg407-408)
 The scene:  Vinod: That's about right.
 Doug Miller's office, as component- Integration is going well. We're
level design continues and
construction of certain components smoke testing daily, finding some
begins. bugs but nothing we can't handle.
 The players: So far, so good.
 Doug Miller  Doug: Talk to me about
software engineering manager, validation.
 Vinod, Jamie, Ed, Shakira  Shakira: Well, we'll use all of the
members of the SafeHome software
engineering team.
use-cases as the basis for our test
design. I haven't started yet, but
 The conversation:
I'll be developing tests for all of
 Doug: The first increment will be the use-cases that I've been
ready for validation in what ... responsible for.
about three weeks?  Ed: Same here.
 Jamie: Me too, but we've got to
get our act together for
CS550 Intro. to SE
Spring 2007 73
acceptance testing and also for alpha  Doug: I know, I know. But if an
and beta testing, no?
ITG works from requirements and
 Doug: Yes, In fact I've been thinking use-cases, not too much baby
that we could bring in an outside
sitting will be required.
contractor to help us with validation.
I have the money in the budget ...
 Vinod: I still think we've got it
and it would give us a new point of under control.
view.  Doug: I hear you, Vinod, but I'm
 Vinod: I think we've got it under going to overrule on this one. Let's
control. plan to meet with the ITG rep
 Doug: I'm sure you do, but an ITG later this week. Get 'em started
gives us an independent look at the and see what they come up with.
software.  Vinod: Okay, maybe it'll lighten
 Jamie: We're tight on time here, the load a bit.
Doug. I, for one, don't have the time
to baby-sit anybody you bring in to
do the job.
CS550 Intro. to SE
Spring 2007 74
Debugging (pg413)
 The scene: working on this <bleep> bug since
 Ed's cubical as coding and unit testing I discovered it at 9:30 this
is conducted. morning, and it's what, 2:45? I'm
 The players: clueless.
 Ed, Shakira  Shakira: I thought we all agreed
members of the SafeHome software
to spend no more than one hour
engineering team.
debugging stuff on our own, then
 The conversation: we'd get help, right?
 Shakira (looking in through the  Ed: Yeah, but ...
entrance to the cubical): Hey ...
where were you at lunch time?
 Shakira (walking into the
cubical): So what's the problem?
 Ed: Right here ... working.
 Ed: It's complicated. And besides,
 Shakira: You look miserable ... I've been looking at this for, what,
what's the matter? 5 hours? You're not going to find
 Ed (sighing audibly): I've been it.

CS550 Intro. to SE
Spring 2007 75
 Shakira: Indulge me ... what's the
problem?
 (Ed explains the problem to Shakira
who looks at it for about 30 seconds
without speaking.)
 Shakira (a smile gathering on her
face): Uh, right there, the variable
named setAlarmCondition. Shouldn't
it be set to "false" before the loop
gets started?
 (Ed stares at the screen in disbelief,
bends forward, and begins to bang
his head gently against the monitor.
Shakira, smiling broadly now,
stands and walks out.)

CS550 Intro. to SE
Spring 2007 76
Designing Unique Tests (pg423)
 The scene:
 Vinod: So let's see ... you note that
 Vinod's cubical.
the correct password will be 8080,
right?
 The players:
 Vinod, Ed
 Ed: Uh huh.
members of the SafeHome software  Vinod: And you specify passwords
engineering team. 1234 and 6789 to test for errors in
 The conversation: recognizing invalid passwords?
 Vinod: So these are the test cases  Ed: Right, and I also test passwords
you intend to run for the password that are close to the correct
Validation operation. password, see ... 8081 and 8180.
 Ed: Yeah, they should cover pretty  Vinod: Those are okay, but I don't
much all possibilities for the kinds see much point in running both the
of passwords a user might enter. 1234 and 6789 inputs. They're
redundant . . . test the same thing,
don't they?

CS550 Intro. to SE
Spring 2007 77
 Ed: Well, they're different values.  Ed: Not a problem ... I'll give this
 Vinod: That's true, but if 1234 a bit more thought.
doesn't uncover an error ... in
other words ... the password
Validation operation notes that it's
an invalid password, it is not
likely that 6789 will show us
anything new.
 Ed: I see what you mean.
 Vinod: I'm not trying to be picky
here ... it's just that we have
limited time to do testing, so it's a
good idea to run tests that have a
high likelihood of finding new
errors.

CS550 Intro. to SE
Spring 2007 78
Using Cyclomatic Complexity (pg428)
 The scene: maybe we should forget white-
 Shakira's cubicle. box testing, integrate everything,
 The players: and start running black-box tests.
 Vinod,Shakira  Vinod: You figure we don't have
members of the SafeHome software enough time to do component
engineering team who are working on
tests, exercise the operations, and
test planning for the security function.
then integrate?
 The conversation:
 Shakira: The deadline for the first
 Shakira: Look ... I know that we increment is getting closer than I'd
should unit test al! the like ... yeah, I'm concerned.
components for the security
function, but there are a lot of 'em
 Vinod: Why don't you at least run
and if you consider the number of white-box tests on the operations
operations that have to be that are likely to be the most error
exercised, I don't know ... prone?

CS550 Intro. to SE
Spring 2007 79
 Shakira (exasperated): And  Vinod: It's really easy. Here's a
exactly how do I know which are book that describes how to do it.
likely to be the most error prone?  Shakira (leafing through the
 Vinod: V of G. pages): Okay, it doesn't look hard.
 Shakira: Huh? I'll give it a try. The ops with the
highest V(G) will be the candidates
 Vinod: Cyclomatic complexity--V
for white-box tests.
of G. Just compute V(G) for each
of the operations within each of  Vinod: Just remember that there
the components and see which are no guarantees. A component
have the highest values for V(G). with a low V(G) can still be error
They're the ones that are most prone.
likely to be error prone.  Shakira: Alright. But at least this'll
 Shakira: And how do I compute V help me to narrow down the
of G? number of components that have
to undergo white-box testing.

CS550 Intro. to SE
Spring 2007 80
Class Testing (pg447-448)
 The scene:  Jamie (laughing): Sure, it's the one
 Shakira's cubicle. that allowed you to add the "doggie
 The players: angst" sensor.
 Jamie, Shakira  Shakira: The one and only.
members of the SafeHome software Anyway, it has an interface with
engineering team who are working on
four ops: read(), enable(), disable(),
test case design for the security function.
and test°, Before a sensor can be
 The conversation: read, it must be enabled. Once it's
 Shakira: I've developed some tests enabled, it can be read and tested.
for the Detector class [Figure 11.4]-- It can be disabled at any time,
you know, the one that allows except if an alarm condition is
access to all of the Sensor objects being processed. So I defined a
for the security function. You simple test sequence that will
familiar with it? exercise its behavioral life history.

CS550 Intro. to SE
Spring 2007 81
 (Shows Jamie the following history, sort of a conventional
sequence.) usage. #2 repeats the read operation
1. enable-test-read-disable n times, and that's a likely scenario.
 Jamie: That'll work, but you've got #3 tries to read the sensor before it's
to do more testing than that! been enabled ... that should
 Shakira: I know, I know. Here are produce an error message of some
some other sequences I've come up kind, right? #4 enables and disables
with. the sensor and then tries to read it.
Isn't that the same as test #3?
 (She shows Jamie the following
sequences.)
 Shakira: Actually no. In #4, the
2. enable-test-[read]*-test-disable
sensor has been enabled. What #4
3. [read]* really tests is whether the disable
4. enable-disable-[test | read] op works as it should. A read() or
 Jamie: So let me see if I understand test() after disable()
the intent of these. #1 goes through
a normal life
CS550 Intro. to SE
Spring 2007 82
should generate the error message.
If it doesn't, then we have an error
in the disable op.
 Jamie: Cool. Just remember that the
four tests have to be applied for
every sensor type since all the ops
may be subtly different depending
on the type of sensor.
 Shakira: Not to worry. That's the
plan.

CS550 Intro. to SE
Spring 2007 83
Debating Product Metrics (pg471-472)
 The scene: them was up to us.
 Vinod's cubicle.  Jamie: That's good, 'cause there's
 The players: no way I have time to start
 Vinod, Jamie, Ed measuring stuff. We're fighting to
members of the SafeHome software maintain the schedule as it is.
engineering team, who are continuing
work on component-level design and
 Ed: I agree with Jamie. We're up
test case design. against it, here ... no time.
 The conversation:  Vinod: Yeah, I know, but there's
 Vinod: Doug [Doug Miller, probably some merit to using them.
software engineering manager] told  Jamie: I'm not arguing that, Vinod.
me that we should all use product It's a time thing ... and I for one
metrics, but he was kind of vague. don't have any to spare.
He also said that he wouldn't push  Vinod: But what if measuring saves
the matter ... using you time?

CS550 Intro. to SE
Spring 2007 84
 Ed: Wrong, it takes time and like won't?
Jamie said ...  Jamie: So what are you proposing?
 Vinod: No, wait ... what if it saves  Vinod: I think we should select a
us time? few design metrics, probably class-
 Jamie: How? oriented, and use them as part of
 Vinod: Rework ... that's how. If a our review process for every
metric we use helps us avoid one component we develop.
major or even moderate problem,  Ed: I'm not real familiar with class-
and that saves us from having to oriented metrics.
rework a part of the system, we  Vinod: I'll spend some time
save time. No? checking them out and make a
 Ed: It's possible, I suppose, but can recommendation ... okay with you
you guarantee that some product guys?
metric will help us find a problem?  (Ed and Jamie nod without much
 Vinod: Can you guarantee that it enthusiasm.)

CS550 Intro. to SE
Spring 2007 85
Applying CK Metrics (pg483-484)
 The scene:  Shakira: Wasn't too complicated. I
 Vinod's cubicle. went back to my UML class and
 The players: sequence diagrams, like you
 Vinod, Jamie, Shakira, Ed suggested, and got rough counts
members of the SafeHome software for DIT, RFC, and LCOM. I couldn't
engineering team, who are continuing find the CRC model, so I didn't
work on component-level design and
test case design.
count CBO.
 The conversation:
 Jamie (smiling): You couldn't find
the CRC model because I had it.
 Vinod: Did you guys get a chance
to read the description of the CK
 Shakira: That's what I love about
metrics suite I sent you on this team, superb communication.
Wednesday and make those  Vinod: I did my counts . . . did you
measurements? guys develop numbers for the CK
metrics?

CS550 Intro. to SE
Spring 2007 86
should look for classes that have bad
 (Jamie and Ed nod in the affirmative.)
numbers in at least two or more of the
 Jamie: Since I had the CRC cards, I CK metrics. Kind of two strikes and
took a look at CBO, and it looked you're modified.
pretty uniform across most of the  Shakira (looking over Ed's list of
classes. There was one exception, classes with high RFC): Look, see this
which I noted. class? It's got a high LCOM m well as a
 Ed: There are a few classes where RFC high RFC. Two strikes?
is pretty high, compared with the  Vinod: Yeah I think so . . . it'll be
averages . . . maybe we should take a difficult to implement because of
look at simplifying them. complexity and difficult to test for the
 Jamie: Maybe yes, maybe no. I'm still same reason. Probably worth designing
concerned about time, and I don't two separate classes to achieve the
want to fix stuff that isn't really same behavior.
broken.  Jamie: You think modifying it'll save us
 Vinod: I agree with that. Maybe we time?
 Vinod: Over the long haul, yes.
CS550 Intro. to SE
Spring 2007 87
Requirements Gathering for WebApps (pg518-519)
 The scene:  Doug: I know, I know ... we're going
 Doug Miller's office. to outsource the development to a
 The players: company that specializes in
 Doug Miller constructing e-commerce sites. They
manager of the software engineering tell us that they'll get it up and
group; running in under one month ... lots
 Vinod Raman of reusable components.
a member of the SafeHome software
engineering team;
 Vinod: Hmmm. Okay ... then why
 three marketing people. am I here?
 The conversation:  Doug: To expedite things--they want
 Doug: Management has decided us to take a pass at requirements
that we're going to build an e- gathering for the site. I'd like you to
commerce site to sell SafeHome. meet with the various stakeholders
to gather some insight into basic
 Vinod: Whoa, Doug! We have no requirements.
time to do that ... we're swamped
with product software work.
CS550 Intro. to SE
Spring 2007 88
 Vinod (exasperated): Doug ...  Vinod: Right.
you're not hearing me ... we're  (Vinod meets with three marketing
maxed out timewise and this .... people the following day.)
 Doug (interrupting): Just give it  Vinod: You were telling me about
one day of your time, Vinod. Meet the user's objectives and
with the marketing types and get background.
them to spec the basic content,  Marketing person #1: Like I said,
function, you know, the usual drill.
we want the user to be able to
 Vinod (resigned): Okay, I'll give customize the entire SafeHome
'em a call and schedule something system, you know, pick sensors,
for tomorrow, but you're not control panels, features and
making my life any easier. functions, then get a "bill of
 Doug (smiling): That's why you materials" automatically generated,
get the big bucks. get pricing, and then purchase the
system via the Web site.

CS550 Intro. to SE
Spring 2007 89
 Marketing person #2: We assume stuff is pretty straightforward.
that the user is a homeowner--not  Marketing person #1: We've got to
technical--so we need to guide him provide an 800 number for people
or her through the process step by who don't want to do the
step. customization themselves.
 Marketing person #3: I'm not  Marketing person #3: I agree.
technical, but I'm worried about the 
Vinod: Okay, we're going to have to
specialty stuff that we need to do in
talk about exactly how you'd like to
addition to the basic e-commerce
do the product customization as a
stuff.
presales activity, but let's hold on
 Vinod (addressing #3): Meaning? that for a moment. I have a few other
 Marketing person #3: The hard part fundamental questions.
is going to be guiding the user  Vinod (looking at Marketing
through the "customizing process" in person #2): You said that you
a way that is simple and complete. wanted to guide the users through
The actual e-commerce the process. Any special approach?
CS550 Intro. to SE
Spring 2007 90
 Marketing person #2: I'd like to see will paste
a step-by-step process, with fill-in- www.SafeHomeAssured .com in
the-blanks responses to basic magazine ads, targeted direct mail,
requirements questions, pull down context-sensitive ads that appear in
menus, that sort of thing. Each step search engines, and maybe even
is a window, and each window's some TV and radio spots.
data is validated before moving to  Vinod: What I mean is ... they'll
the next step. always enter through the home
 Vinod: Have you checked that out page.
with representative users?  Marketing person #3: That's what
 Marketing person #2: No, but I will. we'd like.
 Vinod: One more thing ... how does  Vinod: Okay, now we've got to get
a user find our site? to work. Let's explore the details of
 Marketing person #1: We're how you want to customize
working on an ad campaign that systems on-line.

CS550 Intro. to SE
Spring 2007 91
Outsourcing Preliminaries (pg529)
 The scene:  Sharon (smiling): We do, but you
 Doug Miller's office. guys seem to have your act
 The players: together. Vinod has already given
 Doug Miller us a draft specification for the site
(manager of the SafeHome software and has also defined most of the
engineering team) important content objects and site
 Sharon Woods functionality.
an employee of e-CommerceSystems, the
outsourcing vendor for the SafeHome e-
 Doug: Good. What else do you
commerce Web site and manager of the need?
Web engineering team that will be doing  Sharon: The e-commerce
the work.
functionality is easy. The thing that
 The conversation: worries me is the front end ... the
 Doug: Good to finally meet with work required to have the user
you, Sharon. We've certainly got customize the product pre-
some work to do over the next purchase.
month or so.

CS550 Intro. to SE
Spring 2007 92
 Doug: Vinod gave you the basic knows it's critical .. said he'd e-mail
procedure, didn't he? it to me tomorrow morning.
 Sharon: He did, but I'd like to  Doug: Okay . . . look, I'd like to stay
validate it with some real users. in the loop on this project. Can we
We'll also need to contact your establish some ground rules for
content developers to get proper oversight on our end. I don't want
descriptions for each sensor, to get in your way, but....
pictures, pricing,  Sharon: Not a problem, we like to
interface/interconnection info, that keep our clients involved.
sort of thing.  Doug: I'll serve as liaison for this
 Doug: Did Vinod have time to do a project. All communication will
rough storyboard of the come through me or someone like
customization process for you? Vinod that I appoint. Since we're on
 Sharon: He's working on it as we a tight schedule, I'd like to establish
speak. Said he had to put out a fire a schedule that has
on the product side. He
CS550 Intro. to SE
Spring 2007 93
 one-day granularity and talk or e- an alternative and e-mail it to you
mail with you everyday about later today.
accomplishments, problems, etc. I  Doug: Sure.
know it's a lot, but that's what I
think is appropriate.
 Sharon: That's okay.
 Doug (picking up a few pages of
paper from his desktop and
handing them to Sharon): I've
written up a rough schedule with
milestone dates ... what do you
think?
 Sharon (after studying the
schedule): Hmmm. I'm not sure
this'll work for us. Let me work up

CS550 Intro. to SE
Spring 2007 94
Refining Use-Cases for WebApps (pg543-544)
 The scene: Analysis modeling is almost
 Doug Miller's office. complete?
 The players:  Sharon (smiling): We're making
 Doug Miller progress. The only set of use-cases
(manager of the SafeHome software left to develop from the user
engineering group)
hierarchy [Figure 18.1] is the
 Sharon Woods
customer service staff category.
manager of the outsourcing vendor's
Web engineering team for the SafeHome  Doug (looking at Sam): And you
e-commerce Web site have those now, Sam?
 Sam Chen  Sam: I do. I've e-mailed them to
manager of the SafeHomeAssured.com
customer support organization. you, Sharon, and cc'd you, Doug.
Here's the hardcopy version. (He
 The conversation:
hands sheets of paper to Doug and
 Doug: Glad to hear things are Sharon.)
progressing well, Sharon.

CS550 Intro. to SE
Spring 2007 95
 Sam: The way we look at it, we But we don't want to build a
want to use the separate order processing system
SafeHomeAssured.com Web site as when most of the pieces are already
a support tool when customers in place on the Web.
phone in an order. Our phone reps  Sharon: Makes sense.
will complete all necessary forms,  (All parties read the use-cases [an
etc. and process the order for the
example follows]):
customer.
 Use-case: describe home layout [note
 Doug: Why not just refer the
that this differs from the use-case of
customer to the Web site?
the same name for new customer
 Sam (smiling): You techies think category]
that everyone is comfortable with  I will ask the customer (via the phone)
the Web. They're not! Plenty of
to describe each room of the house and
people still like the telephone, so
will enter room dimensions and other
we have to give them that option.
characteristics on one big form

CS550 Intro. to SE
Spring 2007 96
designed specifically for customer We're going to need more detail.
support personnel. Once the house data  Sam: What I meant was that we
are entered I can save the data under don't need to walk our reps
the customer's name or phone number. through the process like you do for
 Sharon: Sam, you've been kind of an on-line customer. One big form
terse in your preliminary use-case should do the trick.
descriptions. I think we're going to  Sharon: Let's sketch out what the
need to flesh them out a bit. form should look like. The parties
 Doug (nodding): I agree. work to provide sufficient detail to
 Sam (frowning): How so? allow Sharon's team to make
effective use of the use-case.
 Sharon: Well ... you mention "one
big form designed specifically for
customer support personnel."

CS550 Intro. to SE
Spring 2007 97
Interface Design Review (pg569-570)
of view, and I have a bunch of
 The scene:
notes. I e-mailed 'em to Sharon
 Doug Miller's office.
[manager of the Web engineering
 The players: team for the outsourcing vendor for
Doug Miller
the SafeHome e-commerce Web site

(manager of the SafeHome software


engineering group)
yesterday.
 Vinod Raman  Doug: You and Sharon can get
a member of the SafeHome product together and discuss the small
software engineering team. stuff ... give me a summary of the
 The conversation: important issues.
 Doug: Vinod, have you and the  Vinod: Overall, they've done a
team had a chance to review the good job, nothing ground breaking,
SafeHomeAssured.com e- but it's a typical e-commerce
commerce interface prototype? interface, decent aesthetics,
 Vinod: Yeah ... we all went through reasonable layout. They've hit all
it from a technical point the important functions....

CS550 Intro. to SE
Spring 2007 98
 Doug (smiling ruefully): But? The problem isn't with these
 Vinod: Well, there are a few functions, they're all okay, but the
things.... level of abstraction isn't right.
 Doug: Such as ... ?  Doug: They're all major functions,
aren't they?
 Vinod (showing Doug a sequence
of storyboards for the interface  Vinod: They are, but here's the
prototype): Here's the major thing ... you can purchase a system
functions menu that's displayed on by inputting a list of components.
the home page: no real need to describe the house,
 Learn about SafeHome if you don't want to. I'd suggest
 Describe your home
only four menu options on the
home page:
 Get SafeHome component
recommendations Purchase a  Learn about SafeHome
SafeHome system  Specify the SafeHome system you
 Get technical support need Purchase a SafeHome system

CS550 Intro. to SE
Spring 2007 99
 Get technical support house. I think it's a bit more logical.
When you select specify the  Doug: I agree. Have you talked
SafeHome system you need, you'll with Sharon about this
then have the following options:  Vinod: No, I want to discuss this
 Select SafeHome components with marketing first, and then I'll
 Get SafeHome component give her a call.
recommendations
If you're a knowledgeable user,
you'll select components from a set
of categorized pull-down menus
for sensors, cameras, control
panels, etc. If you need help, you'll
ask for a recommendation and that
will require that you describe your

CS550 Intro. to SE
Spring 2007 100
WebApp Testing (pg611)
 The scene: vendor] tells me they're testing as
 Doug Miller's office. we speak.
 The players:  Doug: I'd like you and the rest of
 Doug Miller the team to do a little informal
(manager of the SafeHome software testing on the e-commerce site.
engineering group)
 Vinod Raman
 Vinod (grimacing): I thought we
a member of the product software were going to hire a third-party
engineering team. testing company to validate the
 The conversation: WebApp. We're still killing
ourselves trying to get the product
 Doug: What do you think of the
software out the door.
SafeHomeAssured.com e-
commerce WebApp V0.0?  Doug: We're going to hire a testing
vendor for performance and
 Vinod: The outsourcing vendor's
security testing, and our
done a good job. Sharon
outsourcing vendor is already
[development manager for the
testing. Just thought another
CS550 Intro. to SE
Spring 2007 101
point of view would be helpful,  Doug: Good. But take the
and besides, we'd like to keep costs navigation paths all the way to
in line, so .. . their conclusion.
 Vinod (sighs): What are you  Vinod (looking through a
looking for? notebook of use-cases): Yeah,
 Doug: I want to be sure that the when you select Specify the
interface and all navigation are SafeHome system you need, that'll
solid. take you to:
 Vinod: I suppose we can start with
 Select SafeHome components
the use-cases for each of the major  Get SafeHome component
recommendations
interface functions:
 Learn about SafeHome We can exercise the semantics of
 Specify the SafeHome system you each path.
need Purchase a SafeHome system  Doug: While you're there, check
 Get technical support out the content that appears at each
navigation node.
CS550 Intro. to SE
Spring 2007 102
 Vinod: Of course . . . and the
functional elements as well. Who's
testing usability?
 Doug: Oh… the testing vendor will
coordinate usability testing. We've
hired a market research firm to line
up 20 typical users for the usability
study, but if you guys uncover any
usability issues ..
 Vinod: I know, pass them along.
 Doug: Thanks, Vinod.

CS550 Intro. to SE
Spring 2007 103
Team Structure (pg638)
 The scene:
 Vinod (nodding and looking at his
 Doug Miller's office prior to the teammates): Yes. But we have a
initiation of the SafeHome software bunch of questions.
project.  Doug: Let's hold on that for a
 The players: moment. I'd like to talk about how
 Doug Miller we're going to structure the team,
(manager of the SafeHome software who's responsible for what. . . .
engineering team)
 Vinod Raman, Jamie Lazar, other
 Jamie: I'm really into the agile
members of the product software philosophy, Doug. I think we
engineering team. should be a self-organizing team.
 The conversation:  Vinod: I agree. Given the tight time
 Doug: Have you guys had a chance line and some of the uncertainty,
to look over the preliminary info on and that fact that we're all really
SafeHome that marketing's competent [laughs], that seems like
prepared? the right way to go.

CS550 Intro. to SE
Spring 2007 104
 Doug: That's okay with me, but  Doug: And, we're going to use
you guys know the drill. UML as our modeling approach.
 Jamie (smiling and talking as if  Vinod: But keep extraneous
she were reciting something): We documentation to an absolute
make tactical decisions, about who minimum.
does what and when, but it's our  Doug: Who is the liaison with me?
responsibility to get product out  Jamie: We decided that Vinod will
the door on time.
be the tech lead—he's got the most
 Vinod: and with quality. experience, so Vinod is your
 Doug: Exactly. But remember there liaison, but feel free to talk to any of
are constraints. Marketing defines us.
the software increments to be  Doug (laughing): Don't worry, I
produced--in consultation with us, will.
of course.
 Jamie: And?

CS550 Intro. to SE
Spring 2007 105
Establishing a Metrics Approach (pg653-654)
 The scene:  Vinod (frowning): We've never
 Doug Miller's office as the SafeHome done that before, and ...
software project is about to begin.  Jamie (interrupting): And based on
 The players: the timeline management has been
 Doug Miller talking about, we'll never have the
(manager of the SafeHome software
time. What good are metrics
engineering team)
 Vinod Raman, Jamie Lazar
anyway?
members of the product software  Doug (raising his hand to stop the
engineering team. onslaught): Slow down and take a
 The conversation: breath, guys. The fact that we've
 Doug: Before we start work on this never done it before is all the more
project, I'd like you guys to define reason to start now, and the metrics
and collect a set of simple metrics. work I'm talking about shouldn't
To start, you'll have to define your take much time at all ... in fact, it
goals. just might save us time.
 Vinod: How?
CS550 Intro. to SE
Spring 2007 106
 Doug: Look, we're going to be  Doug (calmly): Jamie, an engineer's
doing a lot more in-house software work involves collecting data,
engineering as our products get evaluating it, and using the results
more intelligent, become Web to improve the product and the
enabled, all that ... and we need to process. Am I wrong?
understand the process we use to  Jamie: No, but ...
build software ... and improve it so  Doug: What if we hold the number
we can build software better. The
of measures we collect to no more
only way to do that is to measure.
than five or six and focus on
 Jamie: But we're under time quality?
pressure, Doug. I'm not in favor of  Vinod: No one can argue against
more paper pushing ... we need the
high quality ...
time to do our work, not collect
data.
 Jamie: True ... but, I don't know, I
still think this isn't necessary.

CS550 Intro. to SE
Spring 2007 107
 Doug: I'm going to ask you to
humor me on this one. How much
do you guys know about software
metrics?
 Jamie (looking at Vinod): Not
much.
 Doug: Here are some Web refs ...
spend a few hours getting up to
speed.
 Jamie (smiling): I thought you said
this wouldn't take any time.
 Doug: Time you spend learning is
never wasted ... go do it and then
we'll establish some goals, ask a
few questions, and define the
metrics we need to collect.
CS550 Intro. to SE
Spring 2007 108
Establishing a Metrics Approach (pg664)
 The scene:  Doug: It's always a good idea to
 Doug Miller's office two days after initial establish goals when you adopt any
meeting on software metrics. metrics. What are yours?
 The players:  Vinod: Our metrics should focus
 Doug Miller on quality. In fact, our overall goal
(manager of the SafeHome software
is to keep the number of errors we
engineering team)
 Vinod Raman, Jamie Lazar
pass on from one software
members of the product software engineering activity to the next to
engineering team. an absolute minimum.
 The conversation:  Doug: And be very sure you keep
 Doug: You both had a chance to the number of defects released with
learn a little about process and the product to as close to zero as
project metrics? possible.
 Vinod and Jamie: [Both nod]  Vinod (nodding): Of course.
 Jamie: I like DRE as a metric, and

CS550 Intro. to SE
Spring 2007 109
I think we can use it for the entire amount of effort required to
project. Also, we can use it as we develop a use-case, the amount of
move from one framework activity effort required to build software to
to the next. It'll encourage us to implement a use-case, and ...
find errors at each step.  Doug (smiling): I thought we were
 Vinod: I'd also like to collect the going to keep this simple.
number of hours we spend on  Vinod: We should, but once you
reviews. get into this metrics stuff, there's a
 Jamie: And the overall effort we lot of interesting things to look at.
spend on each software  Doug: I agree, but let's walk before
engineering task. we run, and stick to our goal. Limit
 Doug: You can compute a review- data to be collected to five or six
to-development ratio ... might be items, and we're ready to go.
interesting.
 Jamie: I'd like to track some use-
case data as well. Like the
CS550 Intro. to SE
Spring 2007 110
Estimating (pg 685)
 The scene: for the remaining increments.
 Doug Miller's office as project planning  Vinod (nodding): Okay, but we
begins.
haven't defined any increments yet.
 The players:  Doug: True, but that's why we
 Doug Miller
need to estimate.
(manager of the SafeHome software
engineering team)  Jamie (frowning): You want to
 Vinod Raman, Jamie Lazar, other know how long it's going to take
members of the product software us?
engineering team.
 Doug: Here's what I need. First, we
 The conversation:
need to functionally decompose the
 Doug: We need to develop an effort SafeHome software ... at a high
estimate for the project, and then level ... then we've got to estimate
we've got to define a micro- the number of lines of code that
schedule for the first increment and each function will take ... then ....
a macro schedule

CS550 Intro. to SE
Spring 2007 111
 Jamie: Whoa! How are we  Vinod: No ... it can be done in a
supposed to do that? few hours ... this morning, in fact.
 Vinod: I've done it on past projects.  Doug: I agree ... we can't expect
You use use-cases, determine the exactitude, just a ball-park idea of
functionality required to what the size of SafeHome will be.
implement each, guesstimate the  Jamie: I think we should just
LOC count for each piece of the estimate effort ... that's all.
function. The best approach is to  Doug: We'll do that too. Then use
have everyone do it independently
both estimates as a cross check.
and then compare results.
 Vinod: Let's go do it....
 Doug: Or you can do a functional
decomposition for the entire
project.
 Jamie: But that'll take forever, and
we've got to get started.

CS550 Intro. to SE
Spring 2007 112
Outsourcing (pg 701)
 The scene:  Doug (shocked): When did this
 Meeting room at CPI Corporation. happen?
 The players:  Lee: We got a quote from an
 Mal Golden offshore developer. It comes in at
senior manager, product development; 30 percent below what your group
 Lee Warren seems to believe it will cost. Here.
engineering manager; [Hands the quote to Doug who
 Joe Camalleri reads it.]
executive VP, business development;
 Doug Miller
 Mal: As you know, Doug, we're
project manager, software engineering. trying to keep costs down, and 30
percent is 30 percent. Besides, these
 The conversation:
people come highly recommended.
 Joe: We're considering outsourcing  Doug (taking a breath and trying
the SafeHome software engineering
to remain calm): You guys caught
portion of the product.
me by surprise here, but before

CS550 Intro. to SE
Spring 2007 113
you make a final decision, a few  Doug: It's likely that we'll release
comments? new versions of this product over
 Joe (nodding): Sure, go ahead. the next few years. And it's
reasonable to assume that software
 Doug: We haven't worked with this
will provide many of the new
outsourcing company before, right?
features, right?
 Mal: Right, but ....
 [All nod.]
 Doug: And they note that any
 Doug: Have we ever coordinated
changes to spec will be billed at an
an international project before?
additional rate, right?
 Lee (looking concerned): No, but
 Joe (frowning): True, but we expect
I'm told ....
that things will be reasonably
stable.  Doug (trying to suppress his
anger): So what you're telling me is:
 Doug: A bad assumption, Joe. Joe:
(1) we're about to work with an
Well, ....
unknown vendor, (2) the costs to
do this are not as low as they
CS550 Intro. to SE
Spring 2007 114
seem, (3) we're de facto committing risk averse, as I am.
to work with them over many  Joe (frowning): You've made a few
product releases, no matter what good points, but you have a vested
they do on the first one, and (4) interest in keeping this project in-
we're going to learn on-the-job house.
relative to an international project.  Doug: That's true, but it doesn't
 [All remain silent.] change the facts.
 Doug: Guys ... I think this is a  Joe (with a sigh): Okay, let's table
mistake, and I'd like you to take a this for a day or two, give it some
day to reconsider. We'll have far more thought, and meet again for a
more control if we do the work in final decision. Doug, can I speak
house. We have the expertise, and I with you privately?
can guarantee that it won't cost us  Doug: Sure ... I really do want to be
much more ... the risk will be
sure we do the right thing.
lower, and I know you're all

CS550 Intro. to SE
Spring 2007 115
Tracking the Schedule (pg 721)
 The scene: have trouble tracking progress.
 Doug Miller's office, prior to the  Vinod (a concerned look on his
initiation of the SafeHome software
project.
face): Why? We have tasks
scheduled on a daily basis, plenty
 The players:
of work products, and we've been
 Doug Miller
sure that we're not over-allocating
(manager of the SafeHome software
engineering team) resources.
 Vinod Raman,Jamie Lazar, other  Doug: All good, but how do we
members of the product software know when the analysis model for
engineering team.
the first increment is complete?
 The conversation:  Jamie: Things are iterative, so that's
 Doug (glancing at a Powerpoint difficult.
slide): The schedule for the first  Doug: I understand that, but ...
SafeHome increment seems
well, for instance, take analysis
reasonable, but we're going to
classes defined. You indicated that as
a milestone.
CS550 Intro. to SE
Spring 2007 116
 Vinod: We have.  Doug: It shouldn't take more than
 Doug: Who makes that an hour to make the corrections ...
determination? everyone else can get started now.
 Jamie (aggravated): They're done
when they're done.
 Doug: That's not good enough,
Jamie. We have to schedule FTRs
[formal technical reviews, Chapter
26], and you haven't done that. The
successful completion of a review
on the analysis model, for instance,
is a reasonable milestone.
Understand?
 Jamie (frowning): Okay, back to
the drawing board.

CS550 Intro. to SE
Spring 2007 117
Risk Analysis (pg 736)
 The scene:  Jamie: As in what can go wrong?
 Doug Miller's office, prior to the  Doug: Yep. Here are a few
initiation of the SafeHome software
project.
categories where things can go
wrong. [He shows everyone the
 The players:
categories noted in the introduction
 Doug Miller
to Section 25.3.]
(manager of the SafeHome software
engineering team)  Vinod: Umm ... do you want us to
 Vinod Raman, Jamie Lazar, other just call them out,
members of the product software
engineering team.
 Doug: No here's what I thought
we'd do. Everyone make a list of
 The conversation:
risks ... right now ...
 Doug: I'd like to spend some time  (Ten minutes pass; everyone is
brainstorming risks for the
writing.)
SafeHome project.
 Doug: Okay, stop.
 Jamie: But I'm not done!

CS550 Intro. to SE
Spring 2007 118
 Doug: That's okay. We'll revisit the  Doug: Okay, stop. Now we'll make
list again. Now, for each item on a group list on the white board. I'll
your list, assign a percent do the writing, we'll call out one
likelihood that the risk will occur. entry from your list in round robin
Then, assign an impact to the format.
project on a scale of 1 (minor) to 5  (Fifteen minutes pass; the list is
(catastrophic). created.)
 Vinod: So if I think that the risk is a  Jamie (pointing at the board and
coin flip, I specify a 50 percent laughing): Vinod, that risk
likelihood, and if I think it'll have a (pointing toward an entry on the
moderate project impact, I specify a board) is ridiculous. There's a
3, right? higher likelihood that we'll all get
 Doug: Exactly. hit by lightning. We should remove
 (Five minutes pass; everyone is it.
writing.)

CS550 Intro. to SE
Spring 2007 119
 Doug: No, let's leave it for now. We
consider all risks, no matter how
weird. Later we'll winnow the list.
 Jamie: But we already have over 40
risks ... how on earth can we
manage them all?
 Doug: We can't. That's why we'll
define a cut-off after we sort these
guys. I'll do that off-line, and we'll
meet again tomorrow. For now, get
back to work ... and in your spare
time, think about any risks that
we've missed.

CS550 Intro. to SE
Spring 2007 120
SQA Issues (pg 758-759)
 The scene: requirements model [Chapters 7 and
 Doug Miller's office as the SafeHome 8], Ed has committed to develop a
software project begins. V&V procedure for each
 The players: requirement.
 Doug Miller  Doug: That's really good, but we're
(manager of the SafeHome software
not going to wait until testing to
engineering team)
 other members of the software
evaluate quality, are we?
engineering team.  Vinod: No! Of course not. We've got
 The conversation: reviews scheduled into the project
 Doug: I know we didn't spend time plan for this software increment.
developing an SQA plan for this We'll begin quality control with the
project, but we're already into it reviews.
and we have to consider quality ...  Jamie: I'm a bit concerned that we
right? won't have enough time to conduct
 Jamie: Sure. We've already decided all the reviews. In fact, I know we
that as we develop the won't.
CS550 Intro. to SE
Spring 2007 121
 Doug: Hmmm. So what do you  Vinod: What do you want us to do,
propose? Doug?
 Jamie: I say we select those elements of  Doug: Let's steal something from
the analysis and design model that are Extreme Programming [Chapter 4].
most critical to SafeHome and review We'll develop the elements of each
them. model in pairs--two people--and
 Vinod: But what if we miss something conduct an informal review of each as
in a part of the model we don't review? we go. We'll then target "critical"
elements for a more formal team
 Shakira: I read something about a review, but keep those reviews to a
sampling technique [Section 26.4.4] that minimum. That way, everything gets
might help us target candidates for looked at by more than one set of eyes,
review. (Shakira explains the approach.) but we still maintain our delivery dates.
 Jamie: Maybe ... but I'm not sure we  Jamie: That means we're going to have
even have time to sample every element to revise the schedule.
of the models.  Doug: So be it. Quality trumps
schedule on this project.

CS550 Intro. to SE
Spring 2007 122
SCM Issues (pg 786-787)
 The scene: with a few "second thoughts."
 Doug Miller's office as the SafeHome Nothing major, but it's just the
software project begins. beginning.
 The players:  Jamie: We've been pretty informal
 Doug Miller about change management on past
(manager of the SafeHome software
projects.
engineering team)
 Vinod Raman, Jamie Lazar, other  Doug: I know, but this is bigger
members of the product software and more visible, and as I recall ...
engineering team.
 Vinod (nodding): We got killed by
 The conversation: uncontrolled changes on the home
 Doug: I know it's early, but we've lighting control project ...
got to talk about change remember the delays that ...
management.  Doug (frowning): A nightmare that
 Vinod (laughing): Hardly. I'd prefer not to relive.
Marketing called this morning  Jamie: So what do we do.

CS550 Intro. to SE
Spring 2007 123
 Doug: As I see it, three things. First for all of our work products.
we have to develop--or borrow--a  Vinod: They're called SCIs in this
change control process. context, and most good tools
 Jamie: You mean how people provide some support for that.
request changes?  Doug: That's a good start, now we
 Vinod: Yeah, but also how we have to ...
evaluate the change, decide when  Jamie: Uh, Doug, you said there
to do it (if that's what we decide), were three things
and how we keep records of what's  Doug (smiling): Third--we've all
affected by the change.
got to commit to follow the change
 Doug: Second, we've got to get a management process and use the
really good SCM tool for change tools--no matter what, okay?
and version control.
 Jamie: We can build a database

CS550 Intro. to SE
Spring 2007 124

You might also like