SWE I Theory Flashcards

1
Q

Key Concepts of SCRUM

A

Product backlog: that is a collection of requirement (features) that should be implemented in the final production, requirements are ranked by product owner, picked by the SCRUM master.

Iterative Sprint: this is a short iteration that aims to implement a subset of the functionalities, the ones collected in the sprint backlog. In the sprint backlog, we must pick from the product backlog those requirements that are feasible to be done during the sprint (1 Month, not flexible).

Required meetings:

  • Start of the sprint: 1 day planning meeting
  • During every day: 15min every morning
  • End: demo meeting (max 4 hours)

Roles in the team:

  • scrum master (team leader)
  • product owner (owner of delegate of the business)
  • the development team
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Given a set of functional requirements, often many designs are possible. How to select one design option versus other ones?

A

Given that all designs satisfy the functional requirements, selection should be done considering NON functional requirements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In the context of configuration management, what is the ‘copy modify merge’ approach and what are its pros and cons?

A

This is a less rigid strategy, allowing many developers to check out the same file and then parallel work on the same file. The only problem here is that there is the necessity to merge the changes introduced by two or more developers (there are tools that can perform automatic merge).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In the context of change control, describe the lock-modify-unlock technique, its pros and cons.

A

This strategy is like a serialization of the changes. Developer tries to get a lock over the CI using the checkout, if nobody has check out that CI, then that CI can be changed by him, otherwise he cannot checkout the CI and must wait for the lock release. The lock is released only when the developer check in.

The problem of this approach is that, if the locker forgets to unlock no other developer can modify it. Also, there is no possibility to work in parallel, just a developer at a time. This is a too rigid approach.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the definition of ‘exhaustive testing’ ? Is it possible?

A

Try all possible test cases (for a function, a class, a program).

Normally not feasible due to virtually infinite number of test cases

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is ‘mutation testing’ and what is its goal?

A

Evaluate how a test suite is good by injecting errors (mutations) in a program and verifying how many mutations are caught by the test suite

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

There are many software processes. What factors characterize a software process?

A
  • Number of iterations
  • sequential vs parallel activities
  • new development vs maintenance
  • emphasis on documents
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What techniques can be used to validate the functional requirements of an application to be built?

A
  • Inspection of requirements
  • prototype building
  • GUI prototype building
  • writing acceptance test cases
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In the context of configuration management, what is the purpose of ‘check in’ ‘check out’ operations?

A

Enforce sequential changes to CI (in lock modify unlock mode) or support parallel changes (in copy modify merge mode) without inconsistencies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe briefly the pair programming technique in Xtreme Programming

A

Two people working on one machine to develop both production code and test cases. One person writes, the other controls and suggests improvements / modifications. The pair reverses roles often.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

An application is developed for an organization in 6 months by 3 people. Then it is used by the organization during 12 years. Argument whether maintenance costs could be higher /lower than development costs

A

Maintenance costs will probably be much higher than development cost, since the duration of operations (12 years) is way longer than development (6 months)
Effort for development: 3*6 = 18 person months
Effort for maintenance: assuming 6 months per year (half a person maintaining the application) = 6*12 = 72 person months

More precisely, if maintenance requires more than 18person months / 12 = 1,5 person months per year = 33 person days per year, then maintenance costs will be higher than development costs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In the context of verification and validation, describe Weinberg’s law

A

The creator of a program is unsuitable to test it – for emotional attachment to its creature the programmer tends to overlook defects in it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In the context of configuration management, explain what is a baseline and when is it used.

A

A baseline is a configuration (== a set of configuration items) in a stable form (ex compiles, links, passes all regression tests).
Not all configurations are baselines
Used to deliver an application internally / externally, while development continues on next version.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Describe the waterfall process, its pros and cons.

A

Activities (requirement design implementation unit test intergration test system test) are done in sequence (activity i+1 starts only after activity i is completed).
Document oriented.
Pro: easy structure of activities; agreement on design allows to allocate tasks to many, distributed workers/companies

Con: delivery to customer and validation of requirements and system happen very late. Changes require to restart the process, slowness and lack of flexibility.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe the singleton design pattern, and when it can be used.

A

Creational pattern. Ensures that only one instance of the class is created. Ex in an operating system the load balancer must be unique, and could be implemented by a singleton.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the typical states of a Change Request in a maintenance process?

A

The changes are the key of maintenance process. There are three big way to maintain software:

  • Corrective Maintenance – a defect to be fixed
  • Perfective Maintenance – modification to existing function or characteristic to improve it
  • Evolutive Maintenance – a new function or characteristic is introduced

The changes can be originated by users or developers and are done by a group of maintainers.

The main issue is that the change made to the product can change it radically over time; The architecture of the system must be preserved from erosion and must be controlled the suitability for users/market.

17
Q

In which cases an Oracle can be automatic?

A

If previous, reliable version of software application is available, or if function can be expressed mathematically

18
Q

In the context of configuration management, what is the derivation history of a configuration item?

A

History of versions and changes to them

19
Q

What is the core content of the ISO 12207 standard?

A

Hierarchical List of activities in the software process

20
Q

Repository pattern

A

