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

Quick Overview of SafeHome

y The SafeHome
Th S f H company h has d
developed
l d an iinnovative
i HW box
b that
h
implements wireless Internet (802.11) connectivity in a very small
form factor (the size of a matchbook).
y 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.
y The first generation of the system will only focus on home security
and surveillance since that is a market the public readily
understands.

CS350 Intro. to SE Spring 2008 1


How a Project Starts (pg 48)
y 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
p y that makes consumer camera just about anything
camera, anything. Using
products for home and commercial use.
the 802.11 b wireless protocol. It
y The players:
allows us to access the device's
◦ Mal Golden, senior manager, product
development; output
p 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,
g , Mal?
development.
„ Mal: I do. In fact, with sales as flat as
The conversation:
they've been this year, we need
y 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 we
A generic universal wireless box? think we've got a line of products that
y Lee: It's pretty cool, about the size could be big.g
„ Joe: How big... , bottom-line big?
CS350 Intro. to SE
Spring 2008 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. Most
idea Lisa
idea, Lisa. hardware is off the shelf. Software is an
„ Lisa: It's a whole new generation of 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
provide homeowners or small all households in the USA. If we could
b i
business people
l withith a system
t th
that's
t' price this thing right, it could be a killer-
controlled by their PC--home App. Nobody else has our wireless box--
security, home surveillance, it's proprietary. We'll have a two-year jump
appliance and device control
control. You on the
th competition.titi R
Revenue?
?MMaybe
b 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
home, thing.
l
level.l I'I'm iinterested.
t t d
CS350 Intro. to SE
Spring 2008 3
Selecting a Process Model, Part 1(pg 85
85--86
86))
y 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
g gg
group
p at CPI Corporation,
p ,a
(fictional) company that makes
simply define the thing
thing, but I'd
I d like
consumer products for home and you guys to begin thinking about
commercial use. how you're going to approach the
y The players: software part of this project
project.
◦ Lee Warren, engineering manager;
◦ Doug Miller, software engineering „Doug: Seems like we've been
manager; pretty disorganized in our
◦ Jamie Lazar, software team member; approach to software in the pastpast.
◦ Vinod Raman, software team member;
◦ Ed Robbins, software team member. „Ed: I don't know, Doug. We

y The conversation: always got product out the door.


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

CS350 Intro. to SE
Spring 2008 4
complex than anything we've push paper around.
done in the past. „Doug: Give it a chance before
„Jamie: Doesn
Doesn'tt look that hard,
hard you go negative on me
me. Here's
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
p 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
approach. I went to a short course me that a linear model is not for us
last week and learned a lot about ... assumes we have all
software engineering
g g ... g
good stuff. requirements up front and
We need a process here. knowing this place, that's not
„Jamie (with a frown): My job is likely.
„Vinod: Yeah, and that RAD
to build computer programs
programs, not
model sounds way too IT-
CS350 Intro. to SE
Spring 2008 5
oriented ... probably good for
building an inventory control
system
y or something, g, but it's just
j
not right for SafeHome.
„Doug: I agree.

„Ed: That prototyping approach


seems OK. A lot like what we do
here anyway.
„Vinod: That
That'ss a problem
problem. I'm
Im
worried that it doesn't provide us
with enough structure.
„Doug: Not to worry
worry. We've
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.
project

CS350 Intro. to SE
Spring 2008 6
Selecting
g a Process Model,, Part 2(pg
(pg 90-
90-91
91))
y 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, a keepin' it real
keepin real.
company that makes consumer products
y Vinod: I agree. We deliver an
for home and commercial use.
increment, learn from customer
y The players:
feedback, replan, and then deliver
◦ Lee Warren, engineering manager;
◦ Doug Miller, software engineering
another increment. It also fits into
manager; the nature of the product. We can
◦ Ed and Vinod,, members of the software have something g on the market
engineering team. fast and then add functionality
y The conversation: with each version, er, increment.
y (Doug describes evolutionary y Lee: Wait a minute, did y you sayy
process options.) that we regenerate the plan with
y Ed: Now I see something I like. An each tour around the spiral, Doug?
incremental approach makes That's not so great, we

CS350 Intro. to SE
Spring 2008 7
need one plan, one schedule, and y Doug (smiling): Then you'll have
we've got to stick to it. to reeducate them, buddy.
y Doug: g That's old school thinking, g
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
d
doesn't 't reflect
fl t reality?
lit ?
y Lee (frowning): I suppose so, but
senior management's not going to
lik thi
like this ... th
they wantt a fifixed
d plan.
l

CS350 Intro. to SE
Spring 2008 8
Considering Agile Software Development (pg
113--114)
113
y The scene: y Doug: And?
◦ Doug Miller's office. y Vinod: I was talking to a friend at
y The players: another company,
p y and he was telling g
◦ 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,
Raman software team member.
member
y Doug: Yeah, some good, some bad.
y The conversation: y Jamie: Well, it sounds pretty good to
us. Lets you develop software really
y (A knock on the door)
fast, uses something called pair
y Jamie: Doug,
Doug you got a minute? programming to do real-time quality
y Doug: Sure Jamie, what's up? checks ... it's pretty cool, I think.
y Jamie: We've been thinking about y Doug: It does have a lot of really
our process discussion
di i yesterday
t d ... good ideas. I like the pair
you know, what process we're
going to choose for this new
SafeHome project.
project

CS350 Intro. to SE
Spring 2008 9
programming concept, for y Doug: So you guys think we
instance, and the idea that should use XP?
stakeholders should be part of the y Jamie: It's definitelyy worth
team. considering.
y Jamie: Huh? You mean that y Doug: I agree. And even if we
marketing will work on the project choose an incremental model as
team with us? our approach,h th
there's' no reason
y Doug (nodding): They're a why we can't incorporate much of
stakeholder, aren't they? what XP has to offer.
y Jamie: Jeez ... they'll
they ll be y Vinod: Doug,
Doug before you said
requesting changes every five "some good, some bad." What
minutes. was the "bad"?
y Vinod: Not necessarily. y Myy friend y Doug:
g The thing g I don't like is the
said that there are ways to way XP downplays analysis and
"embrace" changes during an XP design ... sort of says that writing
project. code is where the action is.

CS350 Intro. to SE
Spring 2008 10
y (The team members look at one y Doug: I think we can, Vinod. In
another and smile.) fact, I'm sure of it.
y Doug: g So yyou agree
g with the XP
approach?
y Jamie (speaking for both):
Writing code is what we do, Boss!
y 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.
y Vinod: Maybe we can have it both
ways, agility with a little discipline.

CS350 Intro. to SE
Spring 2008 11
Communication Mistakes (pg135)
y The scene: y Ed: What do you mean?
◦ Software engineering team workspace. y Jamie: Well, I gave Lisa Perez a
y The players: call. She's the marketing g honcho
◦ Jamie Lazar, software team member; on this thing."
◦ Vinod Raman, software team member;
y Vinod: And ... ?
◦ Ed Robbins software team member.
y Jamie: I wanted her to tell me
y The conversation:
Th ti
about SafeHome features and
y Ed: What have you heard about functions ... that sort of thing.
this SafeHome project? Instead, she began asking me
y Vinod:
Vi d The Th kick-off
ki k ff meeting ti isi questions about security systems,
scheduled for next week. surveillance systems ... I'm no
y Jamie: I've already done a little bit expert.
off investigation,
i ti ti but
b t it didn't
did 't go y Vinod: What does that tell you?
well." y (Jamie shrugs.)
y Vinod: That marketing g will need

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

