what is abstraction by generalization | s grouping together similarities within a problem to identify what kind of problem |
what are precondtions | requirements which must be met before a program can be executed |
Caching adv | This also means images and text do not have to be downloaded again multiple times, freeing up bandwidth |
prefetching | algorithms predict which instructions are likely to soon be fetched. The instructions and data which are likely to be used, loaded and stored in cache before they are fetched |
adv of prefetching | less time is spent waiting for instructions to be loaded into RAM from the hard disk |
what is the downside to prefetching | accuracy of the algorithms used in prefetching, as they can only provide an informed prediction
Larger caches still take a long time to search and so cache size limits how much data can be stored |
why are resuable program compnents amazing | more reliable
already been tested and any bugs dealt wiv
saves time, money and resources. |
why are vey bad resuable) | may not always be possible to integrate existing components due to compatibility issues with the rest of the software. This may mean these components need to be modified to work - more costly and time-consuming |
what is , thinking procedurally | makes the task of writing a program a lot simpler by breaking a problem down into smaller parts which are easier to understand and design |
problem decomposition | a large, complex problem is continually broken down into smaller subproblems which can be solved more easily |
why is problem decomposition an adv | separating the problem into sections, it becomes more feasible to manage and can be divided between a group of people according to the skill sets of different individuals |
why is it good to use top-down design | subproblem can be represented as a single task and ideally a self-contained module or subroutine |
what is concurrent processing | when each task is given a slice of processor time to make it look like the tasks are being completed simultaneously when in reality they are executed sequentially |
Benefits of concurrent processing | ● The number of tasks completed in a given time is increased.
● Less time is wasted waiting for an input or user interaction, as other tasks can be completed. |
Drawbacks of concurrent processing | ● Concurrent processing can take longer to complete when large numbers of users or tasks are involved as processes cannot be completed at once.
● There is an overhead in coordinating and switching between processes, which reduces program throughput.
● Just as with parallel processing, not all tasks are suited to being broken up and performed concurrently. |
what is concurrent thinking doe | g is the mindset that allows you to spot patterns and parts of problems where concurrency can be applied aka multitasking |
what is a sequence in terms of programming u filthy animal | Code is executed line-by-line, from top to bottom |
Branching | certain block of code is run if a specific condition is met, using IF
statements. This is also known as ‘selection |
Iteration | A block of code is executed a certain number of times or while a condition is met. Iteration uses FOR, WHILE or REPEAT UNTIL loops |
what is Count-controlled iteration | repeated a given number of times |
what is Condition-controlled iteration | iteration continues until a given condition is met. |
what is recursion | in which a subroutine calls itself during its execution |
when does the recursion stop? | continues until a certain condition - called the stopping condition - is met |
what is an advatage to recursion rather than iteration? | they can be represented in fewer lines of code, which makes them less prone to errors |
what is a disadvantage of recursion | inefficient use of memory. If the subroutine calls itself too many times it is prone to stack overflow, which is when the call stack runs out of memory & program crashes
difficult to trace, |
what is the type of recursion which is implemented in a more better way so less stack space is required? | tail recursion |
what are Local variables | can only be accessed within the block of code in which they
were defined
multiple local variables with the same name can exist in different subroutines and will remain unaffected by each other |
why are local variables an advantage | ensures subroutines are self-contained, with no danger of variables being affected by code outside of the subroutine |
what are Global variables | can be accessed across the whole program. All variables used in the main body of a program are automatically declared to be global |
what are an adv of global varibles | useful for running in multiple parts of the program |
why is using global variables not recommended | they can be unintentionally overwritten and edited.
global variables aren't deleted until the program terminates so they require more memory than local variables which are deleted
once the subroutine has been completed |
what is modular programming | e used to split large, complex programs into smaller, self-contained modules |
what is an adv of modular programming | modular design also makes it easier to divide tasks between
a team and manage,
simplifies the process of testing and maintenance, as each
component can be dealt with individually
improves the reusability of components, as
once a module has been tested, it can be reused |
what is the top down approach when it comes to modular programming | problem is continually broken down into sub-problems, until each can be represented as an individual, self-contained blackbox which
performs a certain task |
what are procedures and fuctions | named blocks of code that perform a specific task |
what is the difference between a procedure and a function | procedures do not have to return a value, functions must always return a value.
Procedures can return multiple values whereas a function must return one, single value
functions commonly make use of local variables |
what is passed by value? | treated as a local variable; a copy of the value is passed to the subroutine and discarded at the end
therefore its value outside of the subroutine will not be affected |
what is passed by reference? | address of the parameter is given to the subroutine, so the value of the
parameter will be updated at the given address |
what is an IDE? | a program which provides a set of tools to make it easier for programmers to write, develop and debug code |
give me the features of an ide | Stepping
Variable watch
Breakpoint
Source code editor
Debugging tools |
what is stepping (IDE) | monitor the effect of each individual line of code by
executing a single line at a time |
what is variable watch (IDE) | used to pinpoint errors, this is a useful feature to observe how
the contents of a variable change in real-time through the execution of a program |
what is breakpoint? | set a point in the program at which the program will stop
based on a condition or set to occur at a specific line - This
can help to pinpoint where an error is occurring |
Source code editor | make the coding process easier by providing features
such as autocompletion of words, indentation, syntax highlighting and
automatic bracket completion |
Debugging tools | provide run-time detection of errors |
what makes a task solvable via computational methods | problem that can be solved using an algorithm
a finite, realistic amount of time
involves inputs outputs and calculations |
Problem recognition | Stakeholders state what they require from the finished product and this information is used to clearly define the problem and the system requirements. |
Problem decomposition | when a problem is broken down until a self contained sub routine |
why is problem decompositiion an adv | reduces the complexity of a problem by splitting it up into smaller sections which are more easy to understand
programmers may find that certain sections of the program can be implemented using pre-coded modules or libraries which saves time which would otherwise have been spent on coding and testing |
give me more adv of problem decomposition | easier to manage
these can be individually designed, developed and tested before being combined to produce a working piece of software at the end
allows project to be produced in parallel
easier to identify, locate and mitigate errors |
Divide and conquer | strategy can be broken down into three parts: divide, conquer and merge |
Divide | involves halving the size of the problem with every iteration |
conquer | Each individual subproblem is solved recursively |
merge | solutions to the subproblems are then recombined to form the final solution to the problem |
what is an example of divide and conquer ? | binary search algorithm |
what is adv of divide and conquer | simplifies very complex problems
time complexity of algorithms that use divide and conquer is of the order O(logn) |
disadvantage of divide and conquer | as divide and conquer makes use of recursion, it faces the same problems as recursion does such as stack overflow and large problems are difficult to trace |
abstraction by generalisation | group together different sections of the problem with similar underlying functionality
allows for segments to be coded together and reused, so saves time. |
data mining | used to identify patterns or outliers in large sets of data, termed big data.Data mining is used in software designed to spot trends or identify correlations between data
which are not immediately obvious. |
why is it useful | can be used to make predictions about the future based on previous trends. This makes data mining a useful tool in assisting business and marketing decisions.
used to reveal insights about people’s shopping habits and preferences based on their personal information. These insights can be used to inform marketing techniques. |
why must be careful for data mining | it is crucial that it is dealt with in accordance with the present legislation regarding data protection as it often deals with handling of personal data |
Heuristics | non-optimal, ‘rule-of-thumb’ approach to problem-solving which are used to find an approximate solution to a problem when the standard solution is unreasonably time-consuming or resource-intensive to find.
solution found through using heuristics is not perfectly accurate or complete
estimated solution for intractable problems
used in machine learning |
Performance modelling | eliminates the need for true performance testing by providing mathematical methods to test a variety of loads on different operating systems.
provides a cheaper, less time-consuming or safer method of testing applications. t. |
what is performance operating useful for and why | safety-critical computer systems, such as those used on an airplane, it is not safe to do a real trial run before the system can be implemented.
results can help companies judge the capabilities of a system, how it will cope in different environments and assess whether it is safe to implement |
Pipelining | modules are divided into individual tasks, with different tasks being developed in parallel. Traditionally, the output of one process in pipelining becomes the input of another, |
Visualisation | data can be presented in a way that is easier for us to understand
makes it possible to identify trends that were not otherwise obvious, particularly amongst statistical data |
why is visualisation an adv | data may be represented as graphs, trees, charts and tables. Visualisation is another technique that is used by businesses to pick up on patterns which can maximise decisions |