Defensive Design Considerations (OCR GCSE Computer Science)

Revision Note

James Woodhouse

Written by: James Woodhouse

Reviewed by: Lucy Kirkham

What is defensive design?

  • Defensive design is an approach to software development where every possible input from a user is considered

  • This is done to anticipate all of the ways a user could misuse a program

  • Defensive design ensures that the final program is robust and reliable for all users

  • Occasionally, some errors can occur in software that can not be foreseen by the developer when writing the software

Defensive Design Considerations

How can a software developer anticipate errors in programs?

  • Many errors can occur in a program and some of these can be difficult to anticipate when initially developing the software

  • The programmer must ensure the software has a way of dealing with the potential errors to ensure their software does not crash

  • Some examples of these errors include

    • Peripheral errors

    • Disk errors

    • Communication errors

  • In these instances, a programmer must ensure their software deals with these errors to ensure it is robust and reliable for its users

Peripheral errors

  • Peripherals commonly don't perform as intended, such as printers and this can cause an issue for the end user

  • If a printer runs out of paper, runs out of ink or has a paper jam; the user should have the option of reprinting their document

  • These considerations must be pre-planned in the software

Disk errors

  • Programs such as word processing software must be able to account for errors on a disk drive

  • Example errors that may occur on a disk include

    • Disk running out of space

    • Files and folders not being found

    • Corrupted files

  • These issues must be preplanned in the software the user has an alternative option, for example, saving their work on another disk

Communication errors

  • Applications which use online systems must be connected to a host server

  • When a connection is lost, the program should provide a way for the user to cancel their request and try again

  • The program may also be able to automatically retry if the connection resumes

Authentication

What is Authentication?

  • Authentication is the process of ensuring that a system is secure by asking the user to complete tasks to prove they are an authorised user of the system

  • Authentication is done because bots can submit data in online forms

  • Authentication can be done in several ways, these include

    • Usernames and Passwords

    • CAPTCHA

  • Other methods that programmers can do to authenticate the user is include

    • Allowing users to recover passwords via email links and SMS codes

    • Encrypting data

authentication-recaptcha

Last updated:

You've read 0 of your 5 free revision notes this week

Sign up now. It’s free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

James Woodhouse

Author: James Woodhouse

Expertise: Computer Science

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.

Lucy Kirkham

Author: Lucy Kirkham

Expertise: Head of STEM

Lucy has been a passionate Maths teacher for over 12 years, teaching maths across the UK and abroad helping to engage, interest and develop confidence in the subject at all levels.Working as a Head of Department and then Director of Maths, Lucy has advised schools and academy trusts in both Scotland and the East Midlands, where her role was to support and coach teachers to improve Maths teaching for all.