CS350 Intro. to SE
Spring 2008 13
Preliminary System Engineering (pg163-
(pg163-164)
y The scene: y Jamie: That's why we have
◦ Software engineering team workspace additional meetings scheduling for
after the SafeHome kickoff meeting has the next five days. By the way, I
occurred
occurred. suggested that two of the
y 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 reallyy
◦ Ed Robbins, software team member. communicate, er, collaborate.
y The conversation: y Vinod: How did that go?
y Jamie: Well, they looked at me
y Ed:
d I tthink itt went
e t pretty
p etty well.
e
lik I was crazy, b
like butt D
Doug [th
[the
y Vinod: Yeah ... but all we did was software engineering manager]
look at the overall system--we've likes the idea--it's agile--so he's
got p
g plenty y of requirements
q talking to them.
gathering work left to do for the y Ed: I was taking notes using my
software. PDA during the meeting, and I

CS350 Intro. to SE
Spring 2008 14
y came up with a list of basic panels, various sensors, and
applicance/device controllers.
functions.
◦ All will communicate via wireless
y Jamie: Cool, let's see. protocols ((e.g.,
p g , 802.11b)) and will be
y Ed: I've already e-mailed both of designed for new-home construction and
for application within existing homes.
you a copy. Take a look and we'll
◦ All hardware with the exception of our
talk. new wireless box will be off the shelf
shelf.
y Vinod: How about after lunch? y Basic software functionality that I
y (Jamie and Vinod received the could glean from our kick-off
following
g from Ed)) Preliminary
y conversation.
co e sat o
notes of the structure/functionality y Home security functions:
of SafeHome: ◦ Standard window/door/motion sensor
◦ The system will make use of one or more monitoring for unauthorized access
PCs, various wall-mounted and/or (break-ins).
handheld control ◦ Monitoring for fire, smoke, and CO levels.

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

CS350 Intro. to SE
Spring 2008 16
y Communication management y Other functions:
functions: ◦ As yet undefined.
◦ Answering machine functions. ◦ All functions are accessible via the
◦ List of callers via caller ID. I t
Internett with
ith appro-priate
i t password d
protection.
◦ Messages, time-stamped.
◦ Message text via voice recognition
system.
◦ E-mail functions (all standard e-mail
functions).
◦ Standard e-mail display.
◦ V i read
Voice d off e-mailil via
i phone
h access.
◦ Personal phone book.
◦ Link to PDA.

CS350 Intro. to SE
Spring 2008 17
Conducting a Requirements Gathering Meeting
(pg188)
y The scene: y The conversation:
◦ A meeting room. The first requirements y Facilitator (pointing at white
gathering meeting is in progress. board): So that's the current list of
y Th players:
The l objects and ser services
ices for the home
◦ Jamie Lazar, software team member; security function.
◦ Vinod Raman, software team member; y Marketing person: That about
◦ Ed Robbins,
Robbins software team member; covers it from our point of view.view
◦ Doug Miller, software engineering y 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?
y Marketing person: Yes, that's
right ... we
we'llll have to add that
functionality and the appropriate
objects.

CS350 Intro. to SE
Spring 2008 18
y Facilitator: Does that also add y Ed: That's easier said than done
some constraints? and....
y Jamie: It does, both technical and y Facilitator ((interrupting):
p g) I don't
legal. want to debate this issue now.
y Production rep: Meaning? Let's note it as an action item and
y Jamie: We better make sure an proceed. (Doug, serving as the
outsider can't hack into the system, recorder for the meeting, makes
disarm it, and rob the place or an appropriate note.)
worse. Heavy liability on our part. y Facilitator: I have a feeling
y Doug: Very true. there's still more to consider here.
y Marketing: But we still need y (The group spends the next 45
Internet connectivityy . jjust be sure minutes refining and ex-panding
to stop an outsider from getting in. the details off the home security
function.)

CS350 Intro. to SE
Spring 2008 19
Developing a Preliminary User Scenario
(pg190)
y The scene: y The conversation:
◦ A meeting room, continuing the first
requirements gathering meeting. y Facilitator: We've been talking
about security for access to
y Th players:
The l SafeHome functionality that will be
◦ Jamie Lazar, software team member;
accessible via the Internet. I'd like
◦ Vinod Raman, software team member;
to try something.
◦ Ed Robbins,
Robbins software team member;
y Let's develop a user scenario for
◦ Doug Miller, software engineering
manager;
access to the home security
◦ three members of marketing;
function.
◦ a product engineering representative; y Jamie: How?
◦ a facilitator. y Facilitator: We can do it a couple
of different ways, but for now, I'd
like to keep
p things
g reallyy informal.
Tell us (he points at a marketing
person) how you envision
accessing the system.

CS350 Intro. to SE
Spring 2008 20
y Marketing person: Um. .. , well, y 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....
and
housekeeper or repair guy, who y Facilitator (interrupting): That's
good information, Vinod, but it's
didn't have the security code.
technical. Let's jjust focus on how
y Facilitator (smiling): That's the the end-user will use this
reason you'd do it .. . tell me how capability, OK?
you'd actually do this. y Vinod: No problem.
y Marketing person: Um . . . the y Marketing person: So, as I was
first thing I'd need is a PC. I'd log saying, I'd log on to a Web site
on to a Web site we'd maintain for and provide my user id and two
allll users off SafeHome.
S f H I'd provide
id levels of passwords
passwords.
my user id and ... y Jamie: What if I forget my
password?

CS350 Intro. to SE
Spring 2008 21
y 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 that can perform--arm the system,
and call it an "exception." I'm sure disarm the system
system, disarm one or
more sensors. I suppose it might
there'll be others. also allow me to reconfigure
y Marketing person: After I enter securityy zones and other thingsg
the passwords, a screen like that, but I'm not sure.
representing all SafeHome y (As the marketing person
functions will appear. I'd select the continues talking, Doug takes
h
home security
it ffunction.
ti Th
The co pious notes
co-pious notes. These form the
system might request that I verify basis for the first informal use-
who I am, say by asking for my case scenario. Alternatively, the
address or phone number or marketing gpperson could have
been asked to write the scenario,
something. It would then display a but this would be done outside the
picture of the meeting.)

CS350 Intro. to SE
Spring 2008 22
Developing a High-
High-Level Use-
Use-Case Diagram (pg195)
y The scene: y The conversation:
◦ A meeting room, continuing the y Facilitator: We've spent a fair
requirements gathering meeting.
amount of time talking g about
y Th players:
The l 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,
Robbins software team member;
◦ Doug Miller, software engineering
summarize the important
manager; scenarios that are part of this
◦ three members of marketing; function. Take a look.
◦ a product engineering representative; y (All attendees look at Figure 7.3.)
◦ a facilitator.
y Jamie: I'm just beginning to learn
UML notation. So the home
security function
f is represented by
the big box with the ovals inside it?
And the

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

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

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

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

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

CS350 Intro. to SE
Spring 2008 28
y functions can wait until the next
releases . . . I'll agree to that.
y Lisa and Doug g appear
pp 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?

CS350 Intro. to SE
Spring 2008 29
Developing Another Preliminary User Scenario
(pg219)
y The scene: y SafeHome surveillance function.
◦ A meeting room, during the second Let's develop a user scenario for
requirements gathering meeting. access to the home security
y Th players:
The l function.
◦ Jamie Lazar, software team member;
y Jamie: Who plays the role of the
◦ Ed Robbins, software team member;
actor on this?
◦ Doug Miller,
Miller software engineering
manager; y Facilitator: I think Meredith (a
◦ three members of marketing; marketing person) has been
◦ a product engineering representative; working on that functionality. Why
◦ a facilitator. don't you play the role.
y The conversation: y Meredith: You want to do it the
y Facilitator: It's time that we begin same way we did it last time, right?
t lki about
talking b t ththe y Facilitator: Right ... same way.
y Meredith: Well, obviously the
reason for surveillance is to

CS350 Intro. to SE
Spring 2008 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
y Ed: Will the video be digital, and configuration activity, I'll focus on
will it be stored on disk? the surveillance function.
y Facilitator: Good question, but y Facilitator (smiling): Took the
let's postpone implementation words right out of my mouth.
issues for now. Meredith? y Meredith: Um ... I want to gain
y Meredith: Okay, so basically access to the surveillance function
there are two parts to the either via the PC or via the
surveillance function ... the first Internet. My feeling is that the
configures
f the system including I t
Internett access would ld be
b more
laying out a floor plan--we need frequently used. Anyway, I want to
tools to help the be able to display camera views
on a PC and

CS350 Intro. to SE
Spring 2008 31
control pan and zoom for a y 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
wantt to
t be
b able
bl tto block
bl k access tto it tto b
be iintuitive,
t iti meaning
i Id
don't'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 y Facilitator:
F ilit t G d job,
Good j b now, llet's
t'
that show views from all cameras go into this function in a bit more
and then be able to pick the one I detail....
want enlarged
enlarged.
y Jamie: Those are called
thumbnail views.

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

