What do you typically start with when designing a new system?
Deciding what the system needs to output
What are some types of outputs?
-Visual
-Audio
-Haptic feedback (vibration, forces & motion)
-Data to be input into another process or system
What are some examples of generic inputs and outputs?
Inputs:
-microphone
-keyboard
-sensors (e.g. light sensor)
Outputs:
-screens
-printouts
-speakers
-motors
What are preconditions?
Conditions that already exist and could affect how you devise a solution
What are common preconditions to consider?
-Cost
-Time available
-Quantities (e.g. number of people invited to an event)
-Location
-Preferences
-Target audience
-Legal requirements
-Competition
What are the benefits of reusing code?
-It makes code more efficient (one piece of code can be used many times)
-Takes less time to code a program
-Less likely to have errors as code is not written multiple times
-Makes it easier to maintain a program
What are the drawbacks of reusing code?
-Old code may not make the best use of new architecture
-New assets may not be compatible with the older algorithms
-May be inefficiencies in the old code (bugs or glitches)
What are subroutines?
What are some examples of subroutines?
Blocks of code that perform a task and can be reused multiple times by calling them and supplying them with the data they need.
For example: procedures, functions and methods
What are software libraries?
They contain prewritten and protested code, available for programs to use
What is an example of a software library?
Random library
What are library routines (within software libraries)?
Small pieces of code that perform common tasks (usually functions)
What are some examples of library routines?
Searching / Sorting algorithms
What are the benefits of software libraries?
-Routines are already compiled, so they are tested and error-free
-It saves work for programmers, shortens overall development time and reduces cost
-Routines may be used multiple times
-Allows the programmer to use other programmers’ expertise
-May require fewer developers to work on a project
What does API stand for?
Application Programming Interface
What is API?
A set of rules, protocols and tools that allow different software applications to communicate
What is API an example of?
External code reuse (reselling components to a third party)
What does API allow?
Systems being linked to (e.g. a social media profile) to make certain procedures and functions available to other developers
What is caching?
The temporary storage of program data
What does caching result in?
Shorter retrieval times as instructions don’t need to be fetched from secondary storage, which is slower
What is prefetching?
A more advanced version of caching which involves data being requested from main memory by the processor before it is required
What is the benefit of prefetching?
It is quicker to access items from registers/ cache and they are located on/ near the processor
What is the drawback of prefetching?
Clever algorithms need to be designed to predict, with a high degree of certainty, that an instruction or piece of data will be required soon
Why is caching used with web pages?
To reduce the number of requests from the client back to the web server and vice versa (unnecessary network traffic can be avoided)
What is the benefit of caching?
Improves speed and efficiency