Concepts Flashcards
What is abstraction?
Removing unnecessary detail and including only the relevant detail
Why do we need abstraction?
Reduce complexity of systems for users
Hide how things actually work
Produce suitable user interfaces
Give an example of abstraction vs reality
e.g. nodes and weighted edges of a graph rather than a map with locations, flowchart rather than program code
What are reusable program components?
Subroutines
Libraries
Components e.g. text editing panel in Word, PP, etc
External reuse e.g. log in with Google, APIs
What are the benefits of reusable program components?
shortens development time
saves systems resources
lowers development costs
reduces redundant code
What are the benefits of libraries?
pre-compiled => error-free
different source language?
use others’ expertise
more standardised approach
projects require fewer developers
What is caching?
storing instructions retrieved from secondary storage in main memory in case they are needed again before the program ends
prefetching = algorithms predict which instructions are likely to soon be fetched, load + store in cache
used with frequently visited web pages to reduce number of requests + free up bandwidth
What are the benefits of caching?
faster retrieval times, less time is spent waiting for algorithms to be fetched
What are the drawbacks of caching?
predictive logic can be complicated to implement
wrong data often fetched and must be flushed
maintaining correct sequence of instructions or data can be problematic
What is concurrency?
an application making progress on more than one task at the same time (but not necessarily simultaneously, could use round robin)
What is parallel processing?
code is executed at the same time across multiple cores, specialised version of concurrency (multiple parts of a task or multiple tasks)
Can a single core CPU perform parallel processing?
No
Can perform concurrent processing, but not parallel processing
What are the benefits of concurrent processing?
reactive programming
availability of services
parallelism
controllability
number of tasks in given time is increased
time processor is waiting is reduced
What are the disadvantages of concurrent processing?
safety
liveness
resource consumption
What are the key features of an IDE?
code editors
->syntax highlighting, autocomplete, automatic indentation
error diagnostics
runtime environments
->easily run code during development
translators
auto-documentation
->tracks variables and comments, produce documentation to aid maintenance and debugging