Inputs, Outputs and Thinking Ahead Flashcards
Input
signals or data received by the system
Output
signals or data sent from the system.
Performance Modelling
working out the most optimal design for the best performance.
Caching
storing bits of data that can be reused from storage.
Reusable Components
using code and parts of code that can be used/called upon again and again in a computer program.
What is an input in a computer system?
An input is data or signals received by the system from external sources, such as a keyboard, mouse, or sensor.
What is an output in a computer system?
An output is data or signals sent from the system to external devices, such as a display, printer, or speaker.
What does “thinking ahead” mean in the context of computer science?
Thinking ahead involves anticipating the inputs, outputs, and processes needed for a program before implementation, considering potential future requirements or user actions.
Why is considering inputs important when designing a program?
Understanding inputs ensures the program can correctly process data, handle unexpected values, and validate user input to avoid errors.
Give an example of a common input validation check.
Ensuring a user enters a valid email format, checking that a number falls within a specified range, or ensuring a field is not left blank.
What is an “input device”?
An input device is any hardware component that sends data to the computer, such as a keyboard, mouse, or microphone.
What is an “output device”?
An output device is any hardware component that receives and displays data from the computer, such as a monitor, printer, or speakers.
What is meant by “preconditions” in procedural thinking?
Preconditions are conditions or requirements that must be met before a procedure or algorithm can be executed properly.
Why are preconditions important in program design?
They help ensure that the program runs correctly by validating the initial state before executing a procedure, reducing the chances of errors or unexpected behavior.
How does “thinking ahead” affect system performance?
By anticipating and preparing for future needs (e.g., handling larger inputs or optimizing for faster outputs), you can design more efficient and scalable systems.
What is meant by “caching” in computing?
Caching involves storing frequently used data or calculations in temporary storage (cache) to reduce access times and improve performance.
How does caching relate to thinking ahead in computer systems?
Caching anticipates repeated use of certain data and speeds up future processes by reducing the need to repeatedly access the slower main memory or recalculate data.
What is a “buffer” in terms of outputs?
A buffer is a temporary storage area used to hold data being transferred between two devices or processes that operate at different speeds.
Why are buffers important in managing outputs?
Buffers ensure smooth data transfer by temporarily holding data until the output device is ready to process it, preventing data loss or delays.
What is an example of thinking ahead when designing user input interfaces?
Anticipating potential user mistakes (e.g., inputting letters where numbers are expected) and designing input validation to handle these errors appropriately.
What is the purpose of input validation in programming?
Input validation ensures that the data entered by users meets certain criteria, preventing invalid or malicious data from being processed by the system.
What is a postcondition in computing?
A postcondition is a condition that must be true after a procedure has been executed, ensuring the program has successfully completed its task.
How can thinking ahead help prevent program crashes?
By predicting possible issues like invalid input or resource exhaustion, developers can implement error-handling mechanisms to ensure the program can recover gracefully.
What is a “use case” in the context of thinking ahead?
A use case is a description of how a user interacts with a system to achieve a goal, helping developers anticipate inputs, outputs, and edge cases in program design.
How does thinking ahead improve user experience (UX)?
By anticipating user needs, developers can design intuitive input methods, reduce delays in output, and create a smoother, more efficient user experience.