software engineering collection 4
impact
воздействие, влияние
arguably
возможно, вероятно, пожалуй
incremental
возрастающий, увеличивающийся
recovery
восстановление
encountered
встречается
advantageous
выгодно
to single out
выделять (отбирать), отбирать, изолировать
to single out
выделять, изолировать
challenge
вызов
execution
выполнение
to issue
выпускать, выдавать, издавать
to convey
выражать, передавать (мысль)
agile
гибкий
lump
глыба, ком, крупный кусок, совокупность
Validation
"Are we building the right product?" Is this product actually what the client wants?
Why Agile?
"Deliver useful software quickly." Have a working copy of the system at all times. Deliver function in small increments. Require only a reasonable and manageable amount of effort from the development team.
Name some ways VCS systems help in software development.
- Keep records of changes - Allow collaborative development - Know who made changes to what - Revert changes - Build/release management
bottleneck
горлышко бутылки
to grain
гранулировать
glyph
графический элемент, образ, графический символ, изображение символа шрифта
additional
дополнительный
to augment
дополнять, увеличивать, усиливать, расширять
sufficient
достаточно
achieve
достигать
Software Quality Measurements
1. Sufficiency 2. Robustness 3. Reliability 4. Flexibility 5. Efficiency 6. Scalability 7. Re-usability 8. Security
Balking
Only execute an action on an object when the object is in a particular state. No N/A
process and products
Monitoring ______ and _____ throughout the software development lifecycle to ensure the quality of the delivered products
Class Aggregation
More specific kind of relationship. "has-a-relationship" or "is a part of relationship". The part can exist independent of the whole. Empty diamond
Class Association
Most generic kind of relationship. ie. "instructor <teaches a> class"
Reuse.
Most modern software is constructed by reusing existing components or systems. When you are developing software, you should make as much use as possible of existing code.
Debuggers
Most native code debuggers support stepping through assembly language code when no source code is available The debugger usually shows the state of the CPU's registers and a memory dump, usually showing the currently active stack area
Elements of the Observer Pattern
Name: Observer Description: Separates the display of an object state from the object itself Problem Description: Used when multiple displays of data are needed Solution Description: See UML Description Consequences: Optimizations to enhance display performance are impractical
Symmetrical Tonic Neck Reflex (STNR)
Neck in flexion, UE flex and LE extend; Neck in extension, UE extends and LE flexes Integrated at 4-6 months Issue: bunny hop crawl
Why do we need requirements?
Need to know what features to focus on, what we don't need to worry about
DSDM Principle 4
Never Compromise Quality
Muscle Tone Development
No tone, some tone with no control, some tone with some control, etc.
(McCall's Quality Factors) Efficiency
The amount of computing resources and code required by a program to perform its function.
(ISO 9126 Quality Factors) Reliability
The amount of time that the software is available for use as indicated by the following subattributes: maturity, fault tolerance, recoverability.
Change Preventers
- changes that require you to make changes elsewhere too -- shotgun surgery: modification that requires many small changes in multiple classes (7,8)
What is code smell?
- clear signs that your design is starting to decay - certain structures in the code that suggest the possibility of refactoring
Couplers
- excessive coupling between classes -- feature envy: method accesses data of another classes more than its own data (1, 7) -- inappropriate intimacy: class uses external fields and methods of another class (7,8)
OO Abusers
- incomplete or incorrect application of object oriented programming -- refused bequest: subclass that uses only some of the inherited fields and method, unused methods are redefined to do nothing (4,5) -- switch statements: complex switch operation or sequence, which indicates missing hierarchy (6)
to concern
заботиться, беспокоиться, относиться, заниматься
task "you are not afraid of taking on difficult tasks or ventures that call for skillful manoeuvres"
задача
conceived
задуманный
terminal
заключительный, окончательный, периодически повторяющийся
surrogate
заместитель, замена, заменитель
to surrogate
замещать, заменять
scheduled
запланированное действие
query
запрос
salary
зарплата
to shield
заслонять, защищать, прикрывать
to concern
затрагивать, касаться
grain
зерно, гранула
value "your support is of great value"
значение стоимость
thereof
из этого, из того, этого, того, в следствии того
to pose
излагать, формулировать
to vary
изменяться, отличаться, расходиться
mortgage
ипотека
utilize
использовать
in-depth
исчерпывающий, доскональный, тщательный
customer
клиент, покупатель
crucial
ключевой; критический, решающий
peer review
коллегиальная оценка
trade-off
компромисс
certainly
конечно, безусловно
particular "the action seems to discriminate against a particular group of companies"
конкретный
ascertaining
констатация
whether
который
succinct
краткий, сжатый, лаконичный
steep
крутой
scalability
масштабируемость
trade-off
мена, обмен, компромисс, уступка (в ответ на уступку другой стороны)
fewer
меньше, меньшее количество
machinery
механизм
to litter
мусорить, настилать соломку
gaining
набирает
reliable
надёжный
worst
наихудший, злейший
slant
наклон, уклон
hint
намек, совет
novice
начинающий, новичок, новобранец
drawback
недостаток
flaw "fatal flaw, flaw detection, tragic flaw" "the computer game was flawed by poor programming"
недостаток изъян ошибка
inevitably
неизбежно, неминуемо
ensuring
обеспечение, гарантирующий
fashion
образ, вид, конфигурация
to commit to
обязываться к, взять на себя обязательство о, связывать себя обязательством с
constraints
ограниченный
to lend
одалживать, давать взаймы, давать, придавать
acceptance
одобрение
definition
определение
certain
определенный
define
определять
defined
определённый, оговорённый, описанный
responsible
ответственность
Information Hiding
The private keyword is used to keep all data hidden. But what if I want to access, or to change, the value outside of a class? We define special methods, getters and setters Only define getters and setters if you need them!
Authentication
The process through which a DBMS verifies that only registered users can access the database.
Re-engineering cost factors
The quality of the software to be re-engineered The tool support available for re-engineering The extent of the data conversion which is required The availability of expert staff for re-engineering
to banish
отгонять (мысли), прогонять, изгонять, ссылать, высылать
enclosure
отгораживание, обособленность
repercussion
отдача, отражение, последствие, ответное действие
to defer
откладывать, отсылать далее
deviation
отклонение
to deviate from
отклоняться от
relative
относительный
pay-off
отплата, выплата, компенсация
lack
отсутствие
coverage
охват (покрытие)
assesses
оценивает
evaluations
оценки
apparent
очевидный
batch
партия, пакетный, периодический
transition
переход
dense
плотный, густой, сжатый, частный
behavior
поведение, образ действий, поступки
agenda
повестка дня
to recur
повторяться, происходить вновь
iterative
повторяющийся
at hand
под рукой, близко
to accommodate
подгонять, приспосабливать
spurious
поддельный, фальшивый, фиктивный, подложный, ложный
to favor
поддерживать, оказывать предпочтение
to imply
подразумевать, значить
confirm
подтвердить
approaches
подходы
derive "they derived great comfort from this assurance"
получать
benefit
польза, выгода
attend
посещать
thereafter
после этого, впоследствии
sequence
последовательность
affected
пострадавших
therefore
поэтому, таким образом, следовательно
appears
появление
contradictory
прoтивopeчивый
proper "she's never had a proper job" "my eyes were all blurry and I couldn't see proper"
правильный надлежащий
dedicated
преданный, убежденный
to foreshadow
предзнаменовывать, предвещать, предрекать
offer
предлагает
to furnish with
предоставлять, снабжать, оснащать
assumption
предположение
predict
предсказать
neglect
пренебрежение
to lessen
преуменьшать, недооценивать, уменьшаться, сокращаться
to recur to
прибегать к, возвращаться к (мысленно, в речи)
to lend to
придавать, оказывать, давать взаймы, быть пригодным (подходящим) для чего-л.
applied
прикладной отправлять резюме
acceptance
принятие
gained
приобрести
to gear to
приспосабливать к, согласовывать с, ставить в зависимость от
issue
проблема выпускать, выдавать что-то (напр. документ)
to carry out
проводить, выполнять, выносить, исполнять, осуществлять
performance
производительность
to derive
происходить
to derive from
происходить от, получать (выводить) из
occur
происходить, случаться
to prescribe
прописывать, устанавливать, ограничивать, заключать в рамки
to leave out
пропускать, не включать, не учитывать, упускать, исключать
traceability
прослеживаемость
easiest
простой
passes
проходит
durable
прочный
immediate
прямой, непосредственный, следующий (за чем-л.) непосредственно, безотлагательный
item "the items on the agenda"
пункт параграф
evolve
развиваться, эволюционировать
to discern
разгадать, понять, отличать, разглядеть
to demarcate
разграничивать, разделять, размежёвывать
partitioning
разделение
divided
разделенный
proliferation
размножение, разрастание путём новообразований, распространение (знаний и т.п.)
sanity
разумность, здравомыслие, благоразумие
framework
рамки, структура, основа
arrangement
расположение, систематизация, соглашение, договорённость
to scatter
рассеивать, разбрасывать, раскидывать, размещать, распространять
investigate
расследовать, исследовать
consider
рассматривать
decision
решение
solution
решение
to gamble
рисковать, делать ставку, держать пари
failure "an economic policy that is doomed to failure" "symptoms of heart failure"
сбой недостаточность провал
related
связанный, родственный
thereby
следовательно, тем самым, таким образом
corollary
следствие, заключение, вывод результат
sophisticated
сложный
occurring
случающийся
to lump
смешивать, валить всё в одну кучу, рассматривать в целом (не вдаваясь в подробности)
to accommodate with
снабжать, обеспечивать
to aggregate
собираться в одно целое, объединяться, сосредотачиваться, приобщаться
to respect
соблюдать, касаться, иметь отношение к
assistance
содействие, помощь
to make up of
составлять из
to make up
составлять, придумывать, выдумывать
state
состояние
employee
сотрудник наемный работник
scope
список задач
ability
способность, умение
contribute
способствовать
worthwhile
стоящий, дельный, значимый, дающий результат
essentially
существенным образом
substance
существо, сущность, вещество
esoteric
тайный, скрытый, посвящённый, известный (понятный) лишь посвящённым
thus
таким образом, тем самым
fail
терпит неудачу
maintenance
техобслуживание
precise
точный
requirements
требования
coach
тренер
thoroughly
тщательно, основательно
overhaul
тщательный осмотри, изучение, пересмотр
confident
уверенный в себе
guessing
угадывать
improve
улучшать, совершенствовать
skill "difficult work, taking great skill"
умение навык
reduce
уменьшать
pertinent
уместный, подходящий, имеющий отношение
efforts
усилия
success
успех
establish
установить
robust to
устойчивый к
approves
утверждает
retirement
уход на пенсию, отставка
impair
ухудшать
participants
участники
to factor into
учитывать в, включать в рассмотрение о
insidious
хитрый, коварный, действующий тайно
objective
цель, задача
purpose
цель, намерение
fraction
частица, крупица, фрагмент
well-defined
четкий
shield
щит, защитное средство
efficient
эффективный
Agile Software Development
• "Agile Manifesto" 2001 "Scrum" project management + Extreme programming engineering practice Build software incrementally, using short 1-4 week iterations -Keep development aligned with changing needs
Scrumm
• "Process skeleton" which contains a set of practices and predefined roles - ScrumMaster (maintains processes) - Product Owner (represents the business) - Team (Designers/developers/testers) • At each point: - User requirements go into prioritized backlog - Implementation done in iterations or sprints
Why Some Programmers Resist Pairing?
• "Will slow me down" - Even the best hacker can learn something from even the lowliest programmer • Afraid to show you are not a genius - Neither is your partner - Best way to learn
When is a Story done?
• "done" means: - All tasks completed (dev, test, doc, ...) - All acceptance tests running - Zero open defects - Accepted by product owner
Accounting Software
• I need an accounting software using which I can create a named account, list accounts, query the account balance, and delete an account. • Analyze the CEO's statement and create some user stories
Tasks
• If a story has too many tasks: break it down • Team assigns cost to tasks - We care about relative cost of task/stories - Use abstract "units" (as opposed to hours, days) - Decide what is the smallest task, and assign it 1 unit - Experience will tell us how much a unit is - Developers can assign/estimate units by bidding: "I can do this task in 2 units"
Continuous Integration
• Integrate your work after each task. - Start with official "release" - Once task is completed, integrate changes with current official release. • All unit tests must run after integration • Good tool support: - Hudson, CruiseControl, Travis
Simplicity
• Just-in-time design - design and implement what you know right now; don't worry too much about future design decisions • No premature optimization - You are not going to need it (YAGNI) • In every big system there is a simple one waiting to get out
History
• Kent Beck - Influential book "Extreme Programming Explained" (1999) • Speed to market, rapidly changing requirements • Some ideas go back much further - "Test first development" used in NASA in the 60s - Is this surprising?
Objectives of Reverse Engineering
To recover lost information To facilitate migration between platforms To improve or provide documentation To provide alternate views To extract reusable components To cope with complexity To detect side effects or ripple effects To reduce maintenance effort To steal other's work
Different types of refactoring
1. extract method 2. extract class 3. introduce parameter object, stored field, or whole object passed as parameter 4. extract superclass 5. replace inheritance with delegation 6. inheritance hierarchy 7. move method 8. move field 9. extract superclass 10. collapse hierarchy 11. move in-line class
What activities take place during requirements elicitation and anaylisis
discovery classification and organization prioritization and negotiation specification
Flyweight
A fine-grained instance used for efficient sharing
What is a legacy system?
A legacy system is a piece of software that you have inherited and that is of value to you.
Schema
A logical grouping of database objects such as tables, indexes, views, and queries, that are related to each other. Usually a schema belongs to a single user application.
Error
A mistake made by a developer that introduces a fault
Subquery
A query that is embedded (or nested) inside another query. Also known as a Nested Query or an Inner Query.
Inner Query
A query that is embedded or nested inside another quety. Also known as a Nested Query or a Subquery.
Reactor
A reactor object provides an asynchronous interface to resources that must be handled synchronously. Yes N/A
Builder Pattern
encapsulates the construction of a product and allows it to be constructed in steps.
Singleton Pattern
ensures a class has only one instance, and provides a global access point to it.
Technical team makes these decisions (planning)
estimates; how long will each feature take? consequences; what are the choices and tradeoffs related to issues of technology and programming? process; how will the work activities be performed? How is the team organized?
Atarimae hinshitsu
examine the intangibles that affect the process and work to optimize their impact on the process
Kanse
examine the way the product is used by the customer with an eye to improving both the product and development process
What are the characteristics of the waterfall model?
output of one phase acts as input to another •why freeze the project? costs of producing and approving documents •adv - visible to managers to check progress •dis - inflexible partitioning •should only be used when requirements are well understood/ unlikely to change radically •alternative, formal system development
Behavioral
patterns are concerned with how classes and objects interact and distribute responsibility.
Creational
patterns involve object instantiation and provide a way to decouple a client from the objects it instantiates.
Structural
patterns let you compose classes or other objects into larger structures.
List 3 reasons why systems change?
people change business and technical enviornments conflicting or contradictory requirements
Event Driven Architecture
perform services in reaction to external events generated by other components Advantages • Loose coupling • More responsive • Asynchrony built in • Events distributed leads to timeliness Disadvantages • Difficult debugging • Maintenance overhead (fewer build time validations) • Different understanding of events can lead to problems
Cascading Order Sequence
A nested ordering sequence for a set of rows, such as a list in which all last names are alphabetically ordered and, within the last names, all first names are ordered.
Recursive Query
A nested query that joins a table to itself.
Thread pool
A number of threads are created to perform a number of tasks, which are usually organized in a queue. Typically, there are many more tasks than threads. Can be considered a special case of the object pool pattern. No N/A
What are the best software engineering techniques and methods?
All software types require different techniques
State
Allow an object to alter its behavior when its internal state changes. The object will appear to change its class. Yes No N/A
Read-write lock
Allows concurrent read access to an object, but requires exclusive access for write operations. No N/A
Watermarking
Allows detection of pirated s/w
Messaging design pattern (MDP)
Allows the interchange of information (i.e. messages) between components and applications. No N/A
What are the three types of user testing?
Alpha Testing: Users of the software work with the development team to test the software at the user's site. Beta Testing: A version of the software is made available to the users to allow them to experiment and to raise problems that they discover with the systems developers. Acceptance Testing: Customers test a system and decide whether or not it is ready to be accepted from the system developers and deployed in the customer environment. Primarily for custom systems.
Inheritance
Also known as subclassing or subtyping. Classes can inherit fields and methods from other classes with the extends keyword. We want to model a Sedan, that has all the fields and methods of a person. Defines a "is-a" relationship between classes. Example: Sedan now inherits Car's attributes and method Sedan s = new Sedan("Ford");
State
Alter an object's behavior when its state changes
Obfuscate - "to confuse"
Alter code so as to confuse reverse engineer, but preserve functionality Behavior preserving transformations on code that preserve function but reduce readability or understandability
Control transformations (A classification of obfuscations)
Alter program control and computation
What is an architectural pattern? List the 2 architectural patterns studied.
An architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture within a given context. Architectural patterns are similar to software design pattern but have a broader scope. MVC, PAC.
Obfuscating the Program
An array of actions designed to both eliminate symbolic info and confuse program structure
Object Pool
Avoid expensive acquisition and release of resources by recycling objects that are no longer in use
Object pool
Avoid expensive acquisition and release of resources by recycling objects that are no longer in use. Can be considered a generalisation of connection pool and thread pool patterns. No No N/A
Null object
Avoid null references by providing a default object. No No N/A
What is the difference between a software bug and a software flaw?
Bugs are implementation problems. Flaws are architectural problems in the design.
Memento
Capture and restore an object's internal state
Describe the Thread class.
Contains a non-static start() method to make thread ready. Contains a non-static run() method to run the computation stored in the thread.
Describe the Runnable interface.
Contains a single run() method. "Runnable" interface is used to avoid the need to inherit - favouring composition over inheritance. The "Runnable" interface should be implemented by any class whose instances are intended to be executed by a thread.
High-quality, high business value
Continue in operation using normal system maintenance
Describe the Continuous Integration cycle and explain the rationale behind it.
Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository frequently (at least once each day). When embarking on a change, a developer pulls an up-to-date copy of the codebase from the shared repository. As she works on her local changes, other developers have likely pushed to the shared, remote repository. So before pushing her local changes, she must again pull the most up-to-date version of the code from the repository. After doing so, she runs a local build and if the build is successful, she should immediately push to shared repository. Without pulling and pushing frequently, merging changes introduced by several developers into one remote repository, will be very difficult, if not impossible. CI allows developers to avoid last-minute chaos at release dates, when everyone tries to check in their slightly incompatible versions
Protection Proxy
Controls access to a resource based on access rights.
Virtual Proxy
Controls access to a resource that is expensive to create.
Remote Proxy
Controls access to remote objects
Adapter, Wrapper, or Translator
Convert the interface of a class into another interface clients expect. An adapter lets classes work together that could not otherwise because of incompatible interfaces. The enterprise integration pattern equivalent is the translator. Yes Yes N/A
Template method
Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure. Yes Yes N/A
Visitor
Defines a new operation to a class without change
Mediator
Defines simplified communication between classes
DSDM Principle 2: Deliver On Time
Delivering a solution on time is a very desirable outcome for a project and is quite often the single most important success factor. Late delivery can often undermine the very rationale for a project, especially where market opportunities or legal deadlines are involved.
Why do we test?
Demonstrate that software meets requirements Discover bugs in software
UML Behavior Diagrams
Depicts the behavioral features of the system or process. i.e. activity, sequence, state machine, use case
UML Structure Diagrams
Depicts the elements of a specification irrespective of time. i.e. class diagram
Name
Description In Design Patterns In Code Complete[13] Other
What are 5 important rules to follow in interface testing?
Design tests so that parameters to a called procedure are at extreme ends of their range. Always test pointer parameters with a null pointer. Design tests which cause the components to fail. Use stress testing in message passing systems. In shared memory systems, vary the order in which components are activated.
Null Object
Designed to act as a default value of an object
Tamper-proofing goals
Detect alterations to program Cause the program to fail if altered
Big Bang Model
Develop code Understand requirements as you go ahead Basically, no planning, defining, or designing
Proximal to Distal Development
Develop starts at midline and goes out to provide stability and then mobility
What are the two types of software products?
Generic, customized
Git Clone
Get local copy of repo
Interpreter
Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language. Yes No N/A
Interpreter
Given a language, define class hierarchy for parse tree, recursive method to interpret it
Design Recovery (Levels of Reverse Engineering)
Goal is to create a reproducible design for forward engineering Combination of code examination, document and data mining, personal experience and domain knowledge
the planning game
Goal is to maximize value of the software that we produce by investing as little as possible and getting the most valuable function as quickly as possible.
What are the attributes of good software?
Good software delivers required functionality and performance to the user, and should be maintainable, dependable, and usable.
What is INVEST?
Good user stories are: Independent Negotiable Valuable Estimable Small Testable
(McCall's Quality Factors) Interoperability
Effort required to couple one system to another.
(McCall's Quality Factors) Maintainability
Effort required to locate and fix an error in a program. [This is a very limited definition.]
(McCall's Quality Factors) Flexibility
Effort required to modify an operational program.
(McCall's Quality Factors) Testability
Effort required to test a program to ensure that it performs its intended function.
(McCall's Quality Factors) Portability
Effort required to transfer the program from one hardware and/or software system environment to another.
Basic Approaches to Antireversing
Eliminating Symbolic Information Obfuscating the Program Embedding Anti-debugger Code
Marker
Empty interface to associate metadata with a class. No No Effective Java[18]
Command
Encapsulate a command request as an object
Command
Encapsulate a request as an object, thereby allowing for the parameterization of clients with different requests, and the queuing or logging of requests. It also allows for the support of undoable operations. Yes No N/A
Strategy
Encapsulates an algorithm inside a class
What is the difference between encapsulation and information hiding?
Encapsulation ensures that the behaviour of an object can only be affected through its API. Encapsulation helps battle fragility in the codebase by ensuring that clients are not coupled to the implementations of the classes they depend on - clients simply require that they are presented a compatible interface. Information Hiding conceals how an object implements its functionality behind the abstraction of its API. Information Hiding is to do with abstraction. It allows the programmer to temporarily ignore the details of how a class is implemented.
Code Encryption
Encryption of program code is a common method for preventing static analysis Program is encrypted after compilation Decryption scheme is embedded in the program itself Not all that effective Decryption logic and key are in the executable Decrypted code is in memory at run time.
Singleton
Creational design pattern Intent: ensure a class has only one instance, and provide a global point of access to it. Pros: Easy instance management Cons: It acts like a global variable and shares all the problems associated with them Breaks SRP, as the objects now has to control it's own lifetime cycle
Name one way of evaluating your paper prototype
Have someone who didn't work on it go through the prototype
Code Checksums
Debuggers must modify code in order to insert breakpoints Modifying the code changes statistical data on length or function or the overall program Since the size of a function is known at compile time, a "checksum" can be pre-calculated for it
Blockchain
Decentralized way to store data and agree on ways of processing it in a Merkle tree, optionally using digital signature for any individual contributions. No N/A
Morro
Head drops back and abducts as UE extends and abducts (similar to startle) Integrated at 4 months Issue: difficulty with independent sitting
Cephalocaudal
Head grows before tail so the head has the first things to be stable (head is strongest in babies)
What is the goal of Quality Control?
Help to ensure that each work product meets its quality goals.
The availability requirements of the system.
High-availability systems may require components to be deployed on more than one platform.
Reusability
How usable a component is in related applications without modification
Efficiency
How well a component satisfies speed or storage requirements
Robustness
How well the component will recover from anomalous events
Give the equation for the instability metric.
I = Ce / (Ce + Ca). Higher instability = More dependencies. Lower instability = More dependents.
The hardware and software requirements of a component.
If a component is designed for a specific hardware architecture, or relies on some other software system, it must obviously be deployed on a platform that provides the required hardware and software support.
Component communication.
If there is a lot of intercomponent communication, it is usually best to deploy them on the same platform or on platforms that are physically close to one another.
Duplicated Code
If you see the same code structure in more than one place, you can be sure that your program will be better if you find a way to unify them The simplest duplicated code problem is when you have the same expression in two methods of the same class
Reverse Engineering Steps
Implementation > Design > Analysis > Requirement
Fault
Incorrect portions of code that can lead to a failure instance.
Failure
Incorrect program behavior that is externally visible
10. What differences has the Web made to software engineering?
Increased possibility of developing highly distributed service- based systems.
What are the two so-called consequences of software failures?
Increasing demand low expectations
Bug
Informal way to describe a failure or fault
Static Polymorphism
Involves method overloading.
An interaction model.
Is a dynamic model that shows how the system interacts with its environment as it is used.
Integrated development environment (IDE).
Is a set of software tools that support different aspects of software development within some common framework and user interface. They are created to support development in a specific programming language.
A system context model.
Is a structured model that demonstrates the other systems in the environment of the system being developed. It may be represented using associations.
Open-source development.
Is an approach to software development in which the source code of a software system is published and volunteers are invited to participate in the development process.
Object-oriented system.
Is made up of interacting objects that maintain their own local state and provide operation on that state. The representation of the state is private and cannot be accessed directly from outside the object.
Software design and implementation.
Is the stage in the software engineering process at which an executable software system is developed. They are closely lnked, and you should normally take imlementation issues into account when developing a design.
Model-View-Controller
Isolates business or domain logic from the input and presentation. Allows for multiple views and focussing testing on individual pieces.
Design patterns.
It is a description of the problem and the essence of its solution, so that the solution can be reused in different settings. You can think of it as a description of accumulated wisdom and experience, a well-tried solution to a common problem.
DSDM Principle 8: Demonstrate Control
It is essential to be in control of a project at all times and to be able to demonstrate that this is the case. This can only be achieved by reference to a plan for the work being done, which is clearly aligned with agreed business objectives.
Examples of open source software
Linux, Java, Apache web server, MySQL
Asymmetrical Tonic Neck Reflex (ATNR)
Looking arm extended, back arm flexed (helps babies to learn to reach out) Integrated at 6 months Issue: difficulty bringing things to mouth, rolling, reaching
Hi-Fidelity
Looks like the real thing
Restructuring problems
Loss of comments Loss of documentation Heavy computational demands
Realiability
MTBF/(1 + MTBF)
Availability
MTBF/(MTBF + MTTR)
Git Master
Main branch
List McCall's Quality Factors for product revision
Maintainability Flexibility Testability
Program structure improvement
Maintenance tends to corrupt the structure of a program. It becomes harder and harder to understand The program may be automatically restructured to remove unconditional branches Conditions may be simplified to make them more readable
What are the SQA plan parts?
Management section, documentation section, standards, practices and conventions section, review and audits section, test section, problem reporting and corrective action section,
why is it difficult to introduce agile methods into large companies
Manager s are afraid to take on new risks, quality procedures and standards are incompatible with agile methods. agile requires higher level of skill. companies with high resistance to change.
Guarded suspension
Manages operations that require both a lock to be acquired and a precondition to be satisfied before the operation can be executed. No N/A
Garvin's Quality Dimensions
Performance Features Reliability Conformance Durability Serviceability Aesthetics Perceived Quality
Tamper-Proofing
Prevent unauthorized modifications to code
The cost of quality can be divided into which categories?
Prevention Appraisal Failure
Which quality cost do management activities to coordinate quality control fall under?
Prevention Costs
Which quality costs do developing requirements and design models fall under
Prevention Costs
Which quality costs do test planning and training fall under
Prevention Costs
Testing
Process of finding failures
Debugging
Process of finding faults
Scrum Artifacts
Product Backlog, Sprint Backlog, Burndown Charts
Specification
Recombinable business logic in a Boolean fashion. No No N/A
Usage of binaries
Recovery of lost source code Migration of applications to a new hardware platform Translation of code written in obsolete languages not supported by compiler tools nowadays Determination of the existence of viruses or malicious code in the program Recovery of someone else's source code (to determine an algorithm for example)
Redocumentation (Levels of Reverse Engineering)
Recreation of semantically equivalent representation of the system Goals create alternate views, create new documentation, generate new documentation for changes Aimed mainly at facilitating maintenance
Levels of Reverse Engineering
Redocumentation Design Recovery Specification Recovery
Double-checked locking
Reduce the overhead of acquiring a lock by first testing the locking criterion (the 'lock hint') in an unsafe manner; only if that succeeds does the actual locking logic proceed.
Aggregation transformations
Refactor program using aggregation methods
improving software
Refactoring
The ability of the interface to be customized to the specific needs of a user is an example of which quality attribute?
Richness
The interface providing a macro capability that enables a user to identify a sequence of common operations with a single action is an example of which quality attribute?
Richness
Describe rigidity, fragility, immobility with respect to source code.
Rigidity - When code is difficult to change. Fragility - When making small changes to the code, other parts break unexpectedly. Immobility - When components of the code cannot be easily reused in other applications. For example, in the Template Method pattern, subclasses cannot be reused without also carrying along their abstract superclass. Code that is has one of the three properties often tends to have the other properties as well.
Design models.
Show the object or object classes in a system. They also show the associations and relationships between these entities. The level of detail you put into it depends on the design process used.
Subsystem Models
Shows how the design is organised into logically related groups of objects
Associations.
Simly show that there are sme relationships between the entities involved.
Interleaving Code
Simple concept: take two or more functions/methods and interleave them Very hard to read with any sense Use opaque predicate that jumps to the next segment.
Responsibility Driven Design
The central idea is that in a "good" object-oriented design, every object has clear and well-defined responsibilities. Responsibilities are not concentrated centrally, but are well-distributed amongst the objects.
Proxy
An object representing another object
Monitor object
An object whose methods are subject to mutual exclusion, thus preventing multiple objects from erroneously trying to use it at the same time. Yes N/A
Reverse engineering
Analysing software with a view to understanding its design and specification May be part of a re-engineering process but may also be used to re-specify a system for re-implementation Builds a program data base and generates information from this Program understanding tools (browsers, cross-reference generators, etc.) may be used in this process
Re-engineering advantages Reduced risk
There is a high risk in new software development. There may be development problems, staffing problems and specification problems
What is Meskimen's law?
There's never time to do it right, but always time to do it over again.
(Garvin's Quality Dimensions) Aesthetics
There's no question that each of us has a different and very subjective vision of what is aesthetic. And yet, most of us would agree that an aesthetic entity has a certain elegance, a unique flow, and an obvious "presence" that are hard to quantify but are evident nonetheless. Aesthetic software has these characteristics.
Low-quality, high-business value
These make an important business contribution but are expensive to maintain. Should be re-engineered or replaced if a suitable system is available
Decompiled
Decompilers attempt to build a high-level representation of low-level code Decompliers work by building control structures out assemmbly Lack symbolic info
Structural Patterns
Decorator Proxy Composite Facade Adapter
Bridge
Decouple an abstraction from its implementation allowing the two to vary independently. Yes Yes N/A
Bridge
Decouple an abstraction from its implementation so they can vary independently
Active Object
Decouples method execution from method invocation that reside in their own thread of control. The goal is to introduce concurrency, by using asynchronous method invocation and a scheduler for handling requests. Yes N/A
Git Origin
Default remote (GitHub in our case)
Template method
Defer the exact steps of an algorithm to a subclass
Strategy
Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it. Yes Yes N/A
Observer or Publish/subscribe
Define a one-to-many dependency between objects where a state change in one object results in all its dependents being notified and updated automatically. Yes Yes N/A
What are the six stages of the acceptance testing process?
Define acceptance criteria Plan acceptance testing Derive acceptance tests Run acceptance tests Negotiate test results Reject or accept the system
Factory method
Define an interface for creating a single object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses. Yes Yes N/A
Factory Method
Define an interface for creating an object, but let subclasses decide which class to instantiate
Mediator
Define an object that encapsulate how a set of objects interact to reduce coupling.
(McCall's Quality Factors) Reusability
Extent to which a program [or parts of a program] can be reused in other applications—related to the packaging and scope of the functions that the program performs.
(McCall's Quality Factors) Integrity
Extent to which access to software or data by unauthorized persons can be controlled.
(McCall's Quality Factors) Usability
Extent to which access to software or data by unauthorized persons can be controlled.
What is the term for costs that are incurred from defects found after the product has been shipped to the customer?
External Failure Costs
What quality costs do help line support and warranty work fall under?
External Failure Costs
What quality costs do product return and replacement fall under?
External Failure Costs
What quality costs does a poor reputation and loss of business fall under?
External Failure Costs
What quality costs does complaint resolution fall under?
External Failure Costs
The interface providing useful diagnosis and guidance when an error is uncovered is an example of which quality attribute?
Robustness
The interface recognizing common cognitive or manipulative mistakes and explicitly guiding the user back on the right track is an example of which quality attribute?
Robustness
The software recognizing errors if data values are outside of input boundaries and continuing to operate without failure is an example of which quality attribute?
Robustness
Preschool Social Characteristics
Role Playing, Turn Taking, Altruism, Goal Oriented Play, Imitation Play
Offline Code Analysis
Run a binary through a disassembler or decompiler to convert into HRF (human readable form) Manually process the output Gives a good outline of the code Hard to discern data flow and structure Can't be done on encrypted code
Pipe and Filter Architecture Style
Run-time organization of the system. Each step (filter) transforms the data and passes is on to the next step Advantages • Easy to understand and matches business processes • Filters can be reused/ replaced • Ease of debugging • Can be sequential or concurrent Disadvantages • Format of data transfer has to be agreed a-priori • Each transformation must parse its input/ unparse its output in the agreed form • Cannot reuse functional transformations that use incompatible data structures • Cannot share state between filters • Cannot share state between filters
Embedding Anti-debugger Code
aimed specifically at hindering live analysis have the program intentionally perform operations that would somehow damage or disable a debugger
State Pattern
allows an object to alter its behavior when the internal state changes. The object will appear to change its class.
Flyweight Pattern
allows one instance of a class to implement many "virtual instances."
Generalized Movement Patterns
gross motor patterns lacking isolation to fine isolated combined movements
Sprint
time-boxed event of 30 days, or less, that serves as a container for the other Scrum events and activities. Sprints are done consecutively, without intermediate gaps.
Chain Of Responsibility Pattern
used when a program needs to give more than one object a chance to handle a request.
What are some checks done during requirements validation
validity check consitency check realism check verifiablity check
What are the 3 process models that Sommerville covers in Ch 2
waterfall, incremental development, reuse-oriented software engineering
What is the difference between a Website and a Web App?
Websites are static and offer limited opportunity for user interaction whereas web apps are much more interactive.
-incomplete and often inconsistent specifications - tension between customer and developer quality requirements - requirements are hard to specify in an unambiguous way
What are problems with software quality ?
complexity, maintainability, understandably, reusability, documentation
What are the attributes of Code quality?
architectural integrity, component completeness, interface complexity patterns
What are the attributes of Design Quality?
resources allocation, completion rate, review effectiveness, testing effectiveness,
What are the attributes of QC effectiveness?
ambiguity, completeness, understandably, volatility, traceability, model clarity
What are the attributes of Requirements Quality?
Potential difficulties when relying on test cases
What are we really testing? Are the test cases orthogonal? Some components, such as GUIs, can be difficult to test through test cases. Test cases can become out of date; we might change the code but not update the test case.
Mean time between failure
What does MTBF mean?
Mean time to Repair
What does MTTR mean?
variation control
What is the heart of quality control
Composite
_________ objects into tree structures. Let clients treat primitives & compositions uniformly
Burn-up Chart
a chart showing the evolution of an increase in a measure against time. Burn-up charts are an optional implementation within Scrum to make progress transparent.
Burn-down Chart
a chart showing the evolution of remaining effort against time. Burn-down charts are an optional implementation within Scrum to make progress transparent.
Scrum
a framework to support teams in complex product development. Scrum consists of Scrum Teams and their associated roles, events, artifacts, and rules, as defined in the Scrum GuideTM.
Stakeholder
a person external to the Scrum Team with a specific interest in and knowledge of a product that is required for incremental discovery. Represented by the Product Owner and actively engaged with the Scrum Team at Sprint Review.
Scrum Board
a physical board to visualize information for and by the Scrum Team, often used to manage Sprint Backlog. Scrum boards are an optional implementation within Scrum to make information visible.
Increment
a piece of working software that adds to previously created Increments, where the sum of all Increments -as a whole - form a product.
Scrum Team
a self-organizing team consisting of a Product Owner, Development Team and Scrum Master.
Scrum Values
a set of fundamental values and qualities underpinning the Scrum framework; commitment, focus, openness, respect and courage.
Engineering standards
a shared set of development and technology standards that a Development Team applies to create releasable Increments of software.
Ready
a shared understanding by the Product Owner and the Development Team regarding the preferred level of description of Product Backlog items introduced at Sprint Planning.
Definition of Done
a shared understanding of expectations that software must live up to in order to be releasable into production. Managed by the Development Team.
Sprint Goal
a short expression of the purpose of a Sprint, often a business problem that is addressed. Functionality might be adjusted during the Sprint in order to achieve the Sprint Goal.
Opaque constructs
always evaluate one way (known to obfuscator), unknown to deobfuscator.
Source code translation realistic when
an automatic translator is available
Velocity
an optional, but often used, indication of the average amount of Product Backlog turned into an Increment of product during a Sprint by a Scrum Team, tracked by the Development Team for use within the Scrum Team.
Scrum Artifact Product Backlog
an ordered list of product requirements that a scrum team maintains for a product
Product Backlog
an ordered list of the work to be done in order to create, maintain and sustain a product. Managed by the Product Owner.
Sprint Backlog
an overview of the development work to realize a Sprint's goal, typically a forecast of functionality and the work needed to deliver that functionality. Managed by the Development Team.
Decorator
attach features to an object dynamically
Decorator Pattern
attaches additional responsibilities to an object dynamically. This pattern provides a flexible alternative to subclassing for extending functionality.
Quality assurance
auditing and reporting procedures used to provide management with data needed to make proactive decisions
Mean Time to Failure (MTTF)
average time between observed failure
Encapsulation of best practices
avoids repetition of past mistakes
Compound Pattern
combines two or more patterns into a solution that solves a recurring or general problem.
External failure costs
compliant resolution, product return and replacement, help line support, warranty work
Composite Pattern
composes objects into tree structures to represent part-whole hierarchies. This lets clients treat individual objects and compositions uniformly.
Static Validation Techniques
concerned with analysis of documentation, focus is on finding system errors and identifying potential problems that my arise during system operation, documents may be prepared to support static validation
what is the software requirements document?
contains info gathered durng analyis activity into a document that defines a set of requirements.
Software Reliability
defined as the probability of failure free operation fo a computer program in a specified environment for a specified time period. Can be measured directly and estimated using historical and developmental data. Software reliability problems can usually e traced back to errors in design or implementation
Interpreter Pattern
defines a class-based representation of a grammar along with a mechanism to implement a simple language.
Strategy Pattern
defines a family of algorithms, encapsulates each one, and makes them interchangeable. This pattern lets the algorithm vary independently from clients that use it.
Architecture Style
defines a family of systems in terms of a pattern of structural organization. More specifically, an architectural style defines a vocabulary of components and connector types, and a set of constraints on how they can be combined
Observer Pattern
defines a one-to-many dependency between objects so that when one object changes state, all of its dependents are notified and updated automatically.
Factory Method Pattern
defines an interface for creating an object, but lets subclasses decide which class to instantiate. This pattern lets a class defer instantiation for subclasses.
problem reporting and corrective action section
defines procedures for reporting, tracking and resolving errors or defects, identifies organizational responsibilities for these activities
Template Method Pattern
defines the skeleton of an algorithm in a method, deferring some steps to subclasses. This lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.
quality (IEEE)
degree to which a system, component, or process meets specified requirements, and customer or user needs tor expectations
Quality of conformance
degree to which design specifications are followed in manufacturing the product
documentation secition
describes each work product produced as part of the software process
management section
describes the place of SQA in the structure of the organization
The process of object-oriented design includes activities to ________ the system architecture, ___________ objects in the system, __________ the design using different object models and ___________ the component interfaces.
design identify describe document
Kaizen
development a process that is visible, repeatable and measurable
Memento Pattern
is used to return an object to one of its previous states.
total quality management
kaizen, atarimae hinshitsu, kanse , miryokuteki hinshitsu
What is *Performance testing*
- usually involves planning a series of tests where the load is steadily increased until the system performance becomes unacceptable.
What is *Development Testing*
- where the system is tested *during development* to discover bugs and defects. - includes all testing activities that are carried out by the team developing the system.
reasons for Peer reviews
-improve quality -catches 80% of all errors if done properly -catches both coding errors and design errors -enforce the spirit of any organization standards -training and insurance
Statistical Quality Assurance
-information about software defects is collected and categorized -each defect is traced back to tis cause - using the parteo principle isolated the vital few defect causes -move to correct the problems that caused the defects
characteristics of agile software processes
1) short releases and iterations; divide the work into pieces. Get usable software to the customer as often as possible. 2) incremental design; don't try to complete the design at the beginning, because not enough is known about the whole system. 3) user involvement; consult with the users early and often. Let them guide design decisions. 4) minimal documentation; do only what's necessary. Let the source code document itself. 5) informal communication; maintain constant communication, but not through formal documents. 6) change; assume that the requirements and the environment will change. Be able to react to change.
components of XP
1) test-driven development 2) pair programming
What are the (3) *Stages of Testing*
1. Development testing 2. Release testing 3. User testing
Decorator.
//TODO The Decorator pattern is also useful for enforcing the Single Responsibility Principle (SRP). Example: - A "Calculator" class that performs numerical calculations but does not display the results. Use a "DecoratedCalculator" that delegates numerical calculations to aggregated "Calculator" and then fetches the result and notifies a View (in an MVC context).
Probability of Failure on Demand (POFOD)
0.001, for every 1000 request the service fails per time unit
Rate fo Fault Occurrence (ROCOF)
0.02, two failures for each 100 operational time units of opeartion
Disadvantages of linear software development processes
lengthy development times requirements change incomplete requirements heroic development effort is not sustainable previous software methodologies became too complex need to avoid waste and duplication effort
standards, practices, and conventions section
lists all applicable standards/practices applied during the software process and any metrics to be collected as part of the software engineering work
Data re-engineering (KP)
may be necessary because of inconsistent data management
What is a use case?
piece of functionality a service will provide
Restructuring doesn't help with
poor modularization where related components are dispersed throughout the code.
Empiricism
process control type in which only the past is accepted as certain and in which decisions are based on observation, experience and experimentation. Empiricism has three pillars: transparency, inspection and adaptation.
What are some process descriptions that we may be include with processes?
products, roles, pre and post-conditions
test section
references the test plan and procedure document and defines test record keeping requirements
quality of design
refers to characteristics designers specify for the end product to be constructed
3 disadvantages to incremental development
1. only used on small to medium size systems. 2. poor structure -- degrades over time 3. development process is not visible
unique features of xp?
1. paired programming 2. sustainable pace 3. test-first 4. collective ownership 5. continuous integration 6. on-site customer 7. refactoring 8. simple design
List 3 requirement validation techniques
1. requirements review 2. prototyping 3. test cases
Automated Test Components
1. setup part - where you initialize the system with the test case, namely the inputs and expected outputs. 2. call part - where you call the object or method to be tested. 3. assertion part - where you compare the result of the call with the expected result. If the assertion evaluates to true, the test has been successful if false, then it has failed.
HAVING
A clause applied to the output of a GROUP BY operation to restrict selected rows.
Describe the Null Object pattern. Give some situations in which it might be used.
A client class will often issue a query (through an API) to a service class, for some object. In order to account for the case where the returned object is null, the client class will have to introduce some null-checking code. Over time, the codebase may become littered with a plethora of null-checking code. A better solution is to have the service class return a special "Null" object if no "Real" object exists. Examples of usage: - Returning a "NullAccount" after querying a bank database for some bank account. - Returning a "NullTrack" after querying a music database for some song.
Describe the main features of Web Apps.
A common design for web apps is the 3-tier architecture. The processing is split between the browser, web server and the database. This is a common design for web apps that involve online shopping or booking tickets. With the proliferation of web apps, browsers have taken on more responsibility for the presentation of content. So to introduce greater flexibility regarding presentation, it is now common for servers to transfer data in JSON or XML format to the browser, rather than whole webpages. The browser is then free to decide how to render this data and present it.
Be able to read, interpret, modify and create UML state diagrams
A state diagram shows the states of an object. Similar to a other State Diagrams, e.g. State Machine.
Wildcard Character
A symbol that can be used as general substitutes for: (1) all columns in a table (*) when used in an attribute list of SELECT statement or, (2) zero or more characters in a SQL LIKE clause condition (% and __ ).
Observer
A way of notifying change to a number of classes
Chain of responsibility
A way of passing a request between a chain of objects
Interpreter
A way to include language elements in a program
Skill Development
Accidental reflexive movements to stability in a posture to controlled mobility to static dynamic mobility to skill completion
Reasons to Reverse
Achieving Interoperability with Proprietary Software Developing Competing Software Evaluating Software Quality and Robustness
What is software?
All associated documentation, and configuration data along with the programs
Program structure improvement (KP)
replaces unstructured control constructs with while loops and simple conditionals
Strategy
represent a behavior that parameterizes an algorithm for behavior or performance
When developing software, you should always consider the possibility of ___________existing software, either as components, services or complete systems.
reusing
Failure costs
rework, repair, failure mode analysis
Business/customer decisions (planning)
scope; what needs to be done in order for the system to be useful? priorities; how should we prioritize the next features that we will be developing? release scope; what needs to be included in each release? release dates; what are the important dates to release the software or specific components of the software?
Quality control
series of inspections, reviews , and tests used to ensure conformance of a work product to its specifications
Software Quality Assurance
set of systematic activities providing evidence of ability of the software process to produce a software product that is fit to use
Kernel-Mode Debuggers
sits alongside the system's kernel and allows for stopping and observing the entire system at any given moment difficult to setup and often require a dedicated system because they destabilize the attached system
Open source development involves making the ___________ of a system publicly available. This means that many people can propose changes and improvements to the software.
source code
4 fundamental process activities that are common to all software processes?
specfication, development, validation, evolution
What are the 4 activities that are fundamental to software engineering?
specification, design and implementation, validation, evolution
How does the srum method differ from all other agile methods
sprints
Verification
"Are we building the product right" Are we building the product correctly?
What is an ExecutorService?
"ExecutorService" is a subinterface of "Executor" - that is, it extends "Executor". ExecutorService allows us to submit tasks for execution, but without executing them immediately. For example, Callable<Double> task = new MyCallable<Double>(); ExecutorService executor = Executors.newFixedThreadPool(2); Future<Double> future = executor.submit(task); doSomeElseWhileCalculating(); Double result = future.get();
consistency
"согласованность, однородность "
GitHub Workflow
(0. Fork if not part of organization) 1. Clone 2. Branch 3. Commit 4. Pull in branch you want to merge to 5. Push to origin (GitHub) 6. Make pull request/get feedback 7. Merge pull request 8. Delete branch
SELECT
(1) A SQL command that yields all the values of all rows or a subset of rows in a table. The SELECT statement is used to retrieve data from tables. (2) In relational algebra, an operator to select a subset of rows. Also known as RESTRICT.
What *Inspections* Can and Cannot Do
- *can check* conformance with a *specification* but not conformance with the customer's *real requirements*. - *cannot check non-functional characteristics* such as performance, usability, etc.
Design Patterns
- A design pattern is a way of reusing abstract knowledge about a problem and its solution. - A pattern is a description of the problem and the essence of its solution. - It should be sufficiently abstract to be reused in different settings. - Pattern descriptions usually make use of object-oriented characteristics such as inheritance and polymorphism.
Persona
- A fictional character created to represent the different user types - Builds empathy with users for developers - Make and defend decisions on UI
Open Source Licensing
- A fundamental principle of open-source development is that source code should be freely available, this does not mean that anyone can do as they wish with that code. - Legally, the developer of the code (either a company or an individual) still owns the code. They can place restrictions on how it is used by including legally binding conditions in an open source software license.
TDD Benefit: Regression testing
- A regression test suite is developed incrementally as a program is developed. - is testing the system to check that changes have not 'broken' previously working code. - Tests must run 'successfully' before the change is committed.
Types of User Testing: Beta testing
- A release of the software is made available to users to allow them to experiment and to raise problems that they discover with the system developers.
What is *V & V Confidence*
- Aim of V & V is to establish confidence that the system is *'fit for purpose'*. - Depends on software purpose, user expectations and marketing environment
Testing Policies: Examples
- All system functions that are *accessed through menus* should be tested. - *Combinations of functions* (e.g. text formatting) that are accessed through the same menu must be tested. - Where *user input is provided*, all functions must be tested with both correct and incorrect input.
Development Platform Tools
- An integrated compiler and syntax-directed editing system - A language debugging system - Graphical editing tools - Testing tools - Project organizing tools
The 5 types of code smells
- Bloaters: oversized code, methods and classes that are difficult to work with - OO abusers: incomplete or incorrect application of object oriented programming - Change Preventers: changes that require you to make changes elsewhere too - Dispensables: something pointless and its absence would make the code better - Couplers: excessive coupling between classes
What are the advantage of DVCS over Centralized VCS?
- Can commit locally and push once you're ready - Don't need internet connection to commit
3 C's of a user story
- Card - Conversation - Confirmation
Centralized VCS
- Commit directly to remote - Server has main copy - Ex: Subversion
Distributed VCS
- Commit locally, push and pull to remotes - No one has main copy - Ex: Git
What is *Software Inspection*
- Concerned with analysis of the static system representation to discover problems (static verification) -- May be supplement by tool-based document and code analysis.
What is *Software Testing*
- Concerned with exercising and observing product behavior (dynamic verification) -- The system is executed with test data and its operational behavior is observed.
Name 2 characteristics of a good requirement
- Correct - Complete - Consistent - Unambiguous - Relevant - Testable - Traceable
Types of User Testing: Acceptance testing
- Customers test a system to decide whether or not it is ready to be accepted from the system developers and deployed in the customer environment. Primarily for custom systems.
Acceptance testing: Stages in Process
- Define acceptance criteria - Plan acceptance testing - Derive acceptance tests - Run acceptance tests - Negotiate test results - Reject/accept system
Object-Oriented Design Process Activities
- Define the context and modes of use of the system - Design the system architecture; - Identify the principal system objects; - Develop design models; - Specify object interfaces.
Process stages of OO Design Process
- Define the the context and modes of use of the system - Design the system architecture - Identify the principle system objects - Develop design models - Specify object interfaces
What are some advantages of *Software Inspections*
- During testing, *errors can mask (hide) other errors*. Because inspection is a static process, you don't have to be concerned with interactions between errors. - *Incomplete versions* of a system can be inspected without additional costs. - As well as searching for program defects, an inspection can also consider broader *quality attributes* of a program, such as compliance with standards, portability and maintainability.
License Management
- Establish a system for maintaining information about open-source components that are downloaded and used. - Be aware of the different types of licenses and understand how a component is licensed before it is used. - Be aware of evolution pathways for components. - Educate people about open source. - Have auditing systems in place. - Participate in the open source community.
TDD Benefit: Code coverage
- Every code segment that you write has at least one associated test so all code written has at least one test.
Why have *Testing policies*
- Exhaustive system testing is impossible so testing policies which define the required system test coverage may be developed.
Reuse
- From the 1960s to the 1990s, most new software was developed from scratch, by writing all code in a high-level programming language. - The only significant reuse or software was the reuse of functions and objects in programming language libraries. - Costs and schedule pressure mean that this approach became increasingly unviable, especially for commercial and Internet-based systems. - An approach to development based around the reuse of existing software emerged and is now generally used for business and scientific software.
License Models
- GNU General Public License (GPL): So called reciprocal license. Means that if you use open source software licensed under the GPL, then you must make that software open source - GNU Lesser General Public License (LGPL): a variant of the GPL license where you can write components that link to open source code without having to publish the source of these components. - Berkley Standard Distribution (BSD) License: Non-Reciprocal license
Configuration Management
- General process of managing a changing software system. - Aim of configuration management is to support the system integration process so that all developers can access the project code and documents in a controlled way, find out what changes have been made, and compile and link components to create a system.
V & V Confidence: Marketing environment
- Getting a product to market early may be more important than finding defects in the program.
Paper prototyping
- Hand drawn sketch of UI - Depict what system should look like - Good to quickly test prototypes with users
Neilson's 5 usability goals
- Learnability - Efficiency - Memorability - Errors (safety) - Satisfaction
Host-Target Development
- Most software is developed on one computer (the host), but runs on a separate machine (the target). - More generally, we can talk about a development platform and an execution platform. - A platform is more than just hardware. It includes the installed operating system plus other supporting software such as a database management system - Development platform usually has different installed software than execution platform; these platforms may have different architectures.
Interface Specification
- Object interfaces have to be specified so that the objects and other components can be designed in parallel. - Designers should avoid designing the interface representation but should hide this in the object itself. - Objects may have several interfaces which are viewpoints on the methods provided. - The UML uses class diagrams for interface specification but Java may also be used.
Interface Testing
- Objectives are to detect faults due to interface errors or invalid assumptions about interfaces.
Object Class Indentifcation
- Often difficult part of object orientated design - No magic formula! Relies on skill, experience, and domain knowledge of system designers - Object identification is an iterative process, unlikely to get it right the first time!
Architectural Design
- Once interactions between the system and its environment have been understood, you use this information for designing the system architecture. - Identify the major components that make up the system and their interactions, and then organize the components using an architectural pattern such as a layered or client-server model.
Release Testing VS System Testing
- Release testing is a form of system testing. Important Differences: - *A separate team* that has *not been involved* in the system development, should be responsible for release testing. - System testing by the development team should focus on discovering bugs in the system *(defect testing)*. The objective of release testing is to check that the system meets its requirements and is good enough for *external use (validation testing)*.
Implementation Issues
- Reuse - Configuration Management - Host-Target Development
Design Models
- Show the objects and object classes and relationships between these entities
Design Model: Subsystem
- Shows how the design is organised into *logically* related groups of objects.
Sequence Models
- Shows sequence of object interactions that take place - Objects are arranged horizontally across the top - Time is represented vertically
Development Testing: *Component Testing*
- Software components are often composite components that are made up of *several interacting objects*. - Testing composite components should therefore focus on showing that the *component interface* behaves according to its specification.
Open Source Development
- Source code of a software system is published and volunteers are invited to participate in the development process - Roots are in the Free Software Foundation which advocates that source code should not be proprietary but rather should always be available for users to examine and modify as they wish. - Internet helped to recruit a much larger population
Two kinds of Design Models
- Structural Models: Describe the static structure of system in terms of object classes and relationships - Dynamic Models: Describe the dynamic interactions between objects
Object-Oriented Design Process
- Structured object-oriented design processes involve developing a number of different system models. - They require a lot of effort for development and maintenance of these models and, for small systems, this may not be cost-effective. - However, for large systems developed by different groups design models are an important communication mechanism.
Examples of design models
- Subsystem models - Sequence models - State Machine Models - Use-Case - Aggregation - generalization
Examples of Design models
- Subsystem models - Sequence models - State machine models
Context and Interaction Models
- System context model is a structured model that demonstrates the other systems in the environment of the system being developed. - Interaction is a dynamic model that shows how the system interacts with its environment as it is used.
Levels of Reuse
- The Abstraction Level - The Object Level - The Component Level - The System Level
Component/System Deployment factors
- The hardware and software requirements of a component - The availability of requirements of the system - Component Communications
V & V Confidence: Software purpose
- The level of confidence depends on how critical the software is to an organization.
What is *Verification*
- The software should conform to its specification. - i.e. "Are we building the product right".
What is *Validation*
- The software should do what the user really requires. - i.e. "Are we building the right product".
Software Design and Implementation
- The stage in the software engineering process at which an executable software system is developed. - Software design and implementation activities are invariably inter-leaved. - Software design is a creative activity in which you identify software components and their relationships, based on a customer's requirements. - Implementation is the process of realizing the design as a program.
TDD Benefit: System documentation
- The tests themselves are a form of documentation that describe what the code should be doing.
Costs associated with reuse
- Time spent looking for software to reuse and assessing whether or not it meets your needs - Costs of buying the reusable software - Cost of adapting and configuring - Cost of integrating the reusable software elements with each other
What are *Program Testing Goals*
- To *demonstrate* to the developer and the customer that the software meets its requirements. - To *discover* situations in which the behavior of the software is incorrect, undesirable or does not conform to its specification.
What is *Validation Testing*
- To demonstrate to the developer and the system customer that the software *meets its requirements* - A successful test shows that the system operates as intended.
What is *Defect Testing*
- To discover *faults or defects* in the software where its behavior is incorrect or not in conformance with its specification. - A successful test is a test that makes the system *perform incorrectly* and so exposes a defect in the system.
System Context and Interactions
- Understanding the relationships between the software being designed and the external environment. - Helps you to establish the boundaries of the system
Approaches to Object Class Identification
- Use a *grammatical* approach based on a natural language description of the system. - Base the identification on *tangible* things in the application domain. - Use a *behavioral* approach and identify objects based on what participates in what behavior. - Use a *scenario-based* analysis. The objects, attributes and methods in each scenario are identified.
Approaches to Object Class Identification
- Use a grammatical approach based on a natural language description of the system. - Base the identification on tangible things in the application domain. - Use a behavioral approach and identify objects based on what participates in what behavior. - Use a scenario-based analysis. The objects, attributes and methods in each scenario are identified.
State Diagrams
- Used to show how objects respond to different service requests and the state transitions triggered by these requests. - State diagrams are useful high-level models of a system or an object's run-time behavior. - Don't need a state diagram for all objects in the system
V & V Confidence: User expectations
- Users may have low expectations of certain kinds of software.
Types of User Testing: Alpha testing
- Users of the software work with the development team to test the software at the developer's site.
4 psychological principles behind UI design
- Users see what they expect to see - Users have difficulty focusing on more than 1 activity at a time - Easier to perceive a structured layout - Easier to recognize something than remember it
Configuration Management Activities
- Version Management - System Integration - Problem Tracking
Name one technique to gather (elicit) requirements?
- Watch users in daily life to see what they need - Look in standards body - Talk with customers and make diagrams
TDD Benefit: Simplified debugging
- When a test fails, it should be obvious where the problem lies. The newly written code needs to be checked and modified.
What happens during *Program Testing*
- When you *test software*, you execute a program using *artificial data*(test data). - You check the results of the test run for *errors, anomalies* or information about the program's *non-functional attributes*.
Why use *Automated Testing*
- Whenever possible, unit testing should be automated so that tests are run and checked without manual intervention. - you make use of a test automation framework (such as JUnit) to write and run your program tests.
What is technical debt?
- a concept in programming that reflects the extra development work that arises when code that is easy to implement in the short run is used instead of applying the best overall solution - what refactoring attempts to get rid of
Software design
- a creative activity in which you identify software *components and their relationships*, based on a customer's requirements.
Inspections and Testing
- are *complementary* and not opposing verification techniques. - Both should be used during the V & V process
Object-Oriented Design Process
- involve developing a number of different system models. - require a lot of effort for development and maintenance of these models and, for *small systems*, this *may not be cost-effective*. - for *large systems* developed by different groups design models are an important *communication mechanism*.
What is *System Testing*
- involves *integrating components* to create a version of the system and then *testing the integrated system*. - focus is testing the *interactions between components*. - checks that components are *compatible, interact correctly* and *transfer the right data* at the right time across their interfaces.
What is *Requirements based testing*
- involves examining each requirement and developing a test or tests for it.
What happens in *Software Inspections*
- involves people *examining* the source representation with the aim of *discovering* anomalies and defects. - *do not require* execution of a system so may be used before implementation. (Static Testing) - may be applied to *any representation* of the system (requirements, design,configuration data, test data, etc.).
Performance Testing: *Stress testing*
- is a form of performance testing where the system is deliberately overloaded to test its failure behavior.
What is *User Testing*
- is a stage in the testing process in which users or customers provide input and advice on system testing. - is essential, even when comprehensive system and release testing have been carried out.
What is *Test-driven development (TDD)*
- is an approach to program development in which you inter-leave testing and code development. - Tests are written before code and 'passing' the tests is the critical driver of development. - You develop code incrementally, along with a test for that increment. You don't move on to the next increment until the code that you have developed passes its test.
What is *Program Testing*
- is intended to show that a *program does* what it is intended to do and to discover program *defects* before it is put into *use*. - is part of a more general *verification and validation* process.
Object Class Identification
- is often a *difficult part* of object oriented design. - relies on the *skill, experience* and *domain knowledge* of system designers. - is an *iterative process*.
What is *Release testing*
- is the process of *testing a particular release* of a system that is intended for use *outside of the development team*. - *primary goal* is to *convince the supplier* of the system that it is *good enough for use*. - usually a *black-box testing* process where tests are only derived from the system specification.
Development Testing: *Unit Testing*
- is the process of testing individual components in isolation. - is a defect testing process.
Bloaters
- oversized code, methods and classes that are difficult to work with -- long method (1) -- long class (breaks SRP) (2) -- long parameter list (3)
why is code review needed?
- prevents releasing bugs - ensures architecture / code quality - leads to personal development
What happens during *System and Component Testing*
- reusable components that have been separately developed and *off-the-shelf systems* may be integrated with newly developed components. The complete system is then tested. - Components *developed by different team members or sub-teams* may be integrated at this stage. System testing is a collective rather than an individual process.
Design Model: State machine
- show how objects respond to different service requests and the state transitions triggered by these requests. - are useful *high-level models* of a system or an *object's run-time behavior*.
Design Models
- show the objects and object classes and relationships between these entities.
Design Model: Sequence
- show the sequence of object interactions that take place. -- Objects are arranged horizontally across the top --Time is represented vertically -- Interactions are represented by labelled arrows; Different styles of arrow represent different types of interaction -- A thin rectangle in an object lifeline represents the time when the object is the controlling object in the system.
Dispensibles
- something pointless and its absence would make the code better -- duplicated code (1,9) -- data class: contains only fields and crude methods to access them, simply containers (1,7) -- speculative generality: unused classes, fields, or parameters, "just in case" (10, 11)
Software Implementation
- the process of realizing the design as a program.
Software Design & Implementation
- the stage in the software engineering process at which an *executable software system* is developed.
what are cons of doing code review on GitHub?
-Might be hard to understand without explanation - Most important changes can be lost with lots of small insignificant changes
XP: Pair programming
-Pilot and copilot metaphor -- Or driver and navigator -Pilot types, copilot monitors high-level issues • simplicity, integration with other components, assumptions being made implicitly -Disagreements point early to design problems -Pairs are shuffled periodically
Draw the UML diagram for the external iterator pattern.
...
Draw the UML diagram for the internal iterator pattern.
...
Explain Remote Service clients, Rich Web clients and the Richardson Maturity Model.
...
Explain Simplicators, Hexagonal Architectures, System tests and Integration tests.
...
What are HTTP, REST and URIs?
...
Agile Advantages
1) Low process complexity; process is simple, focus on people not the process. 2) Low cost and overhead; there are a few required activities that don't directly produce software. 3) Efficient handling of changes; allowance/tolerance for change is built into the process. 4) Fast results; short cycles, low overhead means it's easier to produce results sooner. 5) Usable systems; customer is intimately involved, so they will get what they want.
Design Pattern Elements
1) Name: A meaningful pattern identifier 2) Problem Description 3) Solution Description: Not a concrete design by a template for a design solution 4) Consequences: The results and trade-offs of applying the pattern
Agile Risks and Disadvantages
1) Scalability; works well for a small team, but some project require a large team. 2) Reliance on teamwork; need a high-functioning, cohesive team. 3) Reliance on access to customer; inherent in the process is close consumer access, not possible for large enterprise application. 4) Cultural clash; can be hard to teach an old dog new tricks.
Types of Design Models
1. *Structural models* describe the static structure of the system in terms of object classes and relationships. 2. *Dynamic models* describe the dynamic interactions between objects.
What are (3) *Types of User Testing*
1. Alpha testing 2. Beta testing 3. Acceptance testing
What are the (4) Benefits of *Test-driven development*
1. Code coverage 2. Regression testing 3. Simplified debugging 4. System documentation
What are the four elements of simple design, in order of importance?
1. Code passes its tests (behaves correctly). 2. Minimises duplication. 3. Maximises clarity. 4. Code has fewer elements.
Spiral Model
1. Identification 2. Design 3. Construct or build 4. Evaluation and Risk Analysis Pros: Used for medium - high risk projects, and complex and unclear requirements that need evaluation. Early involvement with system development & users Cons: Management & process is complex. Large number of cycles require lots of documentation. When is end of cycle not always clear
4 Steps to RDD
1. Find the classes in your system 2. Determine the responsibilities of each class 3. Determine how objects collaborate with each other to fulfill their responsibilities 4. Factor common responsibilities to build class hierarchies
Open Source
1. Free Redistribution 2. Source code available 3. Derived Works 4. Integrity of The Author's Source Code 5. No Discrimination Against Persons or Groups 6. No Discrimination Against Fields of Endeavor 7. Distribution of License 8. License Must Not Be Specific to a Product 9. License Must Not Restrict Other Software 10.License Must Be Technology-Neutral (Do not need to know all)
Agile Principles
1. Individuals and interactions • self organization, motivation, colocation, pair-programming 2. Working software • Communication between client and team 3. Customer collaboration • Continuous interactions -> embed in team 4. Responding to change
Interface Testing: *Interface Types*
1. Parameter interfaces - Data passed from one method or procedure to another. 2. Shared memory interfaces - Block of memory is shared between procedures or functions. 3. Procedural interfaces - Sub-system encapsulates a set of procedures to be called by other sub-systems. 4. Message passing -interfaces Sub-systems request services from other sub-systems
Implementation Issues
1. Reuse 2. Configuration management 3. Host-target development
Development Testing: *Testing Activities*
1. Unit testing 2. Component testing 3. System testing
What are the *Testing Process Goals* (2)
1. Validation Testing 2. Defect Testing
3 reasons why it is difficult to elicit requirements from stakeholders?
1. customer uses domain language 2. customer doesnt know what they want 3. multiple stakeholders with conflicitng requirements
Generalization
<child> is more specific versions of the <parent> <child> inherits attributes, associations, & operations from the <parent> <child> can override an inherited aspect
What is a Future?
A "Future" is an object which wraps up the result of an asynchronous computation. After a task of type "Callable<T>" is submitted to an "ExecutorService" for execution. It's pending results are returned as a type "Future<T>".
MAX
A SAL aggregate function that yields the maximum attribute value in a given column.
COUNT
A SQL aggregate function that outputs the number of rows containing not null values for a given column or expression, sometimes used in conjunction with the DISTINCT clause.
MIN
A SQL aggregate function that yields the minimum attribute value in a given column.
SUM
A SQL aggregate function that yields the sum of all values for a given column or expression.
WHERE
A SQL clause that adds conditional restrictions to a SELECT statement that limit the rows returned by the query.
ORDER BY
A SQL clause that is useful for ordering the output of a SELECT query (for example, in ascending or descending order)
DISTINCT
A SQL clause that produces only a list of values that are different from one another.
FROM
A SQL clause that specifies the table or tables from which data is to be retrieved.
GROUP BY
A SQL clause used to reate frequency distributions when combined with any of the aggregate functions in a SELECT statement.
UPDATE
A SQL command that allows attribute values to be changed in one or more rows of a table.
DELETE
A SQL command that allows data rows to be deleted from a table.
INSERT
A SQL command that allows the insertion of one or more dat rows into a table.
CREATE TABLE
A SQL command that creates a table's structures using the characteristics and attributes given.
CREATE INDEX
A SQL command that creates indexes on the bases of a selected attribute or attributes.
ROLLBACK
A SQL command that restores the database table contents to he condition that existed after last COMMIT statement.
DROP INDEX
A SQL command used to delete database objects such as tables, views, indexes, and users.
DROP TABLE
A SQL command used to delete database objects such as tables, views, indexes, and users.
NOT
A SQL logical operator that negates a given predicate.
Be able to read, interpret, modify and create UML sequence diagrams
A Sequence Diagram is an interaction diagram that shows how processes operate with one another and in what order. They typically model Usage scenarios, Logic of methods, and/or the logic of services. Helpful for understanding asynchronous code. Each actor is represented as a labeled vertical line Each message is a horizontal line, with message name written above line Open arrow heads represent async messages Dashed lines are responses
Boolean Algebra
A branch of mathematics that uses the logical operators OR, AND, and NOT.
Dependency Injection
A class accepts the objects it requires from an injector instead of creating the objects directly. No No N/A
Singleton
A class of which only a single instance can exist
Oracle
A device or procedure for determining correctness of a output
Disassembly
A disassembler is a program that reads binary or executable files and extracts an assembly language image of the binary Does not contain symbolic information variable names function names (neither in call nor the declaration) all memory references are only numbers
Prototype
A fully initialized instance to be copied or cloned
Facade
A single class that represents an entire subsystem
Agile Software Process
A software development process that focuses on short iterations to be able to react to change. It explicitly highlights the role of teams and individuals.
Composite
A tree structure of simple and composite objects
Decorator
Add responsibilities to objects dynamically
Extension object
Adding functionality to a hierarchy without changing the hierarchy. No No Agile Software Development, Principles, Patterns, and Practices[15]
Event-based asynchronous
Addresses problems with the asynchronous pattern that occur in multithreaded programs.[22] No N/A
List David Garvin's Quality Dimensions
Aesthetics Conformance Durability Feature Quality Performance Quality Perception Reliability Serviceability
What is an Executor?
An "Executor" is an object that executes submitted "Runnable" tasks. It is implemented as an interface with a single "execute()" method. public interface Executor { void execute(Runnable command); } "Executor" should normally be used instead of explicitly creating threads because it provides a way of decoupling task submission from the mechanics of how each task will be run. For example, use Executor executor = new MyExecutor(); executor.execute(new Command(...)); instead of new Thread(new Command(...)).start();
AVG
An SQL aggregate function that outputs the mean average for a specified column or expression.
Alias
An alternative name for a column or table in a SQL statement.
What is software engineering?
An engineering discipline that is concerned with all aspects of software production
Active Anti-debugger Techniques
Anti-debugging code detects the presence in a debugger in memory and can prevent or complicate the debugger's operation When used with encryption makes the debugger run the encryption code Anti-debugging is very specific to the OS and hardware Anti-debugging is risky: Sometimes they give "false positives" Crashing a program when no debugger is in memory
Which quality costs do technical reviews fall under
Appraisal Costs
Which quality costs does data collection and metrics evaluation fall under?
Appraisal Costs
Which quality costs does testing and debugging fall under
Appraisal Costs
Blackboard
Artificial intelligence pattern for combining disparate sources of data (see blackboard system) No No N/A
What is technical debt and why should it be avoided?
As more features need to be introduced into a software product, there is a temptation to use quick fixes - code that allows you to quickly implement the feature, but leads to poorer overall design quality. The result is that further down the line, this poorer design quality will increase the rigidity of the code - making it much harder to implement new features. In this way, if technical debt is not repaid, it makes the code much harder to work with.
Object class identfication.
As your understanding of the design develops, you refine these ideas about the system objects. The use case description help to identify objects and operations in the system-
What is the difference between association, composition and aggregation in UML?
Association is a relationship where all objects have their own life cycle and there is no owner. public class Foo { void someMethod(Bar bar) {...} } Aggregation - I have an object which I've borrowed from someone else. When Foo dies, Bar may live on. public class Foo { Bar bar; Foo(Bar bar) { this.bar = bar; } } Composition - I own an object and I am responsible for its lifetime, when Foo dies, so does Bar. public class Foo { private Bar bar = new Bar(); }
Describe the Template Method pattern. Give some situations in which it might be used.
At the core of the Template Method pattern is a single abstract class, "AbstractBase", that consists of a template method that makes use of a bunch of hook methods. The implementations are then provided by subclasses of "AbstractBase". The Template method pattern allows us 1. To vary the behaviour of the template method - through method overriding by the subclasses. 2. Avoid duplication in the code. Examples of usage: - "EmailService" provides a template method for sending an email. Subclasses implement hook methods for formatting the message. - Cross compiler. Hook methods: collectSource(), compileToTarget().
The object level.
At this level, you directly reuse object from a library rather than writing the code yourself.
Reuse: The Object Level
At this level, you directly reuse objects from a library rather than writing the code yourself.
The abstract level.
At this level, you don't directly reuse software, but rather use knowledge of successful abstractions on the design of your software.
Reuse: The Abstraction Level
At this level, you don't reuse software directly but use knowledge of successful abstractions in the design of your software.
Reuse: The System Level
At this level, you reuse entire application systems.
The system level.
At this level, you reuse the entire applications system. This function usually involves some kind of configuration to these systems.
Decorator
Attach additional responsibilities to an object dynamically
Decorator
Attach additional responsibilities to an object dynamically keeping the same interface. Decorators provide a flexible alternative to subclassing for extending functionality. Yes Yes N/A
Infant Social Characteristics
Attachment to primary caregiver, joint attending, social referencing
Subtractive attack
Attacker extracts code not containing watermark
Distortive attack
Attacker modifies program to destroy watermark E.g., Use obfuscation techniques
Additive attack
Attackers add their own watermark also
4 Aspects of a Dependable System
Availability Reliability Safety Security (R ASS)
Chain of Responsibility
Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.
Chain of responsibility
Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it. Yes No N/A
Rules of Precedence
Basic algebraic rules that specify the oder in which operations are performed. For example, operations within parentheses are executed first, so in the equation 2 + (3X5), the multiplication portion is calculated first, making the correct answer 17.
Observer
Behavioral design pattern Intent: Define a one-to-many relationship between objects, so that when one object changes it's state, the dependents are notified and updated automatically. Pros: Observers are isolated from Observables You can dynamically subscribe and unsubscribe Cons: The order in which Observers are called might not be deterministic.
Template Method
Behavioral design pattern Intent: define a skeleton of an algorithm and defer some steps to subclasses. Pros: Helps eliminate code duplication Easy to customize the algorithm Cons: Your options are limited by the existing skeleton
What is the difference between afferent coupling (Ca) and efferent coupling (Ce)?
Ca: Refers to the number of classes which depend on this class - a measure of the class' responsibility. Ce: Refers to the number of classes on which this class depends - a measure of the class' independence. Note: Afferent = inwards. Efferent = outwards.
(Garvin's Quality Dimensions) Serviceability
Can the software be maintained (changed) or corrected (debugged) in an acceptably short time period? Can support staff acquire all information they need to make changes or correct defects? Douglas Adams [Ada93] makes a wry comment that seems appropriate here: "The difference between something that can go wrong and something that can't possibly go wrong is that when something that can't possibly go wrong goes wrong it usually turns out to be impossible to get at or repair."
(Garvin's Quality Dimensions) Durability
Can the software be maintained (changed) or corrected (debugged) without the inadvertent generation of unintended side effects? Will changes cause the error rate or reliability to degrade with time?
Layout transformations
Change formatting information
Control transformations
Change program flow while preserving semantics
Tamper Prevention and Detection
Check the executable version itself Examine validity of intermediate results Encrypt the executable
CRC sessions
Class-Responsibility-Collaborator, make cards for each class that specifies the responsibility of the class and other classes it collaborates with.
15. How has the Web affected software systems?
Computing clouds rather than local pcs, Software is highly distributed, more software reuse,
Affordance
Clue about how a something (like a control) is used
What are four benefits of test driven planning?
Code coverage: Every code segment that you write has at least one associated test so all code written as at least one test. Regression Testing: A regression test suite is developed incrementally as a program is developed. Simplified Debugging: When a test fails, it should be obvious where the problem lies. The newly written code needs to be checked and modified. System Documentation: The tests themselves are a form of documentation that describe what the code should be doing.
What is the "Software Engineering Code of Ethics and Professional Practice"?
Code that software engineers shall adhere to when developing software.
Give an example of map reduce.
Collecting a bunch of medical records from a database; computing the average age of all people with diabetes and returning the result.
Binding properties
Combining multiple observers to force properties in different objects to be synchronized or coordinated in some way.[21] No N/A
The component level.
Components are collections of objects and object classe that operate together provide related functions and services. You often have to adapt and extend the component by adding some code of your own.
Reuse: The Component Level
Components are collections of objects and object classes that you reuse in application systems.
Composite
Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly. Yes Yes N/A
What is the difference between software engineering and computer science?
Computer science focuses on theory and fundamentals; software engineering is concerned with the practicalities of delivering useful software
Business process re-engineering
Concerned with re-designing business processes to make them more responsive and more efficient Often reliant on the introduction of new computer systems to support the revised processes May force software re-engineering as the legacy systems are designed to support existing processes
_____________ management is the process of managing changes to an evolving software system. It is essential when a team of people are cooperating to develop software.
Configuration
Git Fork
Copy of someone else's repo on GitHub
Is Reverse Engineering Legal?
Copyright law protects expression only, not functionality
McCall's Quality Factors
Correctness Reliability Efficiency Integrity Usability Maintainability Testability Flexibility Portability Reusability Interoperability
List McCall's Quality Factors for product operation
Correctness Usability Reliability Integrity Efficiency
What is the difference between coupling and cohesion?
Coupling refers to how much classes depend on one another within the codebase. We should aim for low coupling between classes. Cohesion refers to the degree to which elements in a module logically belong together. We should aim for high cohesion within classes, packages and full software products.
Factory Method
Creates an instance of several derived classes
Abstract Factory
Creates an instance of several families of classes
Prototype
Creating an object by copying another and tweaking as necessary.
What is cyclomatic complexity? What does it measure?
Cyclomatic complexity counts edges and nodes in the control flow graph of a program. Higher cyclomatic complexity means more branching statements and a higher number of possible execution paths of a program. This requires more unit tests to obtain complete code coverage and also makes code harder to understand and hence, harder to debug.
Mediator
Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it allows their interaction to vary independently. Yes No N/A
Servant
Define common functionality for a group of classes. No No N/A
What are the three stages of testing?
Development Testing: Where the system is tested during development to discover bugs and defects. Release Testing: Where a separate testing team test a complete version of the system before it is released to the users. User Testing: Where users or potential users of a system test the system in their own environment.
Dynamic Polymorphism
Does not have method overloading. Write a method that works for any kind of "vehicle" or whatever the parent class is.
(Garvin's Quality Dimensions) Conformance
Does the software conform to local and external software standards that are relevant to the application? Does it conform to de facto design and coding conventions? For example, does the user interface conform to accepted design rules for menu selection or data input?
(Garvin's Quality Dimensions) Performance Quality
Does the software deliver all content, functions, and features that are specified as part of the requirements model in a way that provides value to the end user?
(Garvin's Quality Dimensions) Reliability
Does the software deliver all features and capability without failure? Is it available when it is needed? Does it deliver functionality that is error free?
(Garvin's Quality Dimensions) Feature quality
Does the software provide features that surprise and delight first-time end users?
by definition it should not but - a program running continuously for a long period of time may work increasingly slower or even crash - performance decreases with number of concurrent users and size of data - maintainability decreases with time -software becomes obsolete very quickly
Does usage and time cause degradation of software product quality?
Live Code Analysis
Done in conjunction w/OCA by attaching to debugger Can view variable contents and data flow
Configuration management.
During the development, many different versions of each software component are created. If you don't keep track of these versions, you are liable to include the worng versions of these components in your system.
Iteration planning
Each release will consist of several iterations. 1) exploration; write a task, split/combine tasks 2) commitment; developer accepts responsibility for estimating task effort, development team makes sure tasks are balanced across developers and that nobody is overcommitted. 4) steering; implement a task, record and give status, recover.
Dynamic Watermarks
Easter Eggs Dynamic Data Structure Embedded within the state of a program and showed with a particular input. Dynamic Execution Trace It is extracted by monitoring a special sequence of operations
Are output data or content presented so that it is understood immediately is an example of which quality attribute?
Efficiency
Can a sequence of operations for data input be performed with an economy of motion is an example of which quality concept?
Efficiency
Have hierarchical operations been organized in a way that minimizes the depth to which a user must navigate to get something done is an example of which quality attribute?
Efficiency
The interface layout and style allowing a user to locate operation and information efficiently is an example of which quality concept?
Efficiency
Multiton
Ensure a class has only named instances, and provide a global point of access to them. No No N/A
Singleton
Ensure a class has only one instance, and provide a global point of access to it. Yes Yes N/A
Resource acquisition is initialization (RAII)
Ensure that resources are properly released by tying them to the lifespan of suitable objects. No No N/A
Class Composition
Even more specific relationship. "consists-of relationship" or "contains relationship". The part cannot exist independent of the whole. Filled diamond.
Single Responsibility Principle
Every class should have a single responsibility. There should never be more than one reason for a class to change.
DSDM Principle 1: Focus on the Business Need
Every decision taken during a project should be viewed in the light of the overriding project goal - to deliver what the business needs to be delivered, when it needs to be delivered.
Scheduler
Explicitly control when threads may execute single-threaded code. No N/A
Factory Pattern.
Factory Pattern. The Factory Pattern provides one or more static factory methods used to create objects of a particular type. Factory methods replace constructors. Factory methods are useful in situations where a class cannot anticipate the exact implementation of objects that it must create. So we specify the factory method in an interface and the returned object is also an interface type. Lots of abstraction - good. The classes that implement the factory interface then specify the exact implementations of the objects created. Examples: public interface IAccountFactory { AccountBase createAccount(AccountType type); } "AccountBase" is an abstract class from which all concrete accounts ("GoldAccount", "BronzeAccount", etc...) inherit.
List the 3 creational patterns studied.
Factory pattern, builder pattern, singleton pattern.
Describe the TDD cycle and explain the rationale behind it.
First we must describe the relationship between unit testing and refactoring. Unit testing is the discipline of writing code that tests other code. As each test runs, it reports the test's success/failure with a simple true/false indicator. As its name suggests, a unit test tests a single unit (component, method, ...) of the source code. Unit tests act as a specification for the code. Refactoring is the process of changing code to improve its design but still maintaining correct behaviour. It is typically performed incrementally. The freedom to refactor with impunity is only made possible through unit testing. By writing unit tests first and refactoring afterwards, we can identify what changes to the code caused the test to move from a passing to failing state or vice versa. For this reason the TDD cycle mandates that we write unit tests first; write the minimum amount of code required to make the unit test pass and then refactor the code to improve its design. In keeping with Rainsberger's four elements, we typically refactor to minimise duplication and maximise clarity of the code, and also introduce greater abstraction to ensure that the code has fewer elements.
What are the main disadvantages of the Waterfall model?
First, clients may not be able to clearly articulate their requirements until they see working software. With the waterfall model, changing requirements will require the designers to restart the development process, leading to a delayed product and increased costs. Second, designers will not be able to anticipate future difficulties when designing a new software product or feature, in which case it is better to revise the design during the development process, rather than persist with a design does not account for newly discovered constraints, requirements and problems.
Monitoring the products
Focus on the quality of product within each phase of the SDLC. Objective: identify and remove defects throughout the lifecycle as early as possible
What are Ca and Ce for the classes in the Strategy pattern?
For 1 interface and 2 implementations. For interface: Ca = 2, Ce = 0. For implementations: Ca = 0, Ce = 1
Eliminating Symbolic Information
For compiled programs this happens sort of automagically (beyond our control) For Java and .NET we must ...
Design patterns
Four elements describe the pattern: The name The purpose; what problem is solves How to solve the problem; the solution The constraints we have to consider in our solution We want them for shared knowledge and shared vocab
Core Values of XP
Frequent communication among team members and with the customers. Simplicity in design and in code. Feedback at many levels; from continuous integration comes feedback to developers, from frequent releases comes feedback from customer to development team. Courage to implement difficult but necessary decisions.
ISO 9126
Functionality Reliability Usability Efficiency Maintainability Portability
What key quality attributes does the 9126 standard identify?
Functionality Usability Maintainability Efficiency Reliability Portability
Module
Group several related elements, such as classes, singletons, methods, globally used, into a single conceptual entity. No No N/A
Encapsulation
Group together data (variables) and methods (functions) in one unit. Also, all variables should be hidden (private) and only accessible by the methods in the class.
Specification Recovery (Levels of Reverse Engineering)
Harder. Meant to capture intent, requirements, system purpose for future implementation in newer paradigms.
Why Source code translation
Hardware platform update Staff skill shortages Organizational policy changes
EXISTS
In SQL, a comparison operator that checks whether a subquery returns any rows.
IN
In SQL, a comparison operator used to check whether a value is among a list of specified values.
IS NULL
In SQL, a comparison operator used to check whether an attribute has a value.
LIKE
In SQL, a comparison operator used to check whether an attribute's text value matches a specified string pattern.
Nested Query
In SQL, a quety that is embedded i another query. See Subquery.
BETWEEN
In SQL, a special operator used to check whether a value is within a range of specified values.
Developing Competing Software
In most industries this is by far the most popular application of reverse engineering Software is too complex to reverse completely. Only selective parts usually need to be reversed
Landau
In prone suspension, head extension is followed by back and LE extension; head flexion is followed by LE flexion Integrated at 24 months issues: limiting creeping, crawling, sitting
(Garvin's Quality Dimensions) Perception
In some situations, you have a set of prejudices that will influence your perception of quality. For example, if you are introduced to a software product that was built by a vendor who has produced poor quality in the past, your guard will be raised and your perception of the current software product quality might be influenced negatively. Similarly, if a vendor has an excellent reputation, you may perceive quality, even when it does not really exist.
What are the differences between software inspection and software testing?
Inspection: Concerned with the analysis of the static system representation to discover problems (static verification). Testing: Concerned with exercising and observing product behavior (dynamic verification).
REST Architecture
Inspired from the architecture of the largest distributed application ever: the Web • Stateless requests • Every resource has an individual URI • Uniform interface for all resources (GET, POST, PUT, DELETE) • The structure of a response is not specified
What is the term for costs that are incurred when you detect an error in a product prior to shipment?
Internal Failure Costs
Which quality cost does collecting quality metrics that allow an organization to asses the models of failure fall under?
Internal Failure Costs
Which quality costs does mitigating side effects from rework to correct an error prior to shipment fall under?
Internal Failure Costs
Which quality costs does performing rework and repair to correct an error prior to shipment fall under?
Internal Failure Costs
Failure costs can be subdivided into which two categories?
Internal and External Failure Costs
An interface following the three golden rules is an example of which quality concept?
Intuitiveness
An interface using a recognizable metaphor is an example of which quality concept?
Intuitiveness
Ascetics aiding in usage and understanding is an example of which quality concept?
Intuitiveness
Input specified to economize keystrokes or mouse clicks is an example of which quality concept
Intuitiveness
Interface layout conductive to easy understanding is an example of which quality concept?
Intuitiveness
Interface operations being easy to locate and initiate is an example of which quality concept
Intuitiveness
framework of quality assurance process
Involves checking standard compliance
Source code translation
Involves converting the code from one language (or language version) to another e.g. FORTRAN to C
Pair programming can be good
It promotes collective ownership. It provides immediate code reviews. It leads to sharing of knowledge, with a discussion of the best way to solve a problem.
Agile
Iterations of this cycle for certain stretches of time: 1. Planning 2. Requirement Analysis 3. Designing 4. Building 5. Testing Pros: Manage changing requirements. Minimal planning or documentation. Promotes team work & collaboration. Quickly change directions Cons: Overall plan/ agile manager. Cant handle complex dependencies. Iterations determine scope of project. Heavy reliance on personnel (minimal documentation, newcomer onboarding, customer interaction)
DSDM Principle 6: Develop Iteratively
Iterative Development, frequent demonstrations and comprehensive review are used to encourage timely feedback. Embracing change allows the team to converge on an accurate business solution. The concept of iteration is at the heart of everything developed as part of the DSDM approach.
What three aspects of a software product do McCall's Quality Factors focus on?
Its operation characteristics Its ability to undergo change its adaptability to new environments
Join
Join-pattern provides a way to write concurrent, parallel and distributed programs by message passing. Compared to the use of threads and locks, this is a high-level programming model. No N/A
Low-Fidelity
Keeps only the essence of the design
Epic
Large feature/user story
Git HEAD
Latest commit of current branch
Open source licensing.
Legally, the developer of the vode owns the code. They can place restrictions on how it is used by including legaly binding conditions in an open-source software licence.
Observer
Let objects observe the behavior of other objects so they can stay in sync
Adapter
Match interfaces of different classes
Obfuscation goals
Maximize obscurity Maximize resilience Maximize stealth Minimize overhead
Flexibility
Measure of how adaptable to 'reasonable' changes in a component is
Scalability
Measure of the ability to use the component as scope increases
Reliability
Measure of the average amount of time between failures
Reasons for Tamper-Proofing
Modifying the watermark in a program Extracting sensitive cryptographic information Attaching a virus to a program
Data transformations
Modify data structures
Lexical transformations
Modify variable names
XP Process
Multiple short cycles (2 weeks): 1. Meet with client to elicit requirements • User stories + acceptance tests 2. Planning game • Break stories into tasks, estimate cost • Client prioritizes stories to do first 3. Implementation • Write programmer tests first • Simplest possible design to pass the tests • Code in pairs • Occasionally refactor the code 4. Evaluate progress and reiterate from step 1
Yes
N/A
Software based techniques
Obfuscation Watermarking Tamper-proofing
Be able to read, interpret, modify and create UML class diagrams
Objects do not exist in isolation. UML shows these relationships: association, aggregation and composition, generalization, dependency.
What is a Continuous Integration server and why is it important in the cycle?
On larger projects with many frequent commits, it is usually difficult to run a full build locally on every commit. In order to ensure that pushed code still builds and runs successfully, a secondary check (perhaps using a larger test suite) can be run by a remote, Continuous Integration (CI) server.
Architectural design.
Once the interactions between the software system and the system's environment have been defined, you use this informations as a basis for designing it.
Body Righting
One leg flexed and crossed leads to segmental rolling integrated at 6 months issues: impair rolling, crawling, sitting
What are two different methods of unit test cases?
One method is to show that the component works as intended and the other is to show that the component properly handles common issues and do not crash the program.
-prepare SQA plan for the project -participate in the development of the project's software process description -review software engineering activities to verify compliance with he defined software process - audit designated software work products to verify compliance with those defined as part fo the software process - ensure that any deviations in software or work products are documented and handled according to a documented procedures - record any evidence of noncompliance and reports them to management
One primary resources is SQA Group who:
Lock
One thread puts a "lock" on a resource, preventing other threads from accessing or modifying it.[23] No PoEAA[14]
Layered Architecture
Organizes a system into a subtasks, where each group of subtasks is at a particular layer of abstraction Advantages • Layers can be developed independently (and incrementally) • Makes reuse easier • Makes individual layers interchangeable (as long as interface is same) • Layer interactions clearly defined (through interfaces) • When layer interface change, only adjacent layers affected Disadvantages • It's hard to achieve a clean separation • Layers sometimes introduce unnecessary work • Performance can be impacted since each layer needs to interpret the service request
Toddler Social Characteristics
Parallel Play, Associative Play, Trial and Error Learning
What are two types of testing strategies?
Partition testing: where you identify groups of inputs that have common characteristics and should be processed in the same way. Guideline-based testing: where you use testing guidelines to choose test cases.
Polymorphism
Polymorphism means taking different forms In Java, this refers to the fact that a subclass can always be used instead of a parent class. e.g. You can use a Sedan object, even if a Car is required: Car c = new Sedan("Ford");
DSDM Principle 7: Communicate Continuously and Clearly
Poor communication is often cited as the biggest single cause of project failure. DSDM practices are specifically designed to improve communication effectiveness for both teams and individuals.
Host-target development.
Production software does not usually exectue on the same computer as the software development environment. Rather, you develop it one one computer and execute it on a seperate computer.
Deobfuscation
Program slicing Pattern matching Statistical analysis Data flow analysis Theorem proving
Obfuscation
Protects s/w from reverse engineering
Tamper-proofing
Protects s/w from unauthorized modifications
Façade
Provide a simple unified interface to a set of interfaces in a subsystem
Proxy
Provide a surrogate or placeholder for another object to control access to it. Yes No N/A
Facade
Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use. Yes Yes N/A
Iterator
Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.
Iterator
Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation. Yes Yes N/A
Abstract Factory
Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
Abstract factory
Provide an interface for creating families of related or dependent objects without specifying their concrete classes. Yes Yes N/A
What is the goal of Quality Assurance?
Provide management and technical staff with the data necessary to be informed about product quality.
Proxy Pattern
Provides a surrogate or placeholder for another object to control access to it.
Why do we usually put messages instead of tasks on a queue?
Putting messages rather than tasks on the queue allows us to implement any type of consumer - it doesn't have to be a thread and we can write it separately from the producer.
Which consists of a set of auditing and reporting functions that assess the effectiveness and completeness of quality actions Quality Control or Quality Assurance?
Quality Assurance
A series of testing steps is applied to uncover errors in processing logic, data manipulation, and interface communication is part of Quality Control or Quality Assurance?
Quality Control
Code being inspected in order to uncover and correct errors before testing is part of Quality Control or Quality Assurance?
Quality Control
Models are reviewed to ensure they are complete and consistent is part of Quality Control or Quality Assurance?
Quality Control
System re-engineering
Re-structuring or re-writing part or all of a legacy system without changing its functionality Applicable where some but not all sub-systems of a larger system require frequent maintenance Re-engineering involves adding effort to make them easier to maintain. The system may be re-structured and re-documented
Establishing an infrastructure that supports solid software engineering methods and rational project management is part of Quality Control or Quality Assurance?
Quality Assurance
Fundamental Principles of XP
Rapid feedback through pair programming and continuous integration. Simplicity; simple is better, don't worry about eventualities that might never occur. Incremental change; make small changes that add up, refactor the code when necessary to clean it up and improve its structure. Embrace change. Do quality work; build a project that has high quality, do your best work at all times, note that the software process itself should enable this.
Non-Functional Requirement
Relate to quality attributes (reliability, testability, efficiency, usability, etc.)
Visitor
Represent an operation to be performed on elements of an object structure (e.g., a parse tree). Visitor lets you define a new operation without modifying the type hierarchy.
Visitor
Represent an operation to be performed on the elements of an object structure. Visitor lets a new operation be defined without changing the classes of the elements on which it operates. Yes No N/A
Waterfall
Requirement Analysis System Design Implementation Testing Deployment Maintenance Pros: Well documented requirements & documentation. Easy to manage phases across teams. Cons: Rigid phases. No working s/w until late stage. Not much reflection or revision. Big Bang Integration at the end
What are the phases of the waterfall model?
Requirements Definiton, system and software design, implementation and unit testing, operation and maintenance
Functional Requirement
Requirements about the functionality of the product
Watermarking properties
Resilient - resist de-watermarking attacks Cheap - minimal overheads Stealthy - retain statistical properties Unique identifying property - proves presence is deliberate
* List one way that plan-driven approaches differ from agile methods *
Resistant to change
Private Class Data
Restricts accessor/mutator access
List McCall's Quality Factors for product transition
Reusability Interoperability Portability
Software Safety
SQA activity that focuses on identifying potential hazards that may cause a software system to fail. Early identification of software hazards allow developers to specify design features to can eliminate or at least control the impact of potential hazards. Software reliability involves determining the likelihood that a failure will occur without regard to consequences of failures
Legacy system assessment
Scrap the system completely and modify business processes so that it is no longer required Continue maintaining the system Transform the system by re-engineering to improve its maintainability Replace the system with a new system
Agile Methods
Scrum Kanban Xtreme Programming DSDM (Dynamic Software Development Method) Feature Driven Development (FDD)
AND
The SQL logical operator used to link multiple conditional expressions in a WHERE or HAVING clause. It requires that all conditional expression evaluate to true.
Builder
Separate construction of complex object from representation so same creation process can create different representations.
Builder
Separate the construction of a complex object from its representation, allowing the same construction process to create various representations. Yes No N/A
Bridge
Separates an object's interface from its implementation
Builder
Separates object construction from its representation
Iterator
Sequentially access the elements of a collection
Integrated Development Environments (IDEs)
Set of software tools that supports different aspects of software development, within some common framework and user interface.
What are the steps of automated testing?
Setup: Where you initialize the system with the test case, namely the inputs and expected outputs. Call: Where you call the object or method to be tested. Assertion: Where you compare the actual results of the call with the expected results. If the assertion is true, the test is passed, else if it is false, it has failed.
SOLID
Single responsibility principle[4] a class should have only a single responsibility (i.e. changes to only one part of the software's specification should be able to affect the specification of the class). Open/closed principle[5] "software entities ... should be open for extension, but closed for modification." Liskov substitution principle[6] "objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program." See also design by contract. Interface segregation principle[7] "many client-specific interfaces are better than one general-purpose interface."[8] Dependency inversion principle[9] one should "depend upon abstractions, [not] concretions.
Creational Patterns
Singleton Abstract Factory Factory Method
Extreme Programming (XP)
Small teams working in the same room to facilitate communication. Minimization of documentation, with the code and the unit tests serving as documentation.
SDLC
Software Development Life Cycle Involves planning, defining, designing, building, testing, deployment
Which four broad activities help a software team achieve high software quality?
Software Engineering Methods Project Management Techniques Quality Control Actions Software Quality Assurance
process applied, resources expended, end product quality attributes
Software engineers strive to control the following...
Evaluating Software Quality and Robustness
Software vendors that don't publish their software's source code are essentially asking their customers to "just trust them." to try and sample a program binary in order to get an estimate of the general quality of the coding practices used in the program
Prototype
Specify the kinds of objects to create using a prototypical instance, and create new objects from the 'skeleton' of an existing object, thus boosting performance and keeping memory footprints to a minimum. Yes No N/A
Git Branch
Split in commit history, lets you work in parallel
List and discuss 8 different types of SW applications.
Stand-alone application Interactive transaction based applications Embedded control systems Batch processing systems Entertainment systems Modeling/simulation systems Data collection systems System of systems
Thread-specific storage
Static or "global" memory local to a thread. Yes N/A
Flexor Withdrawl and Crossed Extension
Stimulus to sole of foot causes with draw of leg into flexion and opposite leg extends Integrated at 2 months Issue: difficulty weight bearing or scissor gait
Data transformations (A classification of obfuscations)
Storage and encoding information
What design patterns are most useful for dealing with long conditional statements?
Strategy pattern and Template Method pattern.
Composite
Structural design pattern Intent: compose objects into tree structures to represent part-whole hierarchies. Clients can treat individual objects and compositions uniformly. Pros: It's easy to add new types of components Clients can manipulate both types homogeneously. Cons: It's hard to restrict the types of a component (design is too general)
Facade
Structural design pattern Intent: provide a unified interface to a set of interfaces in a subsystem. It defines a higher-level interface that makes the subsystem easier to sue Pros: Isolates clients from subsystem components Minimizes the dependency of the client code on the subsystems Cons: The Facade class risks accumulating a lot of responsibility because it is linked to all the classes in the application
What is a structural pattern? Give the four structural patterns studied.
Structural patterns are design patterns that simplify the design by identifying simple ways to realise structural relationships between entities. Proxy, Facade, Adapter, Decorator.
What is ethnography
Study of peolpe who actually use the systsem
What are Ca and Ce for the classes in the Template Method pattern?
Superclass depends on subclasses at compile time (for the implementation of hook methods). Subclasses depend on superclass by definition. By contrast, for Strategy pattern, the interface does not depend on its implementations at compile time.
Tonic Labyrinthine Reflex (TLR)
Supine - extensor tone dominantes; Prone - flexor tone dominates Integrated at 6 months Issue: impairs sitting, rolling, reaching
Forward engineering and re-engineering
System Spec -> Design and Implementation -> New System Existing System -> Understand and Transform -> Re-engineering
7. What is the difference between software engineering and system engineering?
System engineering is concerned with all aspects of computer based systems development including hardware, software, and process engineering. Software engineering is part of this more general process
Lazy initialization
Tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed. This pattern appears in the GoF catalog as "virtual proxy", an implementation strategy for the Proxy pattern. Yes No PoEAA[14]
How do you use user stories to make a class diagram?
Take the nouns from the card and make them classes. Take the verbs and make those methods within the classes.
DSDM Principle 3: Collaborate
Teams that work in a spirit of active cooperation and commitment will always outperform groups of individuals working only in loose association. Collaboration encourages increased understanding, greater speed and shared ownership, which enable teams to perform at a level that exceeds the sum of their parts.
Behavioral Patterns
Template Method Iterator Command Observer Strategy State
Black Box Testing
Testing without knowing what the code looks like
Adapter.
The Adapter pattern converts an interface from one form to another. It is used when we need to present a particular interface to the clients in our system, but would like to use a third-party interface that is not compatible with the client(s) in our system. Example: - Present an interface to clients for logging errors, but use a remote third party logging service.
Builder Pattern.
The Builder Pattern is used when we want to separate the construction of a complex object from its representation. The Builder interface is a fluent interface and in all implementations, the constructor should be declared private. Examples: - Creating a "Form" object that requires the candidate's name, address, phone number, age, etc...
Describe the Command pattern. Give an example of where it might be used.
The Command Pattern consists of a "Queue" class which holds a list of "Command" objects. A client creates a "Command" and adds it to a queue of "Commands" which may be executed later as a batch. See UML.
OR
The SQL logical operator used to link multiple conditional expressions in a WHERE or HAVING cluase. It requires only one of the conditional expressions to be true.
Facade.
The Facade pattern does not add any additional behaviour to a software component. It simply hides an ugly interface behind a more pleasant one - by appropriately delegating to the ugly interface.
What standard was developed to identify key quality attributes of software?
The ISO 9126 Standard
What is the Law of Demeter?
The Law of Demeter states "Only talk to your immediate friends". With regard to OOP design, this means that long chains of method calls should be avoided as they lead to more fragile code and also introduce a heavy maintenance and testing burden.
Describe the MVC pattern and give some examples of where it might be used. Also, how does it relate to the Observer pattern?
The MVC pattern is used when implementing graphical user interfcaes (GUIs). It separates the underlying business logic of an application (the Model) from its visual representation (the View) and uses a a Controller as an intermediate component. With the MVC pattern, the user sees the View; the View notifies the Controller; the Controller updates the Model and the Model notifies the View. It is important to note that the Model has no dependency on either the View or the Controller. However, the Controller has dependencies on both the View and the Model, and the View has a dependency on the Model. Within the MVC pattern, the View acts as an observer of the model and the controller acts as an observer of the View.
Describe the Observer pattern and give an example of where it might be used.
The Observer Pattern is a pattern in which a "Subject" class maintains a list of its "Observer"s and notifies them of any state changes. See UML. It is typically used when an object should be able to notify other objects about its state change, but without making assumptions about who these objects are. Examples of usage: - A "Queue" object that notifies "Consumer" objects when a new task/message is placed on the queue.
Describe the Presentation-Abstraction-Control pattern. When might we use this pattern instead of MVC?
The Presentation-Abstraction-Control (PAC) architectural pattern is typically used in implementing hierarchical GUIs. For example, a web app that includes multiple widgets on screen may require multiple MVC instances. PAC coordinates the activities of these MVC instances by passing messages between their controllers.
Proxy.
The Proxy pattern controls access to an object by providing a placeholder or surrogate object. It is typically used to implement caching. The "Proxy" class and the "RemoteService" implement the same interface, but the "Proxy" only delegates to the "RemoteService" if the requested content is not found in its cache.
COMMIT
The SQL command that permanently write data changes to a database.
ALTER TABLE
The SQL command used to make changes to table structure. When the command is followed by a keyword (ADD or MODIFY), it adds a column or changes column characteristics.
Singleton Pattern.
The Singleton Pattern ensures that a class has only one instance and provides a global point of access to it. The main problem with the Singleton Pattern is that any class that uses the singleton will be tightly coupled to the implementation of the singleton. Furthermore, accessing the singleton in the middle of code somewhere, creates a hidden/implicit dependency.
Why is the Strategy pattern usually preferable to the Template Method pattern?
The Strategy pattern allows the programmer to vary an algorithm's behaviour at runtime whereas the Template Method pattern requires that the algorithm's implementation at compile-time. This is because the superclass in Template Method pattern is dependent on its subclasses.
Describe the Strategy pattern and give some examples where we might use it.
The Strategy pattern simply allows for multiple implementations of the same interface. It allows the programmer to vary an algorithm's behaviour at runtime. Examples: - "View" interface with multiple implementations for multiple views. - "BillingStrategy" interface where prices are determined based on time of day.
Singleton
The ______ design pattern details a class implementation that can be instantiated only once
DSDM Principle 5: Build Incrementally From Firm Foundations
The concept of establishing firm foundations for the project before committing to significant development advocates first understanding the scope of the business problem to be solved and the proposed solution, but not in such detail that the project becomes paralyzed by overly detailed analysis of requirements.
How does the Template Method pattern relate to the open/closed principle?
The core of the algorithm is in the superclass and does not change. The hook methods allow us to alter the behaviour of the algorithm (template method) in the superclass without having to recompile the superclass.
Re-engineering advantages Reduced cost
The cost of re-engineering is often significantly less than the costs of developing new software
Define the quality concept of efficiency
The degree to which operations and information can be located or initiated
Define the quality concept of robustness
The degree to which software handles bad input data or inappropriate user interaction
Define the quality concept of Richness
The degree to which the interface provides a rich feature set
(ISO 9126 Quality Factors) Usability
The degree to which the software is easy to use as indicated by the following subattributes: understandability, learnability, operability.
(ISO 9126 Quality Factors) Efficiency
The degree to which the software makes optimal use of system resources as indicated by the following subattributes: time behavior, resource behavior.
(ISO 9126 Quality Factors) Functionality
The degree to which the software satisfies stated needs as indicated by the following subattributes: suitability, accuracy, interoperability, compliance, and security.
Define the quality concept of intuitiveness
The degree to which to interface follows expected usage patterns so that even a novice can use it without extensive training.
(ISO 9126 Quality Factors) Maintainability
The ease with which repair may be made to the software as indicated by the following subattributes: analyzability, changeability, stability, testability.
(ISO 9126 Quality Factors) Portability
The ease with which the software can be transposed from one environment to another as indicated by the following subattributes: adaptability, installability, conformance, replaceability.
(McCall's Quality Factors) Reliability
The extent to which a program can be expected to perform its intended function with required precision.
(McCall's Quality Factors) Correctness
The extent to which a program satisfies its specification and fulfills the customer's mission objectives.
Front controller
The pattern relates to the design of Web applications. It provides a centralized entry point for handling requests. No No
To prove copyright infringement:
The reverse engineer must create a product substantially similar to the original And have access to the original code in order to copy it
Compute kernel
The same calculation many times in parallel, differing by integer parameters used with non-branching pointer math into shared arrays, such as GPU-optimized Matrix multiplication or Convolutional neural network. No N/A
High-quality, low-business value
These systems should be scrapped
Low quality, low business value
These systems should be scrapped
Object.
They include both data and operations to manipulate data. They may be therefore be understood and modified as stand-alone entities.
Describe the Publish-Subscribe pattern and give an example of where it might be used.
This is very closely related to the Observer pattern. "Publisher"s publish topics onto a "Queue", and the Queue then notifies "Subscriber"s about particular state changes. Examples: - News articles published on a website and consumers can subscribe to particular topics.
What are the two primary reasons for software testing?
To demonstrate to the developers and customers that the software meets its requirements (validation testing) and to discover situations in which the behavior of the software is incorrect, undesirable, or does not conform to specifications. (defect testing)
User Stories
Title: Create Account Description: I can create a named account Title: List Accounts Description: I can get a list of all accounts. Title: Query Account Balance Description: I can query account balance. Title: Delete Account Description: I can delete a named account
release planning process in XP
To answer the question the question of what needs to be included in the next release.
According to Garvin's quality dimensions, quality begins with an assessment of conformance and terminates with a _________?
Transcendental View
** List David Garvin's Views on Quality
Transcendental View User View Manufacturer's View Product View Value-Based View
What are the key challenges facing software engineering
Trust and security hetergoenity buisness and social change
Twin [19]
Twin allows modeling of multiple inheritance in programming languages that do not support this feature. No No N/A
What are the three parts of Development Testing?
Unit Testing Component Testing System Testing
Unit test
Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation.
Unit Testing: Examples of Units
Units may be: - Individual functions or methods within an object. - Object classes with several attributes and methods - Composite components with defined interfaces used to access their functionality.
Be able to read, interpret, modify and create UML use-case diagrams
Use case diagrams are a representation of a user's interaction with the system. Similar to user stories but more formal and complex. Includes a summary of usage requirements, from the users point of view, includes the basic course of events as well as alternative paths and preconditions and post conditions.
Flyweight
Use sharing to support large numbers of similar objects efficiently. Yes No N/A
Model View Controller
Use when - • there are multiple ways to view and interact with the data • when future requirements for interaction and presentation of data are unknown Advantages • Clear separation of concerns • Allows data to change independently of its representation and vice versa • Multiple presentations to the same model • Single change to model updates all representations Disadvantages • Increased complexity, communication • Views & controllers are tightly bound
Be able to read, interpret, modify and create UML activity diagrams
Used to model business process, or a single usage scenario or a business rule. Graphical representation of activities or workflow, where the different shapes have different meanings. Black circle represents the start. Rounded rectangles represents actions. Diamonds represent decisions. Black bars represent concurrent activities.
What is the difference between verification and validation?
Verification: "Are we building the product right?" The software should conform to its specification. Validation: "Are we building the right product?" The software should do what the user really requires.
Model-View-ViewModel
View is just an element of the overall view. ViewModel uses these views and manages them. Better for multiple views/models on one page.
What is waterfall development?
Waterfall development is a software design process where progression to the next stage only occurs once the current stage has been completed. There are two main disadvantages to this method.
Class Hierarchies
We want to model a boat. It has a brand name, a fuel level, but it cannot drive. We can create an abstract class, Vehicle, from which we can extend for Car and Boat.
When to re-engineer
When system changes are mostly confined to part of the system then re-engineer that part When hardware or software support becomes obsolete When tools to support re-structuring are available When the boss is away
Achieving Interoperability with Proprietary Software
When working with a proprietary software library or operating system API, documentation is almost always insufficient
What techniques can be used to improve the design of legacy systems?
When working with legacy systems, we want to improve their design while still maintaining correct behaviour. However, in the absence of unit tests for the system, it is difficult to discern what constitutes "correct behaviour". This is the worst-case scenario when working with legacy systems. In this case, we typically begin by using visualisation tools to create a visual representation of the system - such as a control flow graph or dependency structure matrix. The next step is to use seams. A seam is a place where you can alter the behaviour of the program without editing it in that place. Every seam has an enabling point: a point at which we can substitute one piece of code for another, in order to analyse the code up to the enabling point. This allows us to break dependencies in the code as well as introduce unit tests for code up to the enabling point. Adding seams incrementally therefore allows us to break dependencies in the legacy system and introduce more unit tests to specify the correct behaviour of the code.
Describe Unit Testing
Where individual program units or object classes are tested. Unit testing should focus on testing the functionality of objects or methods.
Release management.
Where new versions of a software system are released to customers.
Component Testing
Where several individual units are integrated to create composite components. Component testing should focus on testing component interfaces.
System Testing:
Where some or all of the components in a system are integrated and the system is tested as a whole. System testing should focus on testing component interactions.
Configuration Management: Problem Tracking
Where support is provided to allow users to report bugs and other problems, and to allow all developers to see who is working on these problems and when they are fixed.
Problem tracking.
Where support is provided to allow users to report bugs and other problems, and to allow developers to see who is working on these problems and when they are fixed.
System integration.
Where support is provided to help developers define what versions of components are used to create each version of a system.
Configuration Management: System Integration
Where support is provided to help developers define what versions of components are used to create each version of a system. This description is then used to build a system automatically by compiling and linking the required components.
Version management.
Where support is provided to keep track of the different versions of software components.
Configuration Management: Version Management
Where support is provided to keep track of the different versions of software components. Version management systems include facilities to coordinate development by several programmers.
System implementation.
Where you create an executable version of the software.
Dynamic models.
Which describe the dynamic structure of the system and show the expected runtime interactions between the system objects.
Structural models.
Which describe the static structure of the system using object classes and their relationships.
State machine models.
Which show how objects change their state in response to events. These are represented in the UML using state diagrams.
Subsystem models.
Which show logical groupings of objects into coherent subsystems. These are represented using a form of class diagram with each subsystem as a package with enclosed objects.
Sequence models.
Which show the sequence of object interactions. These are represented using a UML sequence or a collaboration diagram.
What is WILT?
Whitespace-Integrated-over-Lines-of-Text. Acts as a heuristic for cyclomatic complexity.
Drawbacks with pair programming
Will be successful only if both people in the pair work well together. Feelings can be hurt. When not successful, reduces overall productivity of the team.
Memento
Without violating encapsulation, allow client to capture an object's state, and restore
Memento
Without violating encapsulation, capture and externalize an object's internal state allowing the object to be restored to this state later. Yes No N/A
Reserved Words
Words used by a system that cannot be used for any other purpose. For example, in Oracle SQL the word INITIAL cannot be used to name tables or columns.
Test-Driven Development
Write unit tests for all code. Design and write the test before you write the code, with the consultation of the customer. Run all test cases before checking in code. Use automated testing frameworks.
White Box Testing
Writing tests while looking at the code, for getting line coverage and stuff
Extreme Programming (XP)
XP: like iterative but taken to the extreme see XP diagram
Interface specification.
You need to specify interfaces so that objects and subsystems can be designed in parallel, Once an interface has been specified, the developers of other objects may assume that interface will be implemented.
Behavioral design pattern
are concerned with algorithms and the assignment of responsibilities between objects
Structural design pattern
are concerned with how classes and objects are composed to form larger structures
test
bj ;P
Mediator Pattern
centralizes complex communications and control between related objects.
Refactoring
changing the code but not the behavior
User-Mode Debuggers
conventional applications that attach to another process and can take full control of it Easy to setup and use
Adapter
convert interface of a class into one that another class requires, allowing interoperability
Adaptor Pattern
converts the interface of a class into another interface that clients expect. This pattern lets classes work together that couldn't otherwise because of incompatible interfaces.
Visitor Pattern
creates a "Traverser object" to perform some computation on each item in a composite (or linear for that matter) structure.
Prototype Pattern
creates new instances by copying existing instances.
5 pricinciples of agile devlopmetn
customer invovement, incremental development, people not process, embrace change, maintain simplicity
peer group
cверстники, группа равных
Daily Scrum
daily time-boxed event of 15 minutes, or less, for the Development Team to re-plan the next day of development work during a Sprint. Updates are reflected in the Sprint Backlog.
Bridge Pattern
decouples an abstraction from its implementation so that the two can vary independently.
product standards
define characteristic that all components should exhibit
Process standards
define how the software process should be enacted
Template Method
define skeleton of an algorithm or data structure, deferring some decisions to subclasses
Client Server Architecture
distributes functionality of the system into services Pros • Servers distributed across a network • Makes effective use of networked systems. May require cheaper hardware • Easy to add new servers or upgrade existing servers Cons • Each service/server is single point of failure (susceptible to DOS attacks) • Performance depends on the network as well as the system • May require a central registry of names and services — it may be hard to find out what servers and services are available • Data interchange may be inefficient
Watermarking can
embed secret message into a cover message
Command
encapsulate request as object, letting you parameterize clients with different actions, queue or log requests, etc.
Command Pattern
encapsulates a request as an object, thereby letting you parameterize other objects with different requests, queue or log requests, and support undoable operations.
Neck Righting
head rotates and body follows integrated at 4 months issues: difficulty rolling, crawling, sitting
Most software development is _______-target development. You use an IDE on a host machine to develop the software, which is transferred to a target machine for execution.
host
Galant
in prone suspension, give stimulus to side, lower body moves towards stimulus integrated 2 months issues: interfere with movement control
Appraisal costs
in-process and inter-process inspection, equipment, calibration and maintenance, testing
Software design and implementation are _____________ activities. The level of detail in the design depends on the type of system and whether you are using a plan-driven or agile approach.
inter-leaved
Describe the Callable interface.
interface Callable<T> {} The same as "Runnable" except that "void run()" method is replaced with "T call()". That is, we can now return a value after the computation has completed.
Standards developement
involve practitioners in development, review standards and their usage regularly, detailed standards should have associated tool support
Program modularization (KP)
involves reorganization to group related items
The re-engineering process (Key point)
involves source code translation, reverse engineering, program structure improvement, program modularization and data re-engineering
Distinction between development and maintience increasigly irrelevant
most systems are not built from scratch
The understandability of data-driven programs may
not be improved by re-structuring.
Data Transformations
obfuscation transformations that focus on obfuscating the program's data
Miryokuteki hinshitsu
observe product use int eh market place to uncover new product applications and identify new product to develop
Facade Pattern
provides a unified interface to a set of interfaces in a subsystem. This pattern defines a high-level interface that makes the subsystem easier to use.
Iterator Pattern
provides a way to access the elements of an aggregate object sequentially without exposing its underlying representation.
Abstract Factory Pattern
provides an interface for creating families of related or dependent objects without specifying their concrete classes.
review and audits sectoin
provides an overview of the approach used in the reviews and audits to be conducted during project
Monitoring the process
provides management with objective feedback regarding process compliance to approved plans, procedures, standards and analyses
Software reviews
purpose is to find defects before they are passed on to another software engineering activity or released to the customer
Prevention costs
quality planing, formal technical reviews, test equipment, training
A range of different models may be produced during an object-oriented design process. These include __________ models (class models, generalization models, association models) and ___________ models (sequence models, state machine models).
static dynamic
Proxy
surrogate for another object
Product Backlog refinement
the activity in a Sprint through which the Product Owner and the Development Team add granularity to the Product Backlog.
Source code trtanslation (Key Point)
the automatic conversion of of program in one language to another
standards
the key to effective quality management that might be international, national, organizational or project based
Scrum Artifact Sprint Backlog
the list of work the development team must address during the next sprint
Self-organization
the management principle that teams autonomously organize their work. Self-organization happens within boundaries and against given goals. Teams choose how best to accomplish their work, rather than being directed by others outside the team.
Reverse engineering (Kp)
the process of deriving the system design and specification from its source code
Emergence
the process of the coming into existence or prominence of new facts or new knowledge of a fact, or knowledge of a fact becoming visible unexpectedly.
Product Owner
the role in Scrum accountable for maximizing the value of a product, primarily by incrementally managing and expressing business and functional expectations for a product to the Development Team(s).
Scrum Master
the role within a Scrum Team accountable for guiding, coaching, teaching and assisting a Scrum Team and its environments in a proper understanding and use of Scrum.
Development Team
the role within a Scrum Team accountable for managing, organizing and doing all development work required to create a releasable Increment of product every Sprint.
Forecast (of functionality)
the selection of items from the Product Backlog a Development Team deems feasible for implementation in a Sprint.
Scrum Artifact Increment
the sum of all the product backlog items completed during a sprint, integrated with the work of all previous sprints
quality (ISO)
the totality of features and characteristics of a product or service that bear on its ability to satisfy specified or implied needs
Creational design pattern
they abstract away the object instantiation (creation)
Sprint Retrospective
time-boxed event of 3 hours, or less, to end a Sprint. It serves for the Scrum Team to inspect the past Sprint and plan for improvements to be enacted during the next Sprint.
Sprint Review
time-boxed event of 4 hours, or less, to conclude the development work of a Sprint. It serves for the Scrum Team and the stakeholders to inspect the Increment of product resulting from the Sprint, assess the impact of the work performed on overall progress and update the Product backlog in order to maximize the value of the next period.
Sprint Planning
time-boxed event of 8 hours, or less, to start a Sprint. It serves for the Scrum Team to inspect the work from the Product Backlog that's most valuable to be done next and design that work into Sprint backlog.
The objective of re-engineering (Key points)
to improve the system structure to make it easier to understand and maintain
Key challenges facing engineers?
trust adn security, hetergoeniality, buisness and social change
trained
Дипломированный специалист
Symmetrical Movement Pattern Progression
uncontrolled asymmetry, control symmetry, controlled asymmetry
Refactoring Software Reasons
understandable readable maintainable reusable extensible
State
use an object internally to represent the state of another object; delegate method invocations to the state object
Software Process Quality Assessment
use of standards and process models has a positive impact on the quality fo the software product
Flyweight
use sharing to support large numbers of fine-grained objects efficiently
analyst
аналитик
unbiased
беспристрастный
to gamble on
быть уверенным в (чём-л.)
whereas
в то время как
therein
в этом месте, здесь, тут, там, в нём
entire
весь, целый
interaction
взаимодействие
involves
включает в себя
enable
включать, активировать
Customer Acceptance Tests
• Client must describe how the user stories will be tested - With concrete data examples, - Associated with (one or more) user stories • Concrete expressions of user stories
Refactoring and Regression Testing
• Comprehensive suite needed for fearless refactoring • Only refactor working code - Do not refactor in the middle of implementing a feature • Plan your refactoring to allow frequent regression tests • Modern tools provide help with refactoring • Recommended book: Martin Fowler's "Refactoring"
Structure of Agile Team
• Cross functional team - Developers, testers, product owner, scrum master • Product Owner: Drive product from business perspective - Define and prioritize requirements - Determine release date and content - Lead iteration and release planning meetings - Accept/reject work of each iteration
Structure of Agile Team cont.
• Cross functional team - Developers, testers, product owner, scrum master • Scrum Master:Team leader who ensures team is fully productive - Enable close cooperation across roles - Remove blocks - Work with management to track progress - Lead the "inspect and adapt" processes
Scrum
• Cross-functional teams • Sprints: 4 week iterations: Sprint planning, Sprint, Daily Scrum meeting, Sprint Retrospective meeting • Other terms: Product backlog, (Sprint) burn-down chart
Automate Acceptance Tests
• Customer can write and later (re)run tests - E.g., customer writes an XML table with data examples, developers write tool to interpret table • Tests should be automated - To ensure they are run after each release
Planning Game
• Customer chooses the important stories for the next release • Development team bids on tasks - After first iteration, we know the speed (units/ week) for each sub-team • Pick tasks => find completion date • Pick completion date, pick stories until you fill the budget • Customer might have to re-prioritize stories
Meetings: Daily Scrum
• Daily Scrum: Each day during the sprint, a project status meeting occurs • Specific guidelines: - Start meeting on time - All are welcome, only committed members speak - Meeting lasts 15 min • Questions: - What have you done since yesterday? - What are you planning to do today? - Do you have any problems preventing you from finishing your goals?
Sprint Planning
• Decide which user stories from the backlog go into the sprint (usually Product Owner) • Team determines how much of this they can commit to complete • During a sprint, the sprint backlog is frozen
What's Different About XP
• Develop infrastructure and frameworks as you develop your application - not up-front - quickly delivering business value is the driver of XP projects.
Tasks
• Each story is broken into tasks - To split the work and to improve cost estimates • Story: customer-centered description • Task: developer-centered description • Example: - Story: "I can create named accounts" - Tasks: "ask the user the name of the account" "check to see if the account already exists" "create an empty account" • Break down only as much as needed to estimate cost • Validate the breakdown of stories into tasks with the customer
XP Customer
• Expert customer is part of the team - On site, available constantly - XP principles: communication and feedback - Make sure we build what the client wants • Customer involved actively in all stages: - Clarifies the requirements - Negotiates with the team what to do next - Writes and runs acceptance tests - Constantly evaluates intermediate versions - Question: How often is this feasible?
Conclusion: XP
• Extreme Programming is an incremental software process designed to cope with change • With XP you never miss a deadline; you just deliver less content
Test-Driven Development. Bug Fixes
• Fail a unit test - Fix the code to pass the test • Fail an acceptance test (user story) - Means that there aren't enough user tests - Add a user test, then fix the code to pass the test • Fail on beta-testing - Make one or more unit tests from failing scenario • ***Always write code to fix tests*** - Ensures that you will have a solid test suite
Refactoring: Improving the Design of Code
• Make the code easier to read/use/modify - Change "how" code does something • Why? - Incremental feature extension might outgrow the initial design - Expected because of lack of extensive early design
Goals
• Minimize unnecessary work • Maximize communication and feedback • Make sure that developers do most important work • Make system flexible, ready to meet any change in requirements
Why Some Managers Resist Pairing?
• Myth: Inefficient use of personnel - That would be true if the most time consuming part of programming was typing ! - 15% increase in dev. cost, and same decrease in bugs • 2 individuals: 50 loc/h each, 1 bug/33 loc • 1 team: 80 loc/h, 1 bug/40 loc • 1 bug fix costs 10 hours • 50kloc program 2 individuals: 1000 devel + 15000 bug fix • 50kloc program 1 team: 1250 devel + 12500 bug fix • Resistance from developers - Ask them to experiment for a short time - Find people who want to pair
Conclusion: Process
• NO SILVER BULLET! - Need to adapt according to specific goals - No single process uniformly good or bad • Necessary (See ESR email to Linus Torvalds)
What's Different About XP
• No specialized analysts, architects, programmers, testers, and integrators - every XP programmer participates in all of these critical activities every day. • No complete up-front analysis and design - start with a quick analysis of the system - team continues to make analysis and design decisions throughout development.
Scrum of Scrums
• Normally after the scrum • Meet with clusters of teams to discuss work, overlap and integration • Designated person from each team attends • 4 additional questions: - What has the team done since last meeting? - What will the team do before we meet again? - Is anything slowing your team down? - Are you about to put something in another team's way?
XP Practices
• On-site customer • The Planning Game • Small releases • Testing • Simple design • Refactoring • Metaphor • Pair programming • Collective ownership • Continuous integration • 40-hour week • Coding standards
What can go wrong?
• Requirements defined incrementally - Can lead to rework or scope creep • Design is on the fly - Can lead to significant redesign • Customer representative - Single point of failure - Frequent meetings can be costly
Benefits of Pair Programming
• Results in better code - instant and complete and pleasant code review - copilot can think about big-picture • Reduces risk - collective understanding of design/code • Improves focus and productivity - instant source of advice • Knowledge and skill migration - good habits spread
Evaluation and Planning
• Run acceptance tests • Assess what was completed - How many stories ? • Discuss problems that came up - Both technical and team issues • Compute the speed of the team • Re-estimate remaining user stories • Plan with the client next iteration
Sprint-related Meetings
• Sprint Planning • Sprint Review • Sprint Retrospective
Stories implemented by Tasks
• Story = Collection of tasks • Wait to break stories into task until story is planned for current iteration • Tasks estimated in hours • Stories validated by acceptance tests
Iterations
• Team works in iterations to deliver user stories • Set of unfinished user stories kept in "backlog" • Iteration time fixed (say 2 weeks) - Stories planned into iterations based on priority/size/team capacity - Each user story is given a rough size estimate using a relative scale
Why Write Tests First?
• Testing-first clarifies the task at hand - Forces you to think in concrete terms - Helps identify and focus on corner cases • Testing forces simplicity - Your only goal (now) is to pass the test - Fight premature optimization • Tests act as useful documentation - Exposes (completely) the programmer's intent • Testing increases confidence in the code - Courage to refactor code - Courage to change code
Example: Accounting Customer Tests
• Tests are associated with (one or more) stories 1. If I create an account "savings", then another called "checking", and I ask for the list of accounts I must obtain: "checking", "savings" 2. If I now try to create "checking" again, I get an error 3. If now I query the balance of "checking", I must get 0. 4. If I try to delete "stocks", I get an error 5. If I delete "checking", it should not appear in the new listing of accounts
Server Oriented Architecture
• The extreme generalization of Client-Server • Instead of monolithic systems one has many concise services
When to (Not) Use XP
• Use for: - A dynamic project done in small teams (2-10 people) - Projects with requirements prone to change - Have a customer available • Do not use when: - Requirements are truly known and fixed - Cost of late changes is very high - Your customer is not available (e.g., space probe)
Extreme Programming
• Waterfall model inspired by civil engineering • Civil engineering metaphor is not perfect - Software is more organic than concrete - You "grow the software" to meet changing requirements • Extreme Programming (XP) addresses this - A version of the iterative model discussed before
Refactoring: Change Names
• Why? - A name should suggest what the method does and how it should be used • Examples: - moveRightIfCan, moveRight, canMoveRight • Meth1: rename the method, then fix compiler errors - Drawback: many edits until you can re-run tests • Meth2: copy method with new name, make old one call the new one, slowly change references - Advantage: can run tests continuously
Refactoring: Remove Duplicated Code
• Why? Easier to change, understand • Inside a single method: move code outside conditionals if(...) { c1; c2 } else { c1; c3} c1; if(...) { c2 } else { c3 } • In several methods: create new methods • Almost duplicate code - ...balance+5... and...balance-x... - int incrBalance(int what) { return balance + what; } ... incrBalance(5) ... and ... incrBalance(- x) ...
The Planning Game: User Stories
• Write on index cards (or on a wiki) - meaningful title - short (customer-centered) description • Focus on "what" not the "why" or "how" • Uses client language - Client must be able to test if a story is completed • No need to have all stories in first iteration
Test-driven development
• Write unit tests before implementing tasks • Unit test: concentrate on one module - Start by breaking acceptance tests into units Think about names and calling conventions • Example of a test
Legacy Metrics
•Many of these are code-based, not designed based •Lines of code —Easy to calculate, consistent, intuitive —Comments and white space increase lines of code but may increase understandability —Short, tricky code segments can be most complex
Henry-Kaufman Information Flow
•Measures information flow between modules —Parameters —Global variable access —Inputs —Outputs •Doesn't consider complexity of modules themselves •Fan-In: # of incoming pieces of information •Fan-Out: # of outgoing pieces of information •Complexity of a module (fan-in * fan-out)^2 •Complexity of a system: the sum of the complexity of all of the modules •Modified complexity of a module Ci * (fan-in * fan-out)^2 where Ci is the internal complexity of a module
McCabe's Cyclomatic Complexity
•Program quality is related to control flow complexity •Based on program flow graph, calculate —E = # of edges in graph —N = # of nodes in graph —Cyclomatic number = E - N + 1 —CN = # of closed regions + 1 = # of branching nodes + 1 •CN < 10, low risk •CN > 50 high risk •Note: CN is also the # of linearly independent paths through the program
Halstead's Complexity Metric
•The more operators and operands a system has, the more complex it is •Operators are things like +, -, if, while •Operands are variables and constants •Four measures —n1 = # of distinct operators —n2 = # of distinct operands —n3 = total # of operators —n4 = total # of operands •Calculated values —Program vocabulary n = n1 + n2 —Program length N = N1 + N2 —Program volume V = N*(log2n) •Measures lexical complexity of program, not program structure or logic
Card-Glass Complexity
•Three measures using fan-in and fan-out 1. Structural complexity of a module •Sm = (Fan-outm)^2 2. Data complexity of a module •Let Pm = # of variables passed to and from the module •Dm = Pm/ (Fan-outm + 1) 3. System complexity Cm = Sm + Dm
Free Software Foundation (Copy Left)
→The freedom to run the program as you wish, for any purpose. →The freedom to study how the program works, and change it so it does your computing as you wish →The freedom to redistribute copies so you can help your neighbor →The freedom to distribute copies of your modified versions to others