For those without knowledge of programming, the terms used are strange and confusing. To a beginner in programming, words such as programs, queries, procedures, subqueries, etc. are unfamiliar and uncommon. They can get you lost, but what do they stand for individually?
Duplication in programming is always avoided. Basic code in billions of lines may make up a program, but duplication is always avoided. When an additional member is needed, an error message may occur.
For example, if a currency that is global, called the Euro, is to be added. Updating each program to have it would be difficult, as it would require the addition of many lines of code. But a function or a sub-program can be created to handle this. Then it would be added to the program to handle the changes.
Many components of new programs are usually in pre-existence, for example, file access and inventorying. Alternatively, instead of writing new lines of code, we can have a sub-program work on the specific function. It can then be added to other programs to do the same task.
A parameter can go into a specific program handling a specified task. Control is taken back to the main program, i.e., a secondary program altering values. Varying languages can be made to call varying programs. This enables having controllable function pieces, and different function types are handled better by suitable languages.
A function can be multiline or single-line. A multi-line function stretches across many lines, while a single-line function returns a value after the task is performed on a single line. A specific name must call the single-line function. A multi-line function, however, can be called by non-sequential statements in a block of code.
To put it simply, functions are reusable blocks of code. That is, instead of writing code again, we use code that is already written, i.e., repetition. For example, mathematical functions such as log and tan, or date (working with date values) or string (looking if a string can be located in another string). Mostly, program code is separated from the functions. The functions are developed as if they are small programs. Specific functions usually provide an entry point to certain programs.
Just by looking at what a computer does, one begins to understand how programming works. All the basics can be observed from working applications. But the transition from a beginner to a proficient programmer takes time.
