In: Computer Science
Why data manipulation, efficiency, and memory are useful in programming, with specific examples for each:
In general, speaking of any programming and programming language, computers use data manipulation, which is a process in which data is changed, modified, or manipulated making it more meaningful, simpler, easier to read, learn, and understand or organizing it more, with respect to the code in a software program.
Computers use data manipulation. In fact, what computers do is
manipulate data, and it is their main function and it is what
computers do the most.
This data manipulation includes and involves either, arithmetic or
logical calculations activities, and also computers remember these
data storing them in memory. Hence, programs are steps of
instructions involving either or both, data manipulation-
computation, analysis, calculation; or storage using memory.
When you say "computers", it is hardware to only some extent and is software, Operating System (OS), system software, firmware, device driver software, and other user programs and software to a large extent. So, when you say a computer is running, executing, you are referring to the software or the programs underneath it, responsible to drive every piece of hardware to work physically. Hence, in order for a computer to run and function efficiently, it relies on how it manipulates data, how fast it does it, and how efficiently (smartly) it does it- with less time, less utilization of resources, hardware, etc, fewer efforts and steps. For example, the less a program consumes CPU cycles, the more the CPU speed would be to complete a program's execution. This shows its efficiency.
Both data manipulation and memory should be efficient. Data manipulation uses memory. The efficiency factor can be measured in any software, hardware, program, component, etc. An example of efficiency in "memory" is, a highly-efficient memory would store lots of data in it, thus utilizing less storage device hardware.
Memory is useful in programming so computer stores data in it. All the read and write operations happen from and to memory where the data is and has to be stored. Also, the speed to read and write from and to memory relies on the amount of RAM/memory of a computer, as at times it requires, to copy big blocks or pieces of codes to be transferred to and from memory and this has to be fast, effective, and even efficient providing high system or computer performance. Memory is definitely required for information storage and retrieval for a program to successfully execute/run, and the computer, application, or software to function properly.
Computer programs are stored in the main memory temporarily as long as the program is done executing and hence, the RAM should not only be of large memory but also should be fast for data storage and retrieval purposes. It could be efficient if it supports CPU cache memory to access recently used data or access frequently used data.
Efficiency is another factor in programming, in how a program runs and how efficiently it runs and how much of the resources are utilized to run the program or a set of simple or complex code or instructions. It is considered when the computer's, software, Operating System (OS), or an application's performance is considered gauging its operations, functionalities, and the outcome or results it delivers.
In order for the computer to use its memory and in an efficient way in programming, data structures are used to helping run programs more efficiently with their data management capability.
Data manipulation, efficiency, and memory are useful in programming because all these factors facilitate a program to showcase the full capability it is developed for. All these three factors are required in programming for a program to successfully execute to come up with the correct and expected outcome or output.
If a system, computer or a program is efficient, it, in turn, saves a lot of money to be spent on a computer, software, or a program, for the simple reason, the more the efficiency, the more the performance, the less the utilization of time, resource, less efforts, and less cost for all these factors. Also, the programs written themselves should be small with fewer codes; few, simple, efficient, and instructions.
In programming, a program's efficiency is calculated on how fast it manipulates the data or the CPU speed at which it runs the code, and how fast it stores and retrieves the data from either CPU cache, RAM, or secondary or hard disk.
An example of data manipulation is any data structure.
Examples for memory are RAM, cache memory, secondary storage or
hard disk.