CS350 Intro. to SE
Spring 2008 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
y 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.
second "configure
g floor p
plan."
y Exceptions: 5. An alarm condition is encountered--
see use-case: "alarm condition
1. ID or passwords are incorrect or not encountered."
recognized—see use-case: "validate
ID and passwords." y Priority:
2. Surveillance function not configured Moderate priority, to be implemented
for this system--system displays after basic functions.
appropriate error message; see use- y When available: Third increment.
case: "configure surveillance
function." y Frequency of use: Infrequent.

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

CS350 Intro. to SE
Spring 2008 35
Data Flow Modeling (pg231
(pg231--232)
y The scene: y 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
concluded.
said it's a bit old fashioned, but
y The players: you know what? It helps me to
◦ Jamie, Vinod, Ed
clarify things.
all members of the SafeHome software
engineering team. y Ed: That's cool. But I don't see
y The conversation: any classes or objects here.
y ((Jamie has sketched out the y 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.) y Vinod: So these DFDs represent
an I-P-OO view off the software,
f
right?
y Ed: I-P-O?

CS350 Intro. to SE
Spring 2008 36
y Vinod: Input-process-output. The y Jamie: Yeah, but first we've got to
DFDs are actually pretty intuitive ... develop a complete analysis
if you look at 'em for a moment, model, and this isn't it.
they show how data objects flow y Vinod: Well, it's a first step, but
through the system and get we're going to have to address
transformed as they go. class-based elements and also
y 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 y Ed: We've got a lot of work to do
l
lowest t llevell off th
the DFD
DFD. and not much time to do it.
y Jamie: That's the cool part, you y (Doug--the software engineering
can. In fact there's a way to manager--walks into the cubical.)
t
translate
l t the
th DFDs
DFD iintot ad
design
i
architecture.
y Ed: Really?

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

CS350 Intro. to SE
Spring 2008 38
Class Models (pg238-
(pg238-239)
y The scene: y Ed: So when the homeowner
◦ Ed's cubicle, as analysis modeling wants to pick a camera, he or she
begins.
has to pick it from a floor plan. I've
y The players: defined a FloorPlan class.
class Here's
Here s
◦ Jamie, Vinod, Ed the diagram.
all members of the SafeHome software y (They look at Figure 8.14.)
engineering team.
y Jamie: So FloorPlan is a class
y The conversation: that is put together with walls that
y (Ed has been working to extract are composed of wall segments,
classes from the use-case doors and windows, and also
template for
f Access camera cameras; that's
th t' what
h t those
th
surveillance--display camera labeled lines mean, right?
views" [presented in an earlier y Ed: Yeah, they're called
sidebar in this chapter] and is "associations
associations." One class
presenting the classes he has y is associated with another
extracted to his colleagues.) according to the associations

CS350 Intro. to SE
Spring 2008 39
I've shown. [Associations are y Jamie: And the same goes for
discussed in Section 8.7.5.] windows and doors. Looks like
y Vinod: So the actual floor pplan is camera has a few extra attributes.
made up of walls and contains y Ed: Yeah, I need them to provide
cameras and sensors that are pan and zoom info.
placed within those walls. How y 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?
y Ed: It doesn't, but the other y Ed: We'll need to identify each
classes do. See the attributes camera for display purposes.
under, say, WallSegment, which y Jamie: Makes sense to me, but I
is used to build a wall. The wall do have a few more questions.
segmentt has
h start
t t andd stop
t
coordinates and the draw ()
operation does the rest.

CS350 Intro. to SE
Spring 2008 40
y (Jamie asks questions which
result in minor modifications.)
y Vinod: Do y 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.
y Ed:" I'm not quite sure how to do
them.
y Vinod: It's not hard, and they
really pay off. I'll show you.

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

CS350 Intro. to SE
Spring 2008 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 fourth is extended travel. All of
air 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
f
from a floor
fl plan
l off the
th house.
h extended
t d d ttravell states,
t t the
th system
t
Each device must be identified on should turn lights on and off at
the floor plan. As an optional random intervals (to make it look
feature I want to control all
feature, like someone is home) and control
audio-visual devices--audio, the heating and air conditioning
television, DVD, digital recorders, system. I should be able to
and so forth
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.

CS350 Intro. to SE
Spring 2008 43
y Ed: The hardware guys have got y Vinod: I thought you didn't
all the wireless interfacing figured understand CRC.
out? y Ed: Maybey a little, but go
g ahead.
y Vinod (smiling): They're working y 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 y Attributes:
use one as an example. Let's use y optionsPanel--provides info on
the HomeManagementlnterface
buttons that enable user to select
class.
l functionality
y Ed: Okay . . . so the
y situationPanel--provides info on
responsibilities are ... the buttons that enable user to select
attributes
tt ib t and d operations
ti for
f the
th situation
class, and the collaborations are
y FloorPlan--same as surveillance
the classes that the
j
object but this one displays
p y
responsibilities point to
to.
devices
CS350 Intro. to SE
Spring 2008 44
y devicelcons--info on icons y ResponsibilityCollaborator
representing lights, appliances, ◦ displayControl
HVAC, etc. OptionsPanel (class)
y devicePanels--simulation of ◦ selectControl OptionsPanel (class)
appliance or device control panel; ◦ displaySituation
allows control SituationPanel (class)
y Operations:
◦ selectSituation
l tSit ti
SituationPanel (class)
◦ displayControl(), selectControl(),
◦ accessFloorplan FloorPlan
displaySituation(), selectSituation(),
(class) ...
accessFloorplan(),
Fl l ()
selectDevicelcon(), ◦ •
displayDevicePanel(), ◦ •
accessDevicePanel(), (), . . . ◦ •
y Class:
◦ HomeManagementInterface

CS350 Intro. to SE
Spring 2008 45
y Ed: So when the operation y Ed: Good way to find omissions or
accessFloorplan() is invoked, it errors.
collaborates with the FloorPlan y Vinod: Yep.
p
object just like the one we
developed for surveillance. Wait, I
have a description of it here.
(Th look
(They l k att Fi
Figure 8 8.14.)
14 )
y Vinod: Exactly. And if we wanted
to review the entire class model,
we couldld start
t t with
ith this
thi index
i d card,
d
then go to the collaborator's index
card, and from there to one of the
collaborator's
collaborator s collaborators
collaborators, and
so on.

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

CS350 Intro. to SE
Spring 2008 47
y Shakira: I wasn't a CS grad, so a whenever I can that sort of thing.
lot of the stuff the instructor y Ed: Modularity, functional
mentioned is new to me. I can independence,
p hiding,
g ppatterns ...
generate good code and fast. I see.
don't see why this stuff is so y Jamie: I still remember the very
important. first programming course I took ...
y 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 y Vinod: Same thing can be applied
your designs
d i andd code
d work. k to design, you know.
y Shakira (smiling): Well, I always y Ed: The only concept I hadn't
do try to partition the code, keep it heard of before was "refactoring."
f
focused d on one thi
thing, kkeep y Shakira: That's used in Extreme
interfaces simple and constrained, Programming, I think she said.
reuse code

CS350 Intro. to SE
Spring 2008 48
y 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.
y Jamie: Let's get back to
SafeHome design. I think we
should put these concepts on our
review
i checklist
h kli t as we d develop
l
the design model for SafeHome.
y Vinod: I agree. But as important,
l t' allll commit
let's it tto thi
think
k about
b t th
them
as we develop the design.

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

CS350 Intro. to SE
Spring 2008 50
y Vinod: The analysis class showed collaborates with FloorPlan, and
only things in the problem domain, obviously, there can be many
well, actually on the computer cameras in the floor plan.
screen, that
th t were visible
i ibl tto th
the y Vinod: Phew, let's see a picture of
end-user, right? this new FloorPlan design class.
y Ed: Yep, but for the FloorPlan y (Ed shows Vinod the drawing
design class
class, I've got to add some shown
h iin Fi
Figure 9
9.3.)
3)
things that are implementation y 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
dif the
th floor
fl plan
l easilyil
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
aggregation--without
segments, windows, doors, and problems.
so on. The class Camera
y Ed (nodding): Yeah, I think it'll
work Vinod: So do II.
work.

CS350 Intro. to SE
Spring 2008 51
Choosing an Architectural Style (pg295-
(pg295-296)
y The scene: y Jamie: But . . . ?
◦ Jamie's cubicle, as design modeling y Ed: But . . . I have trouble
continues.
visualizingg what an object-oriented
j
y Th players:
The l architecture is. I get the call and
◦ Jamie, Ed
return architecture, sort of a
members of the SafeHome software
engineering team.
conventional process hierarchy,
but 00 .. I don't know. It seems
y The conversation:
sort of amorphous.
y Ed (frowning): We've been
y Jamie (smiling): Amorphous, huh?
modeling the security function
using UML. . . you know classes, y Ed: Yeah . . . what I mean is I
relationships, can't visualize a real structure, just
design classes floating in space.
y that sort of stuff. So I guess the
object-oriented architecture' is the y Jamie: Well, that's not true. There
right way to go. are class hierarchies . . .

CS350 Intro. to SE Spring 2008 52


think of the hierarchy (aggregation) y Jamie: Doug'Il have no problem
we did for the FloorPlan object with that. He said that we should
[Figure 9.3]. An 00 architecture is consider architectural alternatives.
a combination of that structure By the way, there's absolutely no
and the interconnections—you reason why both of these
know, collaborations--between the architectures couldn't be used in
classes.
l W
We can show
h it b
by ffully
ll combination
bi ti with ith one another.
th
describing the attributes and y Ed: Good. I'm on it.
operations, the messaging that
goes on
on, and the structure of the
classes.
y 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.

CS350 Intro. to SE Spring 2008 53


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

CS350 Intro. to SE Spring 2008 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
off quality
lit scenarios
i th
thatt define
d fi ththe
attributes we'd like to see in the
software architecture.
y Jamie:
J i And A d we applyl th
them tto th
the
alternatives.
y Vinod: Exactly. The style that
h dl th
handles the use-cases and d
scenarios best is the one we
choose.

CS350 Intro. to SE Spring 2008 56


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

CS350 Intro. to SE Spring 2008 57


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

CS350 Intro. to SE Spring 2008 58


The OCP in Action (pg332)
y The scene: guys have come up with.
◦ Vinod's cubicle. y Shakira: Amaze me.
y The players: y Vinod ((laughing):
g g) Theyy call it a
◦ Vinod, Shakira doggie angst sensor.
members of the SafeHome software
engineering team. y Shakira: Say what?
y The conversation: y Vinod: It
It'ss for people who leave
y 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 g starts to bark.
sensor. The neighbor gets angry and
complains. With this sensor, if the
y Shakira (smirking): Not again,
dog barks for more than, say, a
jeez!
minute, the sensor sets a special
y Vinod: Yeah ... and you're not alarm mode that calls the owner on
going to believe what these his or her cell phone.
y Shakira: You're kidding me, right?
CS350 Intro. to SE Spring 2008 59
y Vinod: Nope. Doug wants to know deal.
how much time it's going to take to y Shakira: Knowing Doug, he'll keep
add it to the security function. us focused and not deliver the
y Shakira (thinking a moment): Not doggie thing until the next release.
much ... look. [She shows Vinod y Vinod: That's not a bad thing, but
Figure 11.4] We've isolated the can you implement now if he wants
actual sensor classes behind the you to?
sensor interface. As long as we y Shakira: Yeah, the way we
have specs for the doggie sensor, designed the interface lets me do it
adding
ddi it should
h ld b be a piece
i off cake.
k with no hassle.
Only thing I'll have to do is create an y Vinod (thinking a moment): Have
y appropriate component ... uh, class, you ever heard of the "Open-Closed
f it.
for it No
N change
h tto the
th Detector
D t t Principle"?
component at all. y Shakira (shrugging): Never heard
y Vinod: So I'll tell Doug it's no big of it. Vinod (smiling): Not a problem.

CS350 Intro. to SE Spring 2008 60


Cohesion in Action (pg336-
(pg336-337)
y The scene: y Ed: We originally defined five
◦ Jamie's cubicle. operations for camera. Look ...
y 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 the ◦ translateLocation() allows me to move
surveillance function. the camera around the floor pplan.
y The conversation: ◦ displayID() gets the camera ID and
displays it near the camera icon.
y Ed: I have a first-cut design of the ◦ displayView() shows me the field of view
camera component. of the camera graphically
graphically.
y Jamie: Wanna do a quick review? ◦ displayZoom() shows me the
magnification of the camera graphically.
y Ed: I guess ... but really, I'd like
your input on something
something. y Ed: I've designed each separately,
and they're pretty simple
y (Jamie gestures for him to
operations. So I thought
continue.)

CS350 Intro. to SE Spring 2008 61


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

CS350 Intro. to SE Spring 2008 62


y Ed: I wouldn't be that sloppy. y Jamie: Good decision.
y Jamie: Maybe not, but what if
some support
pp p person two yyears
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.
y Ed: So you're against it?
y Jamie: You're the designer . . . it's
your decision . . . just be sure you
understand the consequences of
low cohesion.
y Ed (thinking a moment): Maybe
we'll go with separate display ops.

CS350 Intro. to SE Spring 2008 63


Coupling in Action (pg338-
(pg338-339)
y The scene: y Shakira: Well, each of the sensors
◦ Shakira's cubicle. recognizes an alarm condition of
y The players: some kind, right?
◦ Vinod, Shakira y Vinod (smiling): That's why we call
members of the SafeHome software them sensors, Shakira.
engineering team who are working on
the security function. y Shakira (exasperated): Sarcasm,
y The conversation: Vinod. You've got to work on your
interpersonal skills.
y Shakira: I had what I thought was
a great idea ... then I thought y Vinod: You were saying?
about it a little, and it seemed like y Shakira: Okay, anyway, I figured ...
a not-so-great idea. I finally why not create an operation within
rejected
j it,, but I jjust thought
g I'd run each sensor object called makeCall()
it by you. that would collaborate directly with
y Vinod: Sure, what's the idea? the OutgoingCall component, well,
with an interface to the
O t i C ll component.
OutgoingCall t
CS350 Intro. to SE Spring 2008 64
y 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
y Shakira: Yeah ... but then I said to information because if it changes.
myself, that means that every y Shakira: It just didn't feel right.
sensor object will be connected to y Vinod: Design heuristics for
the OutgoingCall component, and coupling tell us it's not right.
that means that it's indirectly y Shakira: Whatever….
coupled
l d tto th
the outside
t id world
ld and d...
well, I just thought it made things
complicated.
y Vinod: I agree.
agree In this case
case, it's a
better idea to let the sensor
interface pass info to the
ControlPanel and let it initiate the
CS350 Intro. to SE Spring 2008 65
Violating a UI "Golden Rule“ (pg359-
(pg359-360)
y The scene: y 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
y Th players:
The l 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.
di l th
display the video
id iin a video
id
y The conversation: window.
y Jamie: I've been thinking about the y Vinod: How does the homeowner
surveillance function interface. remember b h how many cameras are
y Vinod (smiling): Thinking is good. set up and where they are?
y Jamie: I think maybe we can y Jamie (mildly irritated): He's the
simplify matters some
some. h
homeowner, h
he should
h ld kknow.
y Vinod: Meaning? y Vinod: But what if he doesn't?
y Jamie: He should.

CS350 Intro. to SE Spring 2008 66


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

CS350 Intro. to SE Spring 2008 67


Use--Cases for UI Design (pg368)
Use
y The scene: y 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
y Th players:
The l different point of view. The
◦ Vinod, Jamie "administrator" sets the system up,
members of the SafeHome software configures stuff, lays out the floor
engineering team.
plan,
l places
l th
the cameras ...
y The conversation:
y Jamie: All I had marketing do was
y Jamie: I pinned down our
play the role of a homeowner who
marketing contact and had her wantst to
t see video.
id
write a use-case for the
y Vinod: That's okay. It's one of the
surveillance interface.
major behaviors of the
y Vinod: From whowho's
s point of view? surveillance
ill ffunction
ti iinterface.
t f B
Butt
y Jamie: The home owner's, who we're going to have to
else is there?

CS350 Intro. to SE Spring 2008 68


examine the system y (Jamie shows the informal use-
administration behavior as well. case to Vinod.)
y Jamie ((irritated):
) You're right.
g y Informal use-case: I want to be
y (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
y Jamie: I was lucky. I found our administration function. It asks me
marketing contact and we worked whether I want to do a new set-up,
through the administrator use- or whether I want to edit an
case together. Basically, we're existing
i ti set-up.
t If I select
l t a new
going to define "administration" as set-up, the system displays a
one function that's applicable to all drawing screen that will enable
other SafeHome
S f f
functions. Here's me to draw the floor plan onto a
what we came up with. grid. There will be icons for walls,
windows, and doors so that
drawing is easy
easy. I just
CS350 Intro. to SE Spring 2008 69
stretch the icons to their edit the setting for cameras and
appropriate lengths. The system sensors. In every case, I expect
will display the lengths in feet or the system to do consistency
meters (I can select the checking and to help me avoid
measurement system). I can mistakes.
select from a library of sensors y Vinod (after reading the
andd cameras and d place
l th
them on scenario): Okay, there are
the floor plan. I get to label each, probably some useful design
or the system will do automatic patterns or reusable components
labeling I can establish settings
labeling. f GUIs
for GUI for
f drawing
d i programs. I'll
for sensors and cameras from betcha 50 bucks we can
appropriate menus. If I select edit, implement some or most of the
I can move sensors or cameras
cameras, administrator interface using them
them.
add new ones or delete existing y Jamie: Agreed. I'll check it out.
ones, edit the floor plan, and

CS350 Intro. to SE Spring 2008 70


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

CS350 Intro. to SE Spring 2008 71


y Doug: That's an Extreme componentt to t me, I'll integrate
i t t it and
d
Programming [an agile software run a series of regression tests on
development process, see Chapter the partially integrated program. I've
4] concept, no? been working to design a set of
appropriate tests for each function in
y Ed: It is. Even though we're not
the system.
using Extreme Programming per se,
we decided that it would be a good y Doug (to Vinod): How often will you
idea to design unit tests before we run the tests?
build the component—the design y Vinod: Every day ... until the system
gives
i us allll off th
the iinformation
f ti we is integrated ... well,
well I mean until the
need. software increment we plan to
y Jamie: I've been doing the same deliver is integrated.
thi
thing. y Doug: You guys are way ahead of
y Vinod: And I've taken on the role of me!
the integrator, so every time one of y Vinod (laughing): Anticipation is
the guys passes a everything in the software biz,
biz Boss
Boss.
CS350 Intro. to SE Spring 2008 72
Preparing for Validation (pg407-
(pg407-408)
y The scene: y Vinod: That's about right.
◦ Doug Miller's office, as component-level Integration is going well. We're
design continues and construction of
certain components
p begins.
g smoke testing daily, finding some
y The players: bugs but nothing we can't handle.
◦ Doug Miller So far, so good.
software engineering manager, y Doug: Talk to me about validation.
◦ Vinod, Jamie, Ed, Shakira y Shakira: Well, we'll use all of the
members of the SafeHome software use-cases as the basis for our test
engineering team.
design. I haven't started yet, but
y The conversation: I'll be developing tests for all of the
y Doug: The first increment will be use-cases that I've been
ready for validation in what ... responsible for.
about three weeks? y Ed: Same
S here.
y Jamie: Me too, but we've got to
get our act together for

CS350 Intro. to SE Spring 2008 73


acceptance testing and also for
y Doug: I know, I know. But if an
alpha and beta testing, no?
ITG works from requirements and
y Doug: Yes, In fact I've been use-cases, not too much baby
thinking that we could bring in an sitting will be required.
outside contractor to help us with
y Vinod: I still think we've got it
validation. I have the money in the
under control.
budget ... and it would give us a
y Doug: I hear you, Vinod, but I'm
new point of view.
going to overrule on this one. Let's
y Vinod: I think we've got it under
plan to meet with the ITG rep later
control
control.
this week. Get 'em started and
y Doug: I'm sure you do, but an ITG see what they come up with.
gives us an independent look at the
y Vinod: Okay, maybe it'll lighten
software
software.
the load a bit.
y Jamie: We're tight on time here,
Doug. I, for one, don't have the time
to baby
baby-sit
sit anybody you bring in to
do the job.
CS350 Intro. to SE Spring 2008 74
Debugging (pg413)
y The scene: working on this <bleep> bug since
◦ Ed's cubical as coding and unit testing is I discovered it at 9:30 this morning,
conducted. and it's what, 2:45? I'm clueless.
y Th players:
The l y Shakira: I thought we all agreed
◦ Ed, Shakira
to spend no more than one hour
members of the SafeHome software
engineering team.
debugging stuff on our own, then
we'd get help, right?
y The conversation:
y Ed: Yeah, but ...
y Shakira (looking in through the
entrance to the cubical): Hey ... y Shakira (walking into the
where were you at lunch time? cubical): So what's the problem?
y Ed: Right here ... working. y Ed: It's complicated. And besides,
I've been looking at this for, what,
y Shakira: You look miserable ...
5 hours? You're not going to find it.
what's the matter?
y Ed (sighing audibly): I've been

CS350 Intro. to SE Spring 2008 75


y Shakira: Indulge me ... what's the
problem?
y ((Ed explains
p the p
problem to Shakira
who looks at it for about 30 seconds
without speaking.)
y 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?
y (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.)

CS350 Intro. to SE Spring 2008 76


Designing Unique Tests (pg423)
y The scene: y Vinod:
Vi d So
S llet's
t' see ... you note
t that
th t
◦ Vinod's cubical. the correct password will be 8080,
right?
y The players:
◦ Vinod, Ed y Ed Uh h
Ed: huh.
h
members of the SafeHome software y Vinod: And you specify passwords
engineering team. 1234 and 6789 to test for errors in
y The conversation: recogni ing in
recognizing invalid
alid pass
passwords?
ords?
y Vinod: So these are the test y Ed: Right, and I also test
cases you intend to run for the passwords that are close to the
password Validation operation.
operation correct password,
password see ... 8081 and
y Ed: Yeah, they should cover pretty 8180.
much all possibilities for the kinds y Vinod: Those are okay, but I don't
of passwords a user might enter
enter. see much point in running both the
1234 and 6789 inputs. They're
redundant . . . test the same thing,
don'tt they?
don
CS350 Intro. to SE Spring 2008 77
y Ed: Well, they're different values. y Ed: Not a problem ... I'll give this a
y Vinod: That's true, but if 1234 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.
y Ed: I see what you mean.
y 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.

CS350 Intro. to SE Spring 2008 78


Using Cyclomatic Complexity (pg428)
y The scene: maybe we should forget white-box
◦ Shakira's cubicle. testing, integrate everything, and
y The players: start running black-box tests.
◦ Vinod,Shakira y Vinod: You figure we don't have
members of the SafeHome software enough time to do component
engineering team who are working on
test planning for the security function.
tests, exercise the operations, and
then integrate?
y The conversation:
y Shakira: The deadline for the first
y 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 y Vinod: Why don't you at least run
and if yyou 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?

CS350 Intro. to SE Spring 2008 79


y Shakira (exasperated): And y 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? y Shakira ((leafing g through
g the
y Vinod: V of G. pages): Okay, it doesn't look hard.
y Shakira: Huh? I'll give it a try. The ops with the
y Vinod: Cyclomatic
y complexity--V
p y highest V(G) will be the candidates
of G. Just compute V(G) for each for white-box tests.
of the operations within each of y 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. y Shakira: Alright. But at least this'll
y 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.

CS350 Intro. to SE Spring 2008 80


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

CS350 Intro. to SE Spring 2008 81


y (Shows Jamie the following history, sort of a conventional
sequence.) usage. #2 repeats the read
1. enable-test-read-disable operation n times, and that's a likely
y Jamie: That'll work, but you've got scenario. #3 tries to read the
to do more testing than that! sensor before it's been enabled ...
y Shakira: I know, I know. Here are that should produce an error
some other sequences I've come message off some kind,
ki d right?
i ht? #4
up with. enables and disables the sensor
y (She shows Jamie the following
and then tries to read it. Isn't that
sequences.) the same as test #3?
2. enable-test-[read]*-test-disable y Shakira: Actually no. In #4, the
3. [read]* sensor has been enabled. What #4
4 enable-disable-[test
4. enable disable [test | read] really tests is whether the disable
y Jamie: So let me see if I op works as it should. A read() or
understand the intent of these. #1 test() after disable()
goes through a normal life
CS350 Intro. to SE Spring 2008 82
should generate the error message.
If it doesn't, then we have an error
in the disable op.
y 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.
y Shakira: Not to worry. That's the
plan.

CS350 Intro. to SE Spring 2008 83


Debating Product Metrics (pg471-
(pg471-472)
y The scene: them was up to us.
◦ Vinod's cubicle. y Jamie: That's good, 'cause there's
y The players: no wayy 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
component level design and test y Ed: I agree with Jamie. We're up
case design. against it, here ... no time.
y The conversation: y Vinod: Yeah, I know, but there's
y Vinod: Doug g [[Doug
g Miller, software probably some merit to using them.
engineering manager] told me that y Jamie: I'm not arguing that, Vinod.
we should all use product metrics, It's a time thing ... and I for one
but he was kind of vague. He also don't have any to spare.
said that he wouldn't push the y Vinod: But what if measuring
matter ... using saves you time?

CS350 Intro. to SE Spring 2008 84


y Ed: Wrong, it takes time and like won't?
Jamie said ... y Jamie: So what are you proposing?
y Vinod: No, wait ... what if it saves y Vinod: I think we should select a
us time? few design metrics, probably class-
y Jamie: How? oriented, and use them as part of
y 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, y Ed: I'm not real familiar with class-
and that saves us from having to oriented metrics.
rework a part of the system, we y Vinod: I'll spend some time
save time. No? checking them out and make a
y 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? y (Ed and Jamie nod without much
y Vinod: Can you guarantee that it enthusiasm.)

CS350 Intro. to SE Spring 2008 85


Applying CK Metrics (pg483-
(pg483-484)
y The scene: y Shakira: Wasn't too complicated. I
◦ Vinod's cubicle. went back to my UML class and
y 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
component level design and test
case design. countt CBO.
CBO
y The conversation: y Jamie (smiling): You couldn't find

y Vinod: Did yyou guys


g y g get a chance the CRC model because I had it.
to read the description of the CK y Shakira: That's what I love about
metrics suite I sent you on this team, superb communication.
Wednesday and make those y Vinod: I did my counts . . . did you
measurements? guys develop numbers forf the CKC
metrics?

CS350 Intro. to SE Spring 2008 86


should
sho ld look for classes that ha
havee bad
y (Jamie and Ed nod in the affirmative.)
numbers in at least two or more of
y Jamie: Since I had the CRC cards, I
the CK metrics. Kind of two strikes
took a look at CBO, and it looked
and you're
you re modified
modified.
pretty uniform across most of the
yShakira (looking over Ed's list of
classes. There was one exception,
classes with high RFC): Look, see
which I noted.
this class? It's
It s got a high LCOM m
y Ed: There are a few classes where
well as a high RFC. Two strikes?
RFC is pretty high, compared with the
yVinod: 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
y Jamie: Maybe yes, maybe no. I'm still
same reason. Probably worth
concerned about time, and I don't
designing two separate classes to
want to fix
f stuff
ff that isn't really broken.
achieve the same behavior.
y Vinod: I agree with that. Maybe we
y Jamie: You think modifying it'll save
us ttime?
e
y Vinod: Over the long haul, yes.
CS350 Intro. to SE Spring 2008 87
Requirements Gathering for WebApps (pg518
(pg518--519)
y The scene: y Doug: I know, I know ... we're going
◦ Doug Miller's office. to outsource the development to a
y 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 of
◦ Vinod Raman
reusable
bl components. t
a member of the SafeHome software
engineering team; y Vinod: Hmmm. Okay ... then why
◦ three marketing people. am I here?
y The conversation: y Doug: To expedite things--they want
y 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. meett with
ith the
th various
i stakeholders
t k h ld
y Vinod: Whoa, Doug! We have no to gather some insight into basic
time to do that ... we're swamped requirements.
with product software work.
CS350 Intro. to SE Spring 2008 88
y Vinod (exasperated): Doug ... y Vinod: Right.
you're not hearing me ... we're y (Vinod meets with three marketing
maxed out timewise and this .... people
p p the following g day.)
y)
y Doug (interrupting): Just give it y 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, y Marketing person #1: Like I said,
function, you know, the usual drill. we want the user to be able to
y 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 making control panels, features and
my life any easier. functions, then get a "bill of
y Doug (smiling):
( ) That's why you materials" automatically generated,
get the big bucks. get pricing, and then purchase the
system via the Web site.

CS350 Intro. to SE Spring 2008 89


y Marketing person #2: We assume stuff is pretty straightforward.
that the user is a homeowner--not y Marketing person #1: We've got to
technical--so we need to guide him provide an 800 number for p
p people
p
or her through the process step by who don't want to do the
step. customization themselves.
y Marketing person #3: I'm not y Marketing person #3: I agree.
technical, but I'm worried about the y 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.
t ff presales activity, but let's hold on
y Vinod (addressing #3): Meaning? that for a moment. I have a few other
y Marketing person #3: The hard part fundamental questions.
is going to be guiding the user y 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 ee-commerce
commerce th process. A
the Any speciali l approach?
h?
CS350 Intro. to SE Spring 2008 90
y 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 data some TV and radio spots.
i validated
is lid t d b
before
f moving
i tto th
the y Vinod: What I mean is ... they'll
next step. always enter through the home
y Vinod: Have you checked that out page.
with
ith representative
t ti users?
? y Marketing person #3: That's what
y Marketing person #2: No, but I will. we'd like.
y Vinod: One more thing ... how does y Vinod: Okay, now we've got to get
a user find
f our site?
? to work. Let's explore the details off
y Marketing person #1: We're how you want to customize
working on an ad campaign that systems on-line.

CS350 Intro. to SE Spring 2008 91


Outsourcing Preliminaries (pg529)
y The scene: y Sharon (smiling): We do, but you
◦ Doug Miller's office. guys seem to have your act
y 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
f
functionality.
ti lit
an employee of e-CommerceSystems, the
outsourcing vendor for the SafeHome e- y Doug: Good. What else do you
commerce Web site and manager of the need?
Web engineering team that will be doing
y Sharon: The e-commerce
the work.
functionality is easy. The thing that
y The conversation:
worries me is the front end ... the
y Doug: Good to finally meet with
workk required
i d tto h
have th
the user
you, Sharon. We've certainly got customize the product pre-
some work to do over the next purchase.
month or so.

CS350 Intro. to SE Spring 2008 92


y Doug: Vinod gave you the basic knows it's critical .. said he'd e-mail
procedure, didn't he? it to me tomorrow morning.
y Sharon: He did, but I'd like to y Doug: g Okayy . . . look, I'd like to stay
y
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 to
descriptions for each sensor, get in your way, but....
pictures, pricing, y Sharon: Not a problem, we like to
interface/interconnection info, that keep our clients involved.
sortt off thing.
thi y Doug: I'll serve as liaison for this
y Doug: Did Vinod have time to do a project. All communication will
rough storyboard of the come through me or someone like
customization
t i ti process ffor you? ? Vinod that I appoint. Since
S we're on
y 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
side. He
CS350 Intro. to SE Spring 2008 93
y 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 y Doug:g Sure.
know it's a lot, but that's what I
think is appropriate.
y Sharon: That's okay.
y 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?
y Sharon
S ( f
(after studying the
schedule): Hmmm. I'm not sure
this'll work for us. Let me work up

CS350 Intro. to SE Spring 2008 94


Refining Use
Use--Cases for WebApps (pg543-
(pg543-544)
y The scene: Analysis modeling is almost
◦ Doug Miller's office. complete?
y The players: y Sharon ((smiling):g) We're making
g
◦ 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
manager of the outsourcing vendor's Web
customer service staff category.
engineering team for the SafeHome e- y Doug (looking at Sam): And you
commerce Web site have those now, Sam?
◦ Sam
S Ch
Chen
y Sam: I do. I've e-mailed them to
manager of the SafeHomeAssured.com
customer support organization. you, Sharon, and cc'd you, Doug.
y The conversation: Here's the hardcopy version. (He
hands sheets off paper to Doug and
y Doug: Glad to hear things are
Sharon.)
progressing well, Sharon.

CS350 Intro. to SE Spring 2008 95


y 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 when most of the pieces are
as a support tool when customers already in place on the Web.
phone in an order. Our phone reps y Sharon: Makes sense.
will complete all necessary forms, y (All parties read the use-cases [an
etc.
t andd process theth order
d ffor th
the example follows]):
customer. y Use-case: describe home layout
y Doug: Why not just refer the [note that this differs from the use-
customer
t to
t the
th Web
W b site?
it ? case of the same name for new
y Sam (smiling): You techies think customer category]
that everyone is comfortable with y I will ask the customer (via the
th Web.
the W b They're
Th ' not! t! Plenty
Pl t off phone) to describe each room of
people still like the telephone, so the house and will enter room
we have to give them that option. dimensions and other
characteristics
h t i ti on one bi big fform
CS350 Intro. to SE Spring 2008 96
designed specifically for customer We're going to need more detail.
support personnel. Once the house y Sam: What I meant was that we
data are entered I can save the don't need to walk our reps
p through g
data under the customer's name or the process like you do for an on-
phone number. line customer. One big form should
y Sharon: Sam, you've been kind of do the trick.
terse in your preliminary use-case y Sharon: Let's sketch out what the
descriptions. I think we're going to form should look like. The parties
need to flesh them out a bit. work to provide sufficient detail to
y Doug (nodding): I agree. allow Sharon's team to make
y Sam (frowning): How so? effective use of the use-case.
y Sharon: Well ... you mention "one
big form designed specifically for
customer support personnel."

CS350 Intro. to SE Spring 2008 97


Interface Design Review (pg569-
(pg569-570)
of view,
view and I have a bunch of
y The scene:
notes. I e-mailed 'em to Sharon
◦ Doug Miller's office.
[manager of the Web engineering
y The players: team for the outsourcing vendor for
◦ Doug Miller
the SafeHome e-commerce Web
(manager of the SafeHome software
engineering group) site yesterday.
◦ Vinod Raman y 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
y The conversation: p
important issues.
y Doug: Vinod, have you and the y 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
yp e-commerce
commerce interface prototype? interface, decent aesthetics,
y Vinod: Yeah ... we all went through reasonable layout. They've hit all
it from a technical point the important functions....

CS350 Intro. to SE Spring 2008 98


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

CS350 Intro. to SE Spring 2008 99


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

CS350 Intro. to SE Spring 2008 100


WebApp Testing (pg611)
y The scene: vendor] tells me they're testing as
◦ Doug Miller's office. we speak.
y The players: y Doug:g I'd like yyou 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)
y Vinod (grimacing): I thought we
◦ Vinod Raman
a member of the product software were going to hire a third-party
engineering team. testing company to validate the
y The conversation: WebApp. We're still killing
y Doug: What do you think of the ourselves trying to get the product
SafeHomeAssured.com e- software out the door.
commerce WebApp V0.0? y Doug: We're going to hire a testing
y Vinod: The outsourcing vendor's vendor for
f performance
f and
done a good job. Sharon security testing, and our
[development manager for the outsourcing vendor is already
testing Just thought another
testing.
CS350 Intro. to SE Spring 2008 101
point of view would be helpful, and y Doug: Good. But take the
besides, we'd like to keep costs in navigation paths all the way to their
line, so .. . conclusion.
y Vinod (sighs): What are you y Vinod (looking through a
looking for? notebook of use-cases): Yeah,
y Doug: I want to be sure that the when you select Specify the
interface and all navigation are SafeHome system you need,
solid. that'll take you to:
y Vinod: I suppose we can start with ◦ Select SafeHome components
the use-cases for each of the major ◦ Get SafeHome component
interface functions: recommendations
◦ Learn about SafeHome We can exercise the semantics of
◦ Specify the SafeHome system you each path
path.
need Purchase a SafeHome y Doug: While you're there, check
system out the content that appears at
◦ Get technical support each navigation node
node.
CS350 Intro. to SE Spring 2008 102
y Vinod: Of course . . . and the
functional elements as well. Who's
testing usability?
y 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 ..
y Vinod: I know, pass them along.
y Doug: Thanks, Vinod.

CS350 Intro. to SE Spring 2008 103


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

CS350 Intro. to SE Spring 2008 104


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

CS350 Intro. to SE Spring 2008 105


Establishing a Metrics Approach (pg653-
(pg653-654)
y The scene: y Vinod (frowning): We've never
◦ Doug Miller's office as the SafeHome done that before, and ...
software project is about to begin.
y Jamie (interrupting): And based
y The players: on the timeline management has
◦ Doug Miller been talking about, we'll never have
(manager of the SafeHome software
engineering team)
the time. What good are metrics
◦ Vinod Raman,
Raman Jamie Lazar anyway?
y y
members of the product software y Doug (raising his hand to stop
engineering team. the onslaught): Slow down and
y The conversation: take a breath, guys. The fact that
y Doug: Before we start work on this we've
' never doned it b
before
f iis allll th
the
project, I'd like you guys to define more reason to start now, and the
and collect a set of simple metrics. metrics work I'm talking about
To start,
start you
you'llll have to define your shouldn'tt take much time at all ... in
shouldn
goals. fact, it just might save us time.
y Vinod: How?

CS350 Intro. to SE Spring 2008 106


y Doug: Look, we're going to be y Doug (calmly): Jamie, an
doing a lot more in-house software engineer's work involves collecting
engineering as our products get data, evaluating it, and using the
more intelligent, become Web results to improve the product and
enabled, all that ... and we need to the process. Am I wrong?
understand the process we use to y Jamie: No, but ...
b ild software
build ft ... andd iimprove it so y 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 quality?
y Jamie:
J i But B t we're
' underd titime y Vinod: No one can argue against
pressure, Doug. I'm not in favor of high quality ...
more paper pushing ... we need the y Jamie: True ... but, I don't know, I
time to do our work,
work not collect data
data. still think this isn't necessary.

CS350 Intro. to SE Spring 2008 107


y Doug: I'm
D I' going i to askk you to
humor me on this one. How much
do you guys know about software
metrics?
y Jamie (looking at Vinod): Not
much.
y Doug: g Here are some Web refs ...
spend a few hours getting up to
speed.
y Jamie (smiling): I thought you said
thi wouldn't
this ld 't ttake
k any titime.
y Doug: Time you spend learning is
never wasted ... go do it and then
we'llll establish some goals
we goals, ask a
few questions, and define the
metrics we need to collect.

CS350 Intro. to SE Spring 2008 108


Establishing a Metrics Approach (pg664)
y The scene: y 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?
y Th players:
The l y Vinod: Our metrics should focus on
◦ Doug Miller
quality. In fact, our overall goal is to
(manager of the SafeHome software
engineering team)
keep the number of errors we pass
◦ Vinod Raman, Jamie Lazar on from one software engineering
members of the product software activity to the next to an absolute
engineering team. minimum.
y The conversation:
Th ti y Doug: And be very sure you keep
y 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
j t metrics?
ti ? ibl
possible.
y Vinod and Jamie: [Both nod] y Vinod (nodding): Of course.
y Jamie: I like DRE as a metric, and

CS350 Intro. to SE Spring 2008 109


I think we can use it for the entire amount of effort required to develop
project. Also, we can use it as we a use-case, the amount of effort
move from one framework activity required to build software to
to the next.
next It'll
It ll encourage us to find implement a useuse-case,
case and ...
errors at each step. y Doug (smiling): I thought we were
y Vinod: I'd also like to collect the going to keep this simple.
number of hours we spend p on y Vinod: We should,
should but once you
reviews. get into this metrics stuff, there's a
y Jamie: And the overall effort we lot of interesting things to look at.
spend on each software y Doug: I agree, but let's walk before
engineering
i i ttask. k we run, and stick to our goal. Limit
y 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
interesting.
y Jamie: I'd like to track some use-
case data as well. Like the

CS350 Intro. to SE Spring 2008 110


Estimating (pg 685)
y The scene: for the remaining increments.
◦ Doug Miller's office as project planning y Vinod (nodding): Okay, but we
begins.
haven't defined anyy increments yyet.
y Th players:
The l
y Doug: True, but that's why we
◦ Doug Miller
need to estimate.
(manager of the SafeHome software
engineering team) y Jamie ((frowning):g) You want to
◦ Vinod Raman, Jamie Lazar, other know how long it's going to take us?
members of the product software
engineering team.
y Doug: Here's what I need. First, we
need to functionallyy decompose
p the
y The conversation:
SafeHome software ... at a high
y Doug: We need to develop an
level ... then we've got to estimate
effort estimate for the project, and the number of lines of code that
then we
we've
ve got to define a micro
micro- each function will take ... then ....
schedule for the first increment and
a macro schedule

CS350 Intro. to SE Spring 2008 111


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

CS350 Intro. to SE Spring 2008 112


Outsourcing (pg 701)
y The scene: y Doug (shocked): When did this
◦ Meeting room at CPI Corporation. happen?
y The players: y Lee: We got a quote from an
◦ M
Mall Golden
G ld offshore developer.
de eloper 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
q to Doug g who
◦ Joe Camalleri
reads it.]
executive VP, business development;
◦ Doug Miller y Mal: As you know, Doug, we're
project
p j manager,
g software engineering.
g g trying to keep costs down, and 30
y The conversation: percentt is
i 30 percent.t BBesides,
id
these people come highly
y Joe: We're considering outsourcing
recommended.
the SafeHome software engineering
y Doug (taking a breath and trying
portion
ti off the
th product.
d t
to remain calm): You guys caught
me by surprise here, but before

CS350 Intro. to SE Spring 2008 113


you make a final decision, a few y Doug: It's likely that we'll release
comments? new versions of this product over
y Joe (nodding): Sure, go ahead. the next few years. And it's
y D
Doug: W haven't
We h 't worked
k d with
ith thi
this reasonable to assume that software
outsourcing company before, right? will provide many of the new
features, right?
y Mal: Right, but ....
y [[All nod.]]
y Doug: And they note that any
changes to spec will be billed at an y Doug: Have we ever coordinated
additional rate, right? an international project before?
y Joe (frowning): True, but we y Lee (looking concerned): No, but
expect that things will be I'm told ....
reasonably stable. y Doug (trying to suppress his
y Doug: A bad assumption, Joe. Joe: anger): So what you're telling me is:
Well, .... (1) we're
we re about to work with an
unknown vendor, (2) the costs to do
this are not as low as they

CS350 Intro. to SE Spring 2008 114


seem, (3) we're de facto committing risk averse, as I am.
to work with them over many y Joe (frowning): You've made a
product releases, no matter what few ggood ppoints, but yyou have a
they do on the first one, and (4) vested interest in keeping this
we're going to learn on-the-job project in-house.
relative to an international project. y Doug: That's true, but it doesn't
y [All remain silent.] change the facts.
y Doug: Guys ... I think this is a y 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 with you privately?
I can guarantee
t that
th t it won't't costt us y Doug: Sure ... I really do want to
much more ... the risk will be lower, be sure we do the right thing.
and I know you're all

CS350 Intro. to SE Spring 2008 115


Tracking the Schedule (pg 721)
y The scene: have trouble tracking progress.
◦ Doug Miller's office, prior to the initiation of y Vinod (a concerned look on his
the SafeHome software project.
face): Why? We have tasks
y The players: sched led on a dail
scheduled daily basis
basis, plent
plenty
◦ Doug Miller of work products, and we've been
(manager of the SafeHome software
engineering team)
sure that we're not over-allocating
◦ Vinod Raman,Jamie
Raman Jamie Lazar,
Lazar other resources.
members of the product software y Doug: All good, but how do we
engineering team. know when the analysis model for
y The conversation: the first increment is complete?
y Doug
D ( l
(glancing
i att a Powerpoint
P i t y Jamie: Things are iterative, so
slide): The schedule for the first that's difficult.
SafeHome increment seems y Doug: I understand that, but ... well,
reasonable, but we're
we re going to for instance,
instance take analysis classes
defined. You indicated that as a
milestone.

CS350 Intro. to SE Spring 2008 116


y Vinod: We have. y Doug: It shouldn't take more than
y Doug: Who makes that an hour to make the corrections ...
determination? everyone else can get started now.
y Jamie (aggravated): They're done
when they're done.
y Doug:g That's not ggood enough,
g ,
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? ?
y Jamie (frowning): Okay, back to
the drawing board.

CS350 Intro. to SE Spring 2008 117


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

CS350 Intro. to SE Spring 2008 118


y Doug: That's okay. We'll revisit the y 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 likelihood do the writing, we'll call out one
that the risk will occur. Then, assign entry from your list in round robin
an impact to the project on a scale format.
of 1 (minor) to 5 (catastrophic). y (Fifteen minutes pass; the list is
y Vinod: So if I think that the risk is a created.)
coin flip, I specify a 50 percent y Jamie (pointing at the board and
likelihood, and if I think it'll have a laughing): Vinod, that risk (pointing
moderate
d t projectj t impact,
i t I specify
if a toward an entry on the board) is
3, right? ridiculous. There's a higher
y Doug: Exactly. likelihood that we'll all get hit by
y (Five
( minutes pass; everyone is li ht i
lightning. W
We should
h ld remove it it.
writing.)

CS350 Intro. to SE Spring 2008 119


y Doug: No, let's leave it for now. We
consider all risks, no matter how
weird. Later we'll winnow the list.
y Jamie: But we already have over
40 risks ... how on earth can we
manage them all?
y 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.
i d

CS350 Intro. to SE Spring 2008 120


SQA Issues (pg 758-
758-759)
y 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 requirement.
y Th players:
The l y Doug: That's really good, but we're
◦ Doug Miller
not going to wait until testing to
(manager of the SafeHome software
engineering team)
evaluate quality, are we?
◦ other members of the software y Vinod: No! Of course not. We've got
engineering team. reviews scheduled into the project
y The conversation: plan for this software increment.
y Doug: I know we didn't spend time We'll begin quality control with the
developing an SQA plan for this reviews.
project, but we're already into it and y Jamie: I'm a bit concerned that we
we have to consider quality ... right? ? won't have enough time to conduct
y Jamie: Sure. We've already all the reviews. In fact, I know we
decided that as we develop the won't.

CS350 Intro. to SE Spring 2008 121


y Doug: Hmmm.
Hmmm So what do you propose? y Vinod: What do you want us to do do,
y Jamie: I say we select those elements Doug?
of the analysis and design model that yDoug: Let's steal something from
are most critical to SafeHome and Extreme Programming [Chapter 4].
review
i th
them. W 'll d
We'll develop
l th the elements
l t off each
h
y Vinod: But what if we miss something in model in pairs--two people--and
a part of the model we don't review? conduct an informal review of each as
y Shakira: I read something about a we ggo. We'll then target
g "critical"
sampling technique [Section 26.4.4] that elements for a more formal team
might help us target candidates for review, but keep those reviews to a
review. (Shakira explains the approach.) minimum. That way, everything gets
y J i Maybe
Jamie: M b ... b butt I'I'm nott sure we looked at by more than one set of eyes
eyes,
even have time to sample every element but we still maintain our delivery dates.
of the models. yJamie: That means we're going to
have to revise the schedule.
y Doug: So be it. Quality trumps
schedule on this project.

CS350 Intro. to SE Spring 2008 122


SCM Issues (pg 786
786--787)
y 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.
y Th players:
The l y Jamie: We've been pretty informal
◦ Doug Miller
about change management on past
(manager of the SafeHome software
engineering team)
projects.
◦ Vinod Raman, Jamie Lazar, other y Doug: I know, but this is bigger and
members of the product software more visible, and as I recall ...
engineering team.
y Vinod (nodding): We got killed by
y The conversation: uncontrolled changes on the home
y Doug: I know it's early, but we've lighting control project ... remember
got to talk about change the delays that ...
management
management. y Doug (frowning): A nightmare that
y Vinod (laughing): Hardly. I'd prefer not to relive.
Marketing called this morning y Jamie: So what do we do.

CS350 Intro. to SE Spring 2008 123


y Doug: As I see it, three things. First for all of our work products.
we have to develop--or borrow--a y Vinod: They're called SCIs in this
change control process. context, and most g good tools
y Jamie: You mean how people provide some support for that.
request changes? y Doug: That's a good start, now we
y Vinod: Yeah, but also how we have to ...
evaluate the change, decide when y 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 y Doug g ((smiling):
g) Third--we've all
affected by the change. got to commit to follow the change
y 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.
y Jamie: We can build a database

CS350 Intro. to SE Spring 2008 124

You might also like