The core takes charge in offering an horizontal service to all the plugins, such that they do not need to be concerned on how data is produced. Sharing model is published as the repository schema.

Pros:

  • Many plugins can be attacched
  • Plugins can be developed a separate times

Cons:

  • Data model must be shared among all plugins
    • some compromises are impossible to avoid
  • Data model evolution is difficult and expensive
21
Q

Provide an example of a static analysis rule from MISRA-C

A

34: The operands of the && and || operators shall be enclosed in parenthesis unless they are single identifiers.
67: Identifiers modified within the increment expression of a loop header shall not be modified inside the block controlled by that loop header.

22
Q

What is the basic principle of the Visual approach to GUI testing? What is different with respect to layout-based scripted GUI testing?

A

Visual approach: graphic components (buttons, menus etc) are recognized via image recognition
Layout approach: graphic components are identified retrieving their ID (used by the graphic library) or by specific unique properties.

23
Q

Describe the ‘pipeline’ architectural style, and when it can be used

A

Many modules are connected in a sequence.

Each module is independent of others. Data from one module flow to the next one. Data is the only communication means to a module.

24
Q

Describe briefly the pair programming technique from XP

A
  1. On Site Customer (Whole team) – Many software projects fail because do not produce software that meet business needs. Real customer must be part of the team defining business needs, answering questions and prioritizing features. Idea is to fit the customer needs not the developer ones.
  2. Small Releases – Put the system into release ASAP; have a fast feedback is fundamental and to do that is important have short cycle time, planning 1-2 months, that is also easier to plan then 6-12 months’ cycle.
  3. System metaphor – There must be three lines describing what the system should do. This clarify the idea of the project and every change must be done respecting it.
  4. Simple design – Often the developers do the design able to be extended later in future. XP suggest instead do to design for today or tomorrow because otherwise the design will get a lot of useless things. Then follow the right design choices, runs always the test, do not duplicate code, fewest possible classes.
  5. Refactoring – Restructure often the system without changing the functionalities. The goal is to keep design simple and then, change bad design when found and remove dead code (do not left it for future use, you will not use it anymore).
  6. Pair Programming – all production code is written with two people looking at one workstation, one at the keyboard and one thinking strategically about potential improvements, test cases, issues. Pairs swap all the time and they should have the same experience. It is proved that this approach gives many advantages, there is not a single expert of any part of the system, the code is often better due to the inspection made by the pair. An experiment was done and documented in this article Strengthening the Case for Pair-Programming (of Williams, Laurie, Kessler, Robert R., Cunningham, Ward, and Jeffries, Ron, IEEE Software). It is proved that PP increases Quality and effort reducing duration.
  7. Test Driven Development – Write automatic test before production code. Developers must write unit test and the user must do acceptance test. Strong emphasis on regression testing, unit tests must be executed all the time and test must be passed 100% (Kent Beck, Test-Driven Development: By Example. Addison-Wesley).
  8. The planning game – it is a meeting that occurs once per iteration, often one per week. There must be discussed business decision (which stories should be developed and should be defined a priority of those and a release date) and technical decisions (time estimated for each feature, elaborate consequences of business decisions and team organization and scheduling). This is used in the Scrum.
  9. Sustainable development – developers should not work more than 40 hours for week. Developing full speed only works with fresh people, working overtime in a row indicates problems.
  10. Collective ownership – All code can be changed by anybody on the team, there is not an owner. Everybody should improve bad code when detected.
  11. Continuous integration – Integration happens after a few hours of development. After code is released into the baseline all the tests are run and in case of error must revert to old version, fixing problems and retrying.
  12. Coding Standard – Team should adopt a coding standard making easier to understand another people’s code. Avoids also code changes because of syntactic preferences.
25
Q

You have to start a software project. What are the factors to consider in selecting a suitable software process?

A

Criticality (safety critical, mission critical, other), size (correlates to number of developers needed), domain, maintenance vs new development

26
Q

What is the difference between ‘correctness’ and ‘reliability’?

A

Correctness: a program produces the requested output for every input in the input space

Reliability: probability of providing the requested output over a period of time

Correctness is equal to reliability=100% over an infinite period of time
Normally defects are contained by a program, so reliability is <100% over a finite period of time

27
Q

Describe maintainance software process

A
  1. Receive change requests (CR)
  2. Filter CR
  3. Rank CR
  4. Assign CR to developer – design, code, unit test, integration test Merge CR with next release of application
  5. Release
28
Q

Given this dependency graph propose and justify an integration strategy.

A

If bottom up: test M3, test M4, test M2+M3+M4, test M5, test all
If top down: test M1 +stubM2 + stubM5, test M1+M2+M5+stubM3 + stubM4, test all Bottom up requires less stubs / drivers

29
Q

In the context of configuration management, explain what is versioning and why it is useful.

A

Versioning = keep copy of each instance of a configuration item (CI). This allows to keep the history of all modifications to a CI, and allows to roll back to any past instance of a CI

30
Q

When a project reuses external components, how the activities of requirements and design are impacted?

A

Req: search and evaluate components, do gap analysis between what is required, what is offered by components

Design: integrate components in design (possibly using wrappers, adapters)