9 Software Quality And Safety

Society and Ethics in IT · Unit 9

Software Quality and Safety

Exam-focused notes for Software Quality and Safety (Society and Ethics in IT, BIT358): what the TU syllabus asks and how it has actually been tested, with 3 solved past questions from this unit.

Software Quality and Safety in short

Software now runs aircraft, hospitals, banks and cars. When it fails, people can be hurt or killed, so quality and safety are a moral duty of every developer.

Software Quality and Safety: notes

Software safety challenges and difficulties

Software safety means the software does not cause harm to people, property or the environment. Software is hard to make safe for these reasons:

  • Complexity: large programs have millions of lines and a huge number of possible states.
  • Hidden defects: it is not possible to test every input and path.
  • Changing requirements: misunderstood or changed needs cause errors.
  • Human error: developers, testers and users make mistakes.
  • Interaction with hardware and the real world: unexpected conditions appear.
  • Reuse of old code: code that was safe in one system may fail in another.
  • Time and cost pressure: testing is cut to meet deadlines.
  • Concurrency: parts running together can cause timing errors called race conditions.

Example: the Therac-25 radiation machine gave patients massive overdoses in the 1980s. Investigators found software timing faults, and the design had removed older hardware safety locks.

Software safety guarantees and limitations

Absolute safety cannot be guaranteed. Testing shows the presence of bugs, not their absence.

Why:

  • Testing covers only some of the possible cases.
  • Formal proofs work only on small, well-defined parts and depend on correct specifications.
  • The specification itself may be wrong or incomplete.
  • The environment, users and hardware can behave in ways nobody expected.

What can be done:

  • Follow safety standards and careful design.
  • Use independent reviews and testing.
  • Build in hardware safety interlocks and fail-safe behaviour, so a fault leads to a safe state.
  • Keep humans in the loop for critical decisions.
  • Monitor the system after release and fix problems quickly.

The aim is to lower risk to an acceptable level, not to promise zero risk.

What this unit covers

  • Software safety challenges and difficulties
  • Software safety guarantees and limitations
  • Causes of software failures
  • Methods to improve software quality
  • Reliability and testing approaches
  • Risk management in software development

Software safety challenges and difficulties

2081 · 5 marks

Why is software safety so difficult to attain? Can it be guaranteed? [5]

Software safety is challenging for several fundamental reasons: - Modern software systems contain millions of lines of code with intricate interdependencies - The number of possible execution paths and states grows exponentially, making exhaustive testing impractical - Emergent behaviors arise fr...

Open this answer on its own page →

0 · 5 marks

Why is software safety so difficult to attain? Can it be guaranteed? [5]

Software safety is challenging for several fundamental reasons: - Modern software systems contain millions of lines of code with intricate interdependencies - The number of possible execution paths and states grows exponentially, making exhaustive testing infeasible - Emergent behaviors arise fro...

Open this answer on its own page →

Methods to improve software quality

2081.1 · 10 marks

How can we improve software quality? Describe the causes of software failures.[10]

Show solved answer

Model Answer: Software Quality Improvement and Causes of Software Failures

How to Improve Software Quality

Software quality can be improved through the following approaches:

1. Requirements Management

  • Clearly define and document all functional and non-functional requirements
  • Validate requirements with stakeholders before development begins
  • Maintain traceability between requirements and test cases

2. Design and Architecture

  • Follow established design principles and patterns
  • Conduct design reviews and peer reviews
  • Ensure modularity, maintainability, and scalability
  • Document design decisions clearly

3. Code Quality Practices

  • Enforce coding standards and guidelines
  • Conduct code reviews before integration
  • Use static code analysis tools
  • Implement pair programming where appropriate
  • Maintain code documentation

4. Testing and Verification

  • Implement comprehensive testing strategy (unit, integration, system, acceptance testing)
  • Automate test cases for regression testing
  • Perform both black-box and white-box testing
  • Achieve adequate code coverage
  • Conduct performance and security testing

5. Process Improvement

  • Follow established software development methodologies (SDLC)
  • Implement continuous integration and continuous deployment (CI/CD)
  • Use version control systems
  • Maintain configuration management

6. Quality Assurance Activities

  • Conduct regular audits and inspections
  • Implement defect tracking and management
  • Perform root cause analysis on failures
  • Establish quality metrics and monitoring

7. Team and Training

  • Invest in developer training and skill development
  • Promote quality culture within the team
  • Ensure adequate resources and time allocation

Causes of Software Failures

Software failures typically result from the following causes:

  • Incomplete or ambiguous requirements
  • Misunderstanding of user needs
  • Changing requirements not properly managed
  • Lack of requirement validation

2. Design Defects

  • Poor architectural decisions
  • Inadequate design documentation
  • Failure to consider edge cases and error conditions
  • Scalability and performance issues not addressed

3. Implementation Errors

  • Programming mistakes and logic errors
  • Incorrect algorithm implementation
  • Poor error handling and exception management
  • Memory leaks and resource management issues

4. Testing Inadequacies

  • Insufficient test coverage
  • Inadequate test case design
  • Failure to test edge cases and boundary conditions
  • Lack of regression testing
  • Poor test environment setup

5. Integration Issues

  • Incompatibility between modules
  • Incorrect interface implementation
  • Version control and configuration management problems
  • Inadequate integration testing

6. Environmental Factors

  • Hardware failures or limitations
  • Operating system incompatibilities
  • Third-party library or dependency issues
  • Network and connectivity problems

7. Maintenance and Evolution

  • Inadequate documentation for maintenance
  • Incorrect patches or updates
  • Unintended side effects from modifications
  • Lack of regression testing after changes

8. Human Factors

  • Lack of communication among team members
  • Insufficient expertise or experience
  • Time and resource constraints
  • Poor project management

9. External Dependencies

  • Unreliable external services or APIs
  • Data corruption or loss
  • Security vulnerabilities and attacks

Conclusion: Software quality improvement requires a holistic approach combining technical practices, process discipline, and human factors. Understanding the causes of failures helps in implementing preventive measures and establishing robust quality assurance mechanisms.

Open this answer on its own page →