Main Flashcards
In traditional software engineering you design software so that changes can easily be implemented.
Does Extreme programming (XP) also concern itself about that?
No it is often wasted effort.
Accept that you should reorganize the software if changes actually occur.
In extreme programming. When should you refactor code?
All developers are expected to refactor the code continously as soon as possible code improvements are found.
This keeps the code simple and maintainable.
What are the advantages of test-first development?
The developers have to thoughoutly understand the specifications.
- This avoids ambiguity
- Also TFD avoids test lag
What is test lag?
Features are implemented faster than they can be tested.
The implementation gets further and further ahead of the testing and there is a tendency to skip tests, so that the development schedule can be maintained.
What is a Software Process?
The entire process of creating software:
Early requirements –> development –> deployment –> decommision
All software processes involve:
- Specification
- Design and Implementation
- Validation
- Evolution
What are the two main categories of software products?
- Generic products:
- Stand-alone systems that are marketed and sold to any customer who wishes to buy them
- The sofware developer makes the decisions on software changes.
- Customized products:
- Software that is commisioned by a specific customer to meet their own needs
- The customer makes the decisions on software changes.
Essential attributes of good software: Maintainability
Software should be written in such a way so that it can evolve to meet the changing needs of customers.
This is a critical attribute because software change is an inevitable requirement of a changing business environment.
Essential attributes of good software: Dependability and security
Software dependability includes a range of characteristics:
- Reliability
- Security
- Safety
Dependable software should not cause physical or economic damage in the event of system failure.
Essential attributes of good software: Efficiency
Software should not make wasteful use of system resources such as memory and processor cycles.
Efficiency therefore includes:
- Responsiveness
- Processing time
- Memory utilisation
- etc.
Essential attributes of good software: Acceptability
Software must be acceptable to the type of users for which it is designed.
This means that it must be understandable, usable and compatible with other systems that they use.
The four software process activities: Specification
Where the customers and engineers define the software that is to be produced and the constraints on its operation.
The four software process activities: Design and Implementation
Where the software is designed and programmed.
The four software process activities: Validation
Where the software is checked to ensure that it is what the customer requires.
The four software process activities: Evolution
Where the software is modified to reflect changing customer and market requirements.
Software process model: The waterfall model
Separate and distinct phases of specification and development.
Plan-driven model.
Software process model: Incremental development
Specification, development and validation are interleaved. May be plan-driven or agile.
Software process model: Integration and configuration
The system is assembled from existing configurable components. May be plan-driven or agile.
Name the phases of the waterfall model
Name the phases of incremental development
Definition: Verification and validation (V & V)
- Verification: To show that the system conforms to its specification
- Validation: To show that the system meets the expectations of the system customer
Name the three different kinds of testing
- Component testing
- Individual components are tested independently;
- Components may be functions or objects or coherent groupings of these entities.
- System testing
- Testing of the system as a whole. Testing of emergent properties is particularly important.
- Customer testing
- Testing with customer data to check that the system meets the customer’s needs.
What is a software prototype and when is it used?
- A prototype is an initial version of a system used to demonstrate concepts and try out design options.
- A prototype can be used in:
- The requirements engineering process to help with requirements elicitation and validation;
- In design processes to explore options and develop a UI design;
- In the testing process to run back-to-back tests.
Explain incremental delivery
Rather than deliver the system as a single delivery, the development and delivery is broken down into increments with each increment delivering part of the required functionality.
Name the principles of agile methods
- Customer involvement
- Incremental delivery
- People not process
- Embrace change
- Maintain simplicity
Principle of agile methods: Customer involvement
Customers should be closely involved throughout the development process. Their role is to provide and prioritize new system requirements and to evaluate the iterations of the system.
Principle of agile methods: People not process
The skills of the development team should be recognized and exploited. Team members should be left to develop their own ways of working without prescriptive processes.
Principle of agile methods: Embrace change
Expect the system requirements to change and so design the system to accommodate these changes.
Principle of agile methods: Maintain simplicity
Focus on simplicity in both the software being developed and in the development process. Wherever possible, actively work to eliminate complexity from the system.
Extreme programming: Incremental planning
Requirements are recorded on story cards and the stories to be included in a release are determined by the time available and their relative priority. The developers break these stories into development ‘Tasks’.
Extreme programming: Small releases
The minimal useful set of functionality that provides business value is developed first. Releases of the system are frequent and incrementally add functionality to the first release.
Extreme programming: Simple design
Enough design is carried out to meet the current requirements and no more
Extreme programming: Test-first development
An automated unit test framework is used to write tests for a new piece of functionality before that functionality itself is implemented.
Extreme programming: Pair programming
Developers work in pairs, checking each other’s work and providing the support to always do a good job.
- They sit together at the same computer
- Pairs are created dynamically so that all team members work with each other
- The knowledge sharing is very important, it removes the risks when a team member leaves.
Extreme programming: Collective ownership
The pairs of developers work on all areas of the system, so that no islands of expertise develop and all the developers take responsibility for all of the code. Anyone can change anything.
Extreme programming: Continuous integration
As soon as the work on a task is complete, it is integrated into the whole system. After any such integration, all the unit tests in the system must pass.
Extreme programming: Sustainable pace
Large amounts of overtime are not considered acceptable as the net effect is often to reduce code quality and medium term productivity
Extreme programming: On-site customer
A representative of the end-user of the system (the customer) should be available full time for the use of the XP team. In an extreme programming process, the customer is a member of the development team and is responsible for bringing system requirements to the team for implementation.
Name the principles and practices of extreme programming
- Incremental planning
- Small releases
- Simple design
- Test-first development
- Refactoring
- Pair programming
- Collective ownership
- Continuous integration
- Sustainable pace
- On-site customer
Explain the pig and chicken
- The chicken is involved but the pig is commited
- On agile projects:
- Pig = Developers
- Chicken = Everyone else who contribute but do not commit to any work.
Explain the product backlog by chickens
- Complete task list
- Priority by product owner
- Declar value for all tasks
- Pitfalls:
- Imprecise tasks
- Superficial value-setting
Explain the sprint backlog by pigs
- Agreed sprint length
- Choose from the top (most valued by the product owner)
- Effort decided solely by the developers
- Pitfalls:
- Superficial estimation
- Superficial decomposition
- Interference from chickens
- Working on self-defined tasks
- Unclear visualisation of progress
- Unclear definitions of tasks’ states
What are ways of writing a system requirements specification?
- Natural language
- Structured natural language
- Design description languages
- Graphical notations
- Mathematical specifications
System requirements specification: Natural language
The requirements are written using numbered sentences in natural language. Each sentence should express one requirement.
System requirements specification: Structured natural language
The requirements are written in natural language on a standard form or template. Each field provides information about an aspect of the requirement.
System requirements specification: Design description languages
This approach uses a language like a programming language, but with more abstract features to specify the requirements by defining an operational model of the system. This approach is now rarely used although it can be useful for interface specifications.
System requirements specification: Graphical notations
Graphical models, supplemented by text annotations, are used to define the functional requirements for the system; UML use case and sequence diagrams are commonly used.
System requirements specification: Mathematical specifications
These notations are based on mathematical concepts such as finite-state machines or sets. Although these unambiguous specifications can reduce the ambiguity in a requirements document, most customers don’t understand a formal specification. They cannot check that it represents what they want and are reluctant to accept it as a system contract.
Explain the requirements validation techniques
- Requirements reviews
- Systematic manual analysis of the requirements
- Prototyping
- Using an executable model of the system check requirements
- Test-case generation
- Developing tests for requiremetns to check testability
Name the requirements management decisions
- Requirements identification
- Each requirement must be uniquely identified so that it can be cross-referenced with other requirements
- A change management process
- This is the set of activities that assess the impact and cost of changes
- Traceability policies
- These policies define the relationship between each requirement and between the requirements and the system design that should be recorded
- Tool support
- Tools that may be used range from specalist requirements management systems to spreadsheets and simple database systems
What is data-driven modeling?
- Data-driven models show the sequence of actions involved in processing input data and generating an associated output.
- They are particularly useful during the analysis of requirements as they can be used to show end-to-end processing in a system.
What is event-driven modeling?
- Event-driven modeling shows how a system responds to external and internal events.
- It is based on the assumption that a system has a finite number of states and that events (stimuli) may cause a transition from one state to another.
“Real-time systems are often event-driven, with minimal data processing. F.x. a landline phone switching system responds to events such as ‘reciever off hook’ by generating a dial tone”
Explain the different types of mode-driven architecture
- A computation independent model (CIM)
- These model the important domain abstractions used in a system. CIMs are sometimes called domain models. TODO Bedre forklaring
- A platform independent model (PIM)
- These model the operation of the system without reference to its implementation. The PIM is usually described using UML models that show the static system structure and how it responds to external and internal events.
- Platform specific models (PSM)
- These are transformations of the platform-independent model with a separate PSM for each application platform. In principle, there may be layers of PSM, with each layer adding some platform-specific detail.
What is architectural design?
Architectural design is concerned with understanding how a software system should be organized and designing the overall structure of that system.
- It is the critical link between design and requirements engineering, as it identifies the main structural components in a system and the relationships between them
- The output of the architectural design process is an architectural model that describes how the system is organized as a set of communicating components.
How does a generic layered architecture look?
Four layers:
- User interface
- User interface management, Authentication and authorization
- Core business logic/application functionality, Systems utilities
- Systems support (OS, database etc.)
Software engineering process: What happens in the software design and implementation stage?
An executable software system is developed.
Software engineering process: What is software design?
Software design is a creative activity in which you identify software components and their relationships, based on a customer’s requirements.
Software engineering process: What is the implementation stage?
Implementation is the process of realizing the design as a program.
What is a design pattern?
- 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.
Name the elements of a pattern
- Name
- A meaningful pattern identifier.
- Problem description.
- Solution description.
- Not a concrete design but a template for a design solution that can be instantiated in different ways.
- Consequences
- The results and trade-offs of applying the pattern.
Describe the observer pattern
- Name
- Observer.
- Description
- Separates the display of object state from the object itself.
- Problem description
- Used when multiple displays of state are needed.
- Solution description
- See slide with UML description.
- Consequences
- Optimisations to enhance display performance are impractical.
What are the different reuse levels?
- The abstraction level
- At this level, you don’t reuse software directly but use knowledge of successful abstractions in the design of your software.
- The object level
- At this level, you directly reuse objects from a library rather than writing the code yourself.
- The component level
- Components are collections of objects and object classes that you reuse in application systems.
- The system level
- At this level, you reuse entire application systems.
What is host-taget 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 or, for development platforms, an interactive development environment.
- Development platform usually has different installed software than execution platform;; these platforms may have different architectures.
What are the differences 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.
Explain inspections and testing
- Inspections and testing are complementary and not opposing verification techniques.
- Both should be used during the V & V process.
- Inspections can check conformance with a specification but not conformance with the customer’s real requirements.
- Inspections cannot check non-functional characteristics such as performance, usability, etc.
What is test-driven development?
- 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.
- TDD was introduced as part of agile methods such as Extreme Programming. However, it can also be used in plan-driven development processes.
What are the process activities of Test-driven development?
- Start by identifying the increment of functionality that is required. This should normally be small and implementable in a few lines of code.
- Write a test for this functionality and implement this as an automated test.
- Run the test, along with all other tests that have been implemented. Initially, you have not implemented the functionality so the new test will fail.
- Implement the functionality and re-run the test.
- Once all tests run successfully, you move on to implementing the next chunk of functionality.
What are the benefits of test-driven development?
- Code coverage
- Every code segment that you write has at least one associated test so all code written has 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 regession testing?
- Regression testing is testing the system to check that changes have not ‘broken’ previously working code.
- In a manual testing process, regression testing is expensive but, with automated testing, it is simple and straightforward. All tests are rerun every time a change is made to the program.
- Tests must run ‘successfully’ before the change is committed.