Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lesson Objectives Aims You should be able to:

Similar presentations


Presentation on theme: "Lesson Objectives Aims You should be able to:"— Presentation transcript:

1 Lesson Objectives Aims You should be able to:
Identify the inputs and outputs for a given situation Determine the preconditions for devising a solution to a problem You should be able to discuss: The nature, benefits and drawbacks of caching The need for reusable program components

2 What’s it about This section is really all about planning and resourcing Before a project begins, research should be conducted: What do current systems do How do they work (exactly) What is needed What resources do you need to make a new system? How will you work efficiently

3 Inputs and outputs A system design should start with the outputs
What is this system actually meant to do? We can then work backwards to identify the processes required to generate these outputs… …and the inputs these processes will require!

4 Task Programs will have a number of inputs and outputs that form some element of the final outcome of the coded solution. These inputs are combined with processes to create outcomes.

5 Task 1 Consider a simple game of hangman to find a six letter word. List all the Inputs List the outputs

6 Now consider the processes and decisions that take place when a letter is selected or entered.
The letter is either correct or incorrect – this can be considered as a process. The response that is fed back to the player is an output Create a flowchart diagram showing the inputs, outputs, processes and decisions for the hangman game Can your design be refined?

7 Caching Caching is the idea of keeping a local store of data to speed up a process It may contain: Frequently used data Frequently used instructions Data that a system has predicted it will need next (pre-fetching)

8 A cache may be used in many scenarios:
Caching A cache may be used in many scenarios: Storing instructions and data in a CPU In a database system On a proxy server in a network By large website hosts and ISP’s

9 Advantages Caching will significantly increase system performance as data is available locally, almost immediately Saves waiting for long read/write operations Prevents repeated read/write, fetch/store operations Can reduce bandwidth/network usage

10 Disadvantages Can be very complex to set up, especially in DB systems
Can cause synchronisation issues – is the cache the most up to date or the data store? Difficult to code prediction routines If there is a cache “miss” (a branch unexpectedly happens in code or similar) then the whole cache must be flushed and refilled causing a stall in performance

11 This is because if you want to do something, it’s probably:
Reusable Components The phrase “don’t reinvent the wheel” is constantly reiterated in Computer Science This is because if you want to do something, it’s probably: Already been done Tested Proven to work well

12 This is where reusable code comes in:
It simply wouldn’t be feasible with the complexity of modern systems to write code that deals with every eventuality This is where reusable code comes in: Libraries Classes DLL’s

13 By re-using code we can focus on developing new functionality
Existing libraries may cater for: Drawing and handling the user interface File load and save Memory management Mathematical functions Input and output operations Graphics

14 Examples of re-use Component Example Software module or library
Import Random Entire component reuse Menu or toolbars being reused across suites of software Programming language Reusing the same language across all projects API External re-use, allowing 3rd party access to your features and libraries. Can be re-sold Program Generator A software tool that will aid in the development of a program using standard routines with little user input

15 Practice Paper

16

17 Review/Success Criteria
You should know: The


Download ppt "Lesson Objectives Aims You should be able to:"

Similar presentations


Ads by Google