Introduction To Software Engineering Lecture 4
Introduction To Software Engineering Lecture 4
CS 473 EX
March 5, 2016
Learning Objectives
Upon successful completion of this course, you will be prepared to:
Engineering
Management
UML
Git
ISO
Test Essentials
Faults & Failures
Cost Of Delay
Black Swan
Requirements
Pivotal
Version
One
Rally
Backlog Grooming
5/20 Rule
Story Points
Architecture
Asset Library
Motivation
Peer Reviews
Estimation
Continuous
Delivery
SW Tools
Evaluation
Agile Manifesto
Scrum
CMM
Regression
Cone Of Uncertainty
Software Process
Configuration
Management
MVC
Unit Test
Process Improvement
MET
CS473
Principles
Process has no goal in itself
Process
Improvement
Process
A Glue. A Heart bit. A Librarian. Architecture
Data-driven design
Test
Essentials
Unit
Test
Deployment pipeline
Continuous
Delivery
Globalization
Offshoring
Taxonomy
Requirements
Backlog
Grooming
Engineering
Management
Software
Configuration
Management
2
4
Estimation
Identification , Control,
Auditing, Reporting
Precision equal to accuracy
Software
Design
Agile
SW Tools
Evaluation
Peer
Reviews
MET
CS473
Responsibilities
Find the shortest path
Separate released from drafts
Unit
Test
Continuous
Delivery
Requirements
Backlog
Grooming
Process
Improvement
Engineering
Management
Process
Architecture
Test
Essentials
Globalization
Offshoring
Taxonomy
2
4
Software
Configuration
Management
Estimation
Control changes
Retain historical estimates
Software
Design
Agile
SW Tools
Evaluation
Peer
Reviews
Split
Ask for and provide comments
Taxonomy
Reusability: can use parts of the design and implementation in other applications
Here are several examples to illuminate the key concept of Low Coupling and High Cohesion.
Example. A Building.
Suppose you are an architect requested to construct a building of five apartments with a
single thermostat in a basement. The first floor is occupied by an elderly gentleman who
always feels chilly and needs to raise the temperature. The fifth floor is taken by a pregnant
woman who frequently opens a window so not to feel hot. How do you reconcile these two
requirements? Apparently, there is a problem as both apartments are tied together and
dependent on each other. This clearly violates the design principle called "low coupling".
According to this principle, software components should be able to run independently and
not to hinder each other's operation.
Continuing with this metaphor, each apartment has a bedroom and a living room. The key
function of a bedroom is to provide a quiet place to sleep. The key function of a living room is
its ability to watch television. Now imagine the third floor occupied by a wife and a husband,
where they placed a television right into the bedroom. This would clearly violate the "high
cohesion" principle, as the wife watching the television prevents the husband from sleeping.
The component called "bedroom" started performing both functions, instead of performing a
single function only. And the component called "living room" has abandoned its predefined
functionality all together.
Requirements
(b)
Traceability
Matrix
Test Cases
(c)
Project
Tracking (d)
(Mary) As a developer, I can speak first-hand about the importance of loose coupling. The system I inherited when I started
working at my current company centered around one large program. This was a Micro Focus COBOL application, so the idea of
classes does not apply, but the concepts are the same. For those unaware, COBOL is a procedural language as opposed to objectoriented and Micro Focus is a company that allow for open-systems (non-mainframe) development of COBOL applications. Generally
speaking, there would be an executable program (*.exe) that would call various subprograms (*.dll). This is the same architecture
used in many programming languages.
So, we had a main driver program (exe) that called a dll that performed most of the logic for the entire system. That program was
called zwimage.dll. Zwimage contained logic for almost every feature in our system. If I needed to change our faxing functionality
and another developer needed to alter our printing functionality, we would both need to change zwimage. Lets say that I made a
coding error (very unlikely, I know!) while changing the faxing logic. That error may be found by users invoking a totally different
feature. It made testing efforts long and painful, implementations difficult, and debugging very time consuming. The system was
very tightly coupled.
We underwent a project many years ago to decouple zwimage. It was a tough sale to the business since there was no direct business
benefit to this project. It was approved based on the promise that it would make development faster and cleaner in the future. Of
course, it certainly did. Now, we have a faxing dll, a printing dll, an email dll, etc. Each feature and function of our system is
encapsulated within its own dll. Now, development truly is faster, more efficient and less error prone. Testing is easier for our users
and troubleshooting it generally pretty straight forward.
(John) You bring up classic example of coupled software developed earlier with tools like COBOL; we had similar experience with
one of the software product. It is always hard to sell software improvements to business, especially, if it does not add new feature
(Peter) You make a great point about sharing code across multiple teams and reuse in code.
There is a principle in software development called DRY (Don't Repeat Yourself), which when you think about it is amazingly obvious.
Basically it says (and this works better for OOP than older procedural coding styles) if you have code, logic, etc. that can be
centralized and reused, you should try to if at all possible. The value in this is not overly evident at first glance but put into the
perspective of your company's XML reader makes it easy to see.
If you've never read The Pragmatic Programmer (http://en.wikipedia.org/wiki/The_Pragmatic_Programmer), the book coining this
term, it's a great quick read.
Here are several examples of students' submissions of previous semesters. It has been
agreed to re-use these examples to enhance the learning of future classes. These
examples are initial attempts of UI design. Corresponding comments are offered. Several
examples are done by students who are professional developers currently working in the
industry.
(3) An unusual color schema will be most certainly unloved by many users.
During review, the author was asked as to why he picked this color?
His response was Which color?
Apparently he did not pay any attention to the color.
(6) Fields are not grouped into logical affinities and look randomly dropped on a screen
that is too large for its own purpose. UI is done by a novice software developer not
UxD. Another student looking at it made a comment this UI gives me a headache, as I
am trying to follow its logic and I could not find one.
User-Centered Design
The design is based upon an explicit understanding
of users, tasks and environments. Users are
involved throughout design and development. The
design is driven and refined by user-centered
evaluation. The process is iterative. (Wikipedia)
Jesse James Garretts The Elements of User Experience: User-Centered
Design for the Web and Beyond (2nd Edition)
Is it clear why do we
a)
The good news that UML is a well-controlled entity. Its latest version number is 2.5.
Here is a link to a great educational site elaborating on UML.
http://www.uml-diagrams.org/class-diagrams-overview.html
There are two types of a diagram,
Behavior (Dynamic: use cases, state transitions, sequence)
Structure (Static: class, object, component)
The book by Doug Rosenberg, titled "Use Case driven Object Modeling with UML" has the
following pictorial as a thread. Each diagram on the pictorial is described in great length in a
corresponding chapter. The transition from Dynamic to Static modeling does advance the
process from "What" to "How". A development project starts with GUI Prototype, not as we
do in our course starting with Definition of Personas.
The following pictorial explores the iterative nature of "from What to How", as this order
is preserved at each stage of product evolution.
Users Needs
System
Requirements
System
Design
Software
Requirements
Software
Design
Diagram below shows an example of an OnlineShopper class, from Eric Braude. Note
that the transition from one state to another is accompanied by relevant conditions and
actions.
Example below from Eric Braude Chapter 20 - highlights several common "defects" within a
state transition diagram. For example, condition "player ready to proceed" is not specific
enough, as it does not respond to a question ... what needs to be accomplished in order to
advance from Engaging state into Waiting state.
Creation of a state transition diagram usually precedes the documentation of fields and
reports. It is common that the initial diagram is far too complicated to be supported within
a given timeframe and has to be trimmed down. A common defect reported during a peer
review of a state transition diagram is that there are no fields to support a given state or a
given condition. Note that example below has states "Unassigned" and "Unclear Test" that
appear redundant.
Use Cases
Use case diagramming is a great method for capturing relevant scenarios and defining the
system boundaries. Those use cases and actors that are outside of the defined rectangular
are not a part of the current release. It demonstrates that a project is well-controlled, since
the next release is defined, not just the current release.
There is no one-to-one mapping between use cases and requirements. They create two
different angles; both of these angles are important.
Test cases must cover all requirements and key points of use cases
There could be many effective test cases that do not have a corresponding directlytraceable requirement
Actors could be human and non-human
Auditor
Audit
Use Case
Detailed
Template
Figure 12.9 of Eric Braude shows five different ways to organize requirements
Components Diagram
As you have a Component Diagram as one of your in-process deliverables, it is important
not to over-engineer it and not to make it too complicated. Visio or Power Point are
perfect. Each box is a component. A brief two-line description as to what each component
does.
For a peer review system, a Database could be a perfect component, where you keep
snippets along with comments. UI - as another components with all drop downs and radio
buttons. You should have a Controller component with business rules.
In an ideal world, you assign to each team member - a separate component. In any case,
each team member is expected to have a piece of code to his/her name.
Here is the link to UML definition site, specifically to the page with Components. Although
the diagrams there are complicated and there is no need to replicate their exact notations.
How to Beat
Black Swans?
Taxonomy
System Interconnectivity Diagram
Application Registry
https://insights.sei.cmu.edu/sei_blog/2014/06/a-generalized-model-for-automated-devops.html
Tools Development
Development of tools should be treated as a well-managed activity, with all traditional
attributes of a development project. It should report its progress in the same manner as
other development projects. The goal of this project is to provide required connectivity
between tools. See example
diagram.
The evolution of Clear Quest
is tracked as it is connected
with other entities. For
example QTP logs defects
automatically into the Clear
Quest.
Tools Tracking
The purpose of this enterprise repository is to facilitate convergence on a limited number of
tools used throughout the organization, so to take advantage of the economy of scale.
A version of each tool is tracked along with its corresponding features. Each version is labeled
with three possible tags,
recommended
restricted
non-restricted
For example, Microsoft Project on this diagram is "non-restricted" from supporting the
Program Management process. Although, Rally is the tool of choice that is "recommended"
for this process.
Looking at the diagram, among five tools that could possibly be used for Code Control, only a
single tool (AccuRev) is "recommended". Apparently, some parts of an organization, are using
the legacy versions of the other four tools. The step-by-step transition toward the single code
control tool is in the works.
There are four tools that are used throughout an organization for peer reviews. Only one of
them is "recommended". Maintaining comments from peer reviews in AccuRev is restricted.
There are seven tools on the list that are "recommended" for a unit test. Apparently the unit
test process has multiple environment that have to be supported by a variety of tools.
Legend:
recommended
non-restricted
restricted
Tools Categories
Tools Category
Social Media
Both these organizational processes (Social Media and Process Library) along with their corresponding
tools, should be harmonized. The goals of Social Media and Process Library do overlap. Unless we clearly
define the distinction and scope of each tool, they might enter into a conflict and ultimately result in a
waste of resources. The table juxtaposes several dimensions of each process, by focusing on a Key
Purpose of each one.
Apparently, if the overlap between these processes is significant, the result is a waste of resources. Here
are several common scenarios.
Scenario. People are engaged in a prolonged discussions during a peer review. Result is
inconsequential, as no defects are documented.
Action. Suggest to shift the topic into Social Media where such discussions are more appropriate.
Scenario. A document is distributed through Social Media for review. Everyone receives a link. The
official released version in process library has never been established.
Action. Position the document into the WIP area of the process library. Schedule a peer review to
advance the doc into the Released area of process library
supports SOA
avoids redundancy
maintains the list of versions and features of all applications
promotes reuse
enables the management of assets in a most effective manner
Selection Criteria
Selection criteria could contain the following items. Each item is weighted and
evaluated from two angles.
1. Completeness Of Solution
2. Quality of Solution
3. Flexibility of Architecture
4. Scalability
5. HW & SW Platforms
6. Connectivity to Others
7. Usability
8. Market Share and Company
9. Length of Operation
10.Future Prospects
11.Current Organization Adoption
12.Cost
Magic Quadrant
Magic Quadrant is commonly used by various market research firms to
juxtapose several vendors and their features. Gartner regular reports
including Magic Quadrant - are an industry standard for disseminating
valuable information and preparing companies to an unexpected market
moves.