Unit 1 - Approaches to software development Flashcards
What are the three important characteristics of software that affect its development and the likelihood of errors?
- Malleability
Software is easy to change (programmers are often tempted to tweak their code). This malleability creates a constant pressure for software to be changed rather than replaced. Every change introduces the possibility of new errors. - Complexity
Software is often complex. Complexity can usually be recognised, but it is less easy to define. One item of software can be considered more complex than another if it requires more explanation. Part of that complexity arises from the potential variety of pathways between the components of a system. The number of errors is likely to depend on the complexity of a system. - Size
It is likely that there will be more errors in a large piece of software than in a small one.
[Unit 1, p. 10]
A successful software project must…?
… resolve the diverse and possibly conflicting needs of users in a disciplined way
… satisfy the users’ expectations
… have been developed and delivered in a timely and economical manner
… demonstrate good overall system quality.
… be resilient to the changes that will be introduced during its operational lifetime
[Unit 1, p. 5]
For each of the three characteristics of software mentioned above [Malleability, Complexity and Size], explain why errors might arise in a piece of developed software.
Malleability
As change is easy to make, often changes are introduced without thorough consideration of the full consequences of each new change introduced.
Complexity
The more complex a piece of software becomes, the more chances there are of a change affecting other parts of the software.
Size
The greater the number of lines of code in a piece of software, the greater the number of likely errors.
[Unit 1, SAQ 2, p 10]
What is the defining quality of a good software system, and what are its main characteristics?
A good software system is one that meets its users’ needs. We can characterise a good software system as useful, usable, reliable, flexible, available and affordable.
[Unit 1, SAQ 3a, p. 11-12]
How might greater flexibility make a software system more affordable over its whole life?
Users’ needs will change over time. The time taken to implement the changes in requirements in a flexible system is less than for less flexible software. As labour costs are the most significant component of software costs, flexible software is more affordable.
[Unit 1, SAQ 3b, p. 11-12]
Give two reasons why a delivered software system might not meet its users’ needs.
Software systems are usually out of date even as they are being developed because:
- some needs are often missed during requirements capture.
- users’ needs change with time.
[Unit 1, SAQ 3c, p. 11-12]
What greatly influences the maintainability of software?
The maintainability of software is greatly influenced by how software is designed, written and documented.
[Unit 1, p. 12]
Suggest a means of measuring the maintainability of a software system.
We could measure the effort required by a developer to locate and implement a given change to a software system. That effort can be classified in two components – the effort needed to locate and fix errors (bugs), and the effort needed to adapt the software system to meet its users’ needs.
[Unit 1, SAQ 4a, p. 14]
What can we learn from legacy systems about developing a good software system?
A legacy system may have started out with all the characteristics of a good software system, yet those characteristics may have changed over time, resulting in a less flexible and maintainable product. As change is inevitable, the right processes should be in place to make change happen in a more controlled way. This requires the adoption of standards and documentation conventions that help decision making on changes and how to introduce them. Any changes need to be well documented so that software is still understandable and less dependent on the people initially involved with developing and maintaining the software.
[Unit 1, SAQ4b, p. 14]
Suggest a reason why legacy systems will always be a problem.
The inherent malleability of software makes it easy to change. You have already seen that a legacy system is lacking in flexibility as a result of the number of changes made to it during its operational lifetime. (The analogy with metalworking through malleability is useful. Once a blacksmith forms some component, usually in iron, there is a limit to the number of times that it can be heated, formed and cooled before that component becomes brittle and hence liable to failure.) This explains why our ability to bolt features and fixes onto a legacy system means that it will eventually become too fragile, and it will become precarious to go any further. The staff issues mentioned in (b) compound these problems.
[Unit 1, SAQ 4c, p. 14]
Why might you consider splitting up a large project into smaller chunks?
There is a limit to how much one person can understand at any one time. So there is a limit to the size of a software system that any one person can deal with. By splitting a large project into smaller chunks, it is possible to identify a number of more manageable tasks for those involved.
[Unit 1, SAQ 5a, p. 20]
How does the complexity of a software system affect the maintenance task?
It is essential to be able to make a change to a software system without having to know all about that system. Each change becomes difficult when the flow of control and dependencies within programs are complex. The greater the number and nature of the dependencies, the harder it is to maintain a software system.
[Unit 1, SAQ 5b, p. 20]
What is a module?
A module is any identifiable part of a software system that is considered separately. For example, modules may be subroutines (in a procedural language equivalent to methods), classes (in an object- oriented language), library functions or other constructs that may be treated independently.
[Unit 1, SAQ 5c, p. 20]
Why does it help to have low coupling in a software system?
With low coupling, there are few dependencies between modules. Therefore changes made to one part (one or more modules) of a software system are less likely to propagate throughout the whole system. (A clear record of the dependencies between modules helps you to predict the impact of a proposed change to a software system.)
[Unit 1, SAQ 5d, p. 20]
Give examples of the kinds of information that would be valuable when considering a change to a given module.
There are two kinds of information that contribute to the analysis of a proposed change:
- Which modules are clients of the module in question? This information indicates how far a change may propagate through the software system.
- What assumptions have been made in client modules of the module in question? An understanding of the expected services of a module will help assess the risks associated with a particular change.
[Unit 1, SAQ 5e, p. 20]
What are the context dependencies of a module? How do they relate to a module’s interface?
The context dependencies for a module are the services of other modules that the module needs in order to work correctly. You can express the context dependencies for a module in terms of other interfaces. In effect, you can express the responsibilities of a module in terms of its interface and context dependencies. If the context provides the services that the module needs and clients meet any conditions specified in the interface, the module can guarantee the provision of the services described in its interface.
[Unit 1, SAQ 5f, p. 20]
What are the benefits of using modules with defined interfaces?
- Developers will need to know only about the module’s interface (its syntax and what it requires and achieves – its semantics), not how it provides those services. Consequently developers can be more productive.
- Developers can understand aspects of the software system more thoroughly, so fewer bugs will be introduced.
- It should be easier to find bugs, as irrelevant modules are avoided.
- The possibility of module reuse is increased once it is known what that module provides and requires.
[Unit 1, SAQ 5g, p. 20]
Why does it help to have high cohesion in the modules of a software system?
With high cohesion, a module carries out a sensible set of operations or activities. Ideally high cohesion implies just one major abstraction per module. The interface abstracts away from what a developer must know in order to use a module. This makes it easier for developers to understand the purpose of the module and how to use it. In addition high cohesion tends to make a module more reusable in other applications, because it provides a set of operations that sit naturally together.
[Unit 1, SAQ 5h, p. 20]
What characteristics should a module display that will help to ensure that it is easy and cheap to develop and maintain, and that errors are kept to a minimum?
A module should have low coupling and high cohesion, represent a good abstraction, and have a well-defined interface that is an encapsulated abstraction of a well-understood concept.
[Unit 1, SAQ 5i, p. 20]
Why is it important to achieve a balance between coupling and cohesion?
In constructing a system, you may have a choice between a smaller set of loosely coupled, less cohesive modules, or a larger set of tightly coupled, more cohesive modules. In the former case each module may be difficult to understand, while in the latter case the relationships between them may be over-complex. You need to strike an appropriate balance.
[Unit 1, SAQ 5j, p. 20]
In the context of TM354, what is the definition of “software architecture”?
The software architecture of a system is the set of structures needed to reason about the system, which comprise software elements, relations among them, and properties of both.
[Unit 1, p. 22]
Suggest some similarities and differences between software architecture and building architecture.
They are both abstractions of the structure of a system. They represent decisions that will affect concerns of different stakeholders. They are used as a communication vehicle with different stakeholders.
Changing a building once complete is expensive, whereas changing details or internal decoration is quite cheap but may incur costs in wastage in materials. Software has different properties from building components, in particular its malleability and complexity. Reworking the whole architecture of a software system is also expensive because of the complexity involved
– making internal changes does not incur costs in wastage of materials, as software is malleable, but it incurs other costs in terms of time and work invested.
[Unit 1, p. 22]
What are the characteristics of a component?
A component is a module that is considered to be a sufficiently good abstraction for the problem in hand. A component should be capable of being reused in future projects having the same software architecture, or being easily replaced at a later date within the existing software system. As with all modules, a good component has a well-defined interface and is an encapsulated abstraction of a well-understood concept, with strong cohesion and low coupling.
[Unit 1, SAQ 7a, p. 25]
How does the concept of an architecture contribute to component reuse?
The architecture of a software system embodies high-level decisions about the overall structure of the system, and this architecture may apply to more than one system.
[Unit 1, SAQ 7b, p. 25]
Which form of decomposition might be used in a software architecture?
The basic form of decomposition used in a software architecture is partitioning to meet a number of separate concerns, each concern being addressed by a subsystem. For example, you might want to separate the user interface layer from the core business services layer, or you may decide to build or reuse components and/or services for some of the partitions.
[Unit 1, SAQ 7c, p. 25]
What are the similarities and differences between components and services?
There are similarities between a service and a component. They both promote reuse and flexibility. They both use public interfaces to allow requesters to make use of their functionality without relying on their implementation.
There are differences too. A component is usually implemented in a specific object-oriented technology, therefore only clients compliant with that technology can easily communicate and integrate with it. In contrast, a service uses communication standards that allow the interoperation of diverse technologies. [A component is technology dependent, a service is technology neutral. Unit 1, p. 24]
Finally, components tend to be associated with business entities, while services tend to be associated to business processes – they may realise part or the whole of the functions within such a process and may involve several business entities. Be aware that although this is a widely accepted classification, not everyone follows it, and you may see components called services and vice versa.
[Unit 1, SAQ 7d, p. 25]
Give the characteristics of an engineering approach that support the argument that software development is an engineering discipline.
Software development follows an engineering approach provided that the following conditions are met:
- it is concerned with meeting a set of requirements that are defined as clearly as possible
- it uses a defined process with clear activities, each of which has at least one identifiable end product
- developers can apply their skills and experience to the tasks demanded of them
- validation and verification are regarded to be as essential as building the software itself
- it makes sensible use of tools and standards
- it follows a code of practice.
[Unit 1, SAQ 8, p. 29]