CS 340 midterm 2
What are validation and verification? How are these processes different?
ANS✔✔ The main purpose of validation and verification is to improve
software quality.
Validation aims to answer the question: Have I build the right product (Does
the product meet the needs?). Performed at a higher level than verification.
Requirements testing and architectural reviews.
Verification: Have I built the product right? Verification is to use examination
and objective evidence to determine that a specified requirements have been
fulfilled. Might use intermediate requirements
What is a software defect? What is the relationship between defects and
software quality? ANS✔✔ Broadly can be thought of as some sort of error in
your product. 4 Levels of defect severity:
Level 1: Critical defect that results in total stoppage of usage; no workaround.
Level 2: Major defect that affects some major functionality or major data. There
is a workaround but is not obvious and difficult.
Level 3: Minor defect that affect some minor functionality or non-critical data.
Typically have an easier workaround.
Level 4: Trivial defects that don't really affect functionality or data. They don't
need a workaround, just cause an inconvenience.
What are the different mechanisms for measuring the size of a software
project? What are their benefits and drawbacks? ANS✔✔ Lines of code is the
primary metric for measurement of program size. This has a major issue in
that it is hard to compare projects that use different languages; some languages
perform the same functions in a different amount of lines. Within a language,
,lines are fairly consistent, with light variance based on each person's coding
habits. Another issue is should whitespace and brackets be counted?
For each customer requirements, assign a number of points to them, and add
them up as they are integrated. This is better for multi-language projects but
the amount of points is still subjective.
Understand and be able to discuss the major conclusions from Casper Jones'
survey on software quality. ANS✔✔ Had 3 Metrics:
Defect potentials: Total number of different types of errors in the software
Defect discovery Efficiency: % of defects discovered before release.
Defect Removal Efficiency: % of defects removed before release.
The study found that it is necessary to predefine things such as cost-per-defect,
in what way to quantify defects, and how to measure software quality.
Having these definitions prior to starting a project, allows for high-quality
software to be written from the start, which leads to fewer defects and less cost-
per-fix.
Analysis of types of defects and cost-per-fix results from this, providing quick
information about project overview.
Understand the Apple SSL security vulnerability that we discussed in class.
How could Apple have prevented this vulnerability? ANS✔✔ The
vulnerability stemmed from a bug that was located in the SSL layer of iOS 6.0,
that allowed Man-in-the-middle attacks. The bug was caused by an extra goto
statement. This would have been caught if the code was reviewed by others for
consistency.
What is static analysis? What are its advantages and limitations? ANS✔✔
Static Analysis are a set of tools that allow improving code with little effort.
, They are run on the source code, like a compiler. It should not replace
traditional testing, but can heavily supplement existing tests and provide
suggestions for improvements.
It has the advantages of a user not needing to know the intricacies of the
source code to be able to run them and get suggestions. It can catch things such
as syntax errors or unused variables.
There are some disadvantages that prevent it from being an all-purpose tool.
Since it is not run at runtime, it cannot detect issues that would arise from
input, or from misuse of pointers. It also does not detect performance or
memory errors.
Understand the meaning of the quote 'program testing can be used very
effectively to show the presence of bugs but never to show their absence.
ANS✔✔ This quote refers to how certain assumptions are made by
programmers when writing code, such as if multiplication works properly.
This sort of thing COULD be tested, but would take an inordinate amount of
time. This means that for as much testing as we can do, it would not be enough
to cover all ground, and we simply have to assume certain things work based
on smaller samples.
What are the benefits of using testing to improve software quality? ANS✔✔
Testing can reveal the presence of errors
Can find bugs that would result in expensive fixes if they were to be left in
before release.
Can catch unexpected issues that arise due to code refactoring. If one refactors
a low-level function under a different set of assumptions, testing may be able to
catch resulting unexpected behavior or usage under the scope of the modified
underlying assumptions, therefore catching cascading issues before they affect
higher-level code.
Les avantages d'acheter des résumés chez Stuvia:
Qualité garantie par les avis des clients
Les clients de Stuvia ont évalués plus de 700 000 résumés. C'est comme ça que vous savez que vous achetez les meilleurs documents.
L’achat facile et rapide
Vous pouvez payer rapidement avec iDeal, carte de crédit ou Stuvia-crédit pour les résumés. Il n'y a pas d'adhésion nécessaire.
Focus sur l’essentiel
Vos camarades écrivent eux-mêmes les notes d’étude, c’est pourquoi les documents sont toujours fiables et à jour. Cela garantit que vous arrivez rapidement au coeur du matériel.
Foire aux questions
Qu'est-ce que j'obtiens en achetant ce document ?
Vous obtenez un PDF, disponible immédiatement après votre achat. Le document acheté est accessible à tout moment, n'importe où et indéfiniment via votre profil.
Garantie de remboursement : comment ça marche ?
Notre garantie de satisfaction garantit que vous trouverez toujours un document d'étude qui vous convient. Vous remplissez un formulaire et notre équipe du service client s'occupe du reste.
Auprès de qui est-ce que j'achète ce résumé ?
Stuvia est une place de marché. Alors, vous n'achetez donc pas ce document chez nous, mais auprès du vendeur Schoolflix. Stuvia facilite les paiements au vendeur.
Est-ce que j'aurai un abonnement?
Non, vous n'achetez ce résumé que pour €13,68. Vous n'êtes lié à rien après votre achat.