THINKING AHEAD/THINKING PROCEDURALLY Flashcards
(4 cards)
Explain the benefits of using reusable components when writing program code.
- Saves times as code does not need to be rewritten/can be used many times
- Code may already be tested which will therefore save
development//debugging time - More efficient code which will use less memory//be easier
to maintain - May require less technical knowledge as code can used
rather than written
The programmer is designing the program to make use of caching and reusable components.
Explain and evaluate the use of caching and reusable components
AO1: Knowledge and Understanding
Caching:
Data that has been used is stored in
cache/RAM in case it is needed again
Allows faster access for future use
Caching can be complicated to implement
Caching required the correct data to be fetched for the next instruction
Reusable components:
One piece of code can be used in multiple
places/called many times
Use of subroutines/ procedures/ functions
Use of classes
Use of external libraries
AO2: Application
Store items in cache
Store requirements in cache
Store layout in cache
Reuse shapes / designs
The use of a class allows replication
AO3: Evaluation
Faster development
Faster/easier future adaptation
Better performance of program
Takes more time to plan/design to make use of both
Explain the benefits of using subprograms to produce software.
- Small sub-programs are easier to read / understand /modify
- Write once and call repeated times
- No need to reprogram
- Avoids repeated code
- Subroutines can be tested individually then added to the main program.
- Can reuse in other programs
- Can give procedures to different programmers to build concurrently
- Speeds up completion time
- Increases efficiency
Explain why decomposing a problem can help a developer design a solution and give one drawback
Splits the problem into smaller chunks
Smaller problems are more manageable
Smaller problems are easier to solve
To see where code can be reused in the solution
To split tasks between different programmers
May not be entirely possible with an event driven rather than procedural approach to programming