Programming concepts. Select the type of programming. What is programming in general understanding?

The term programming refers to the process and art of creating computer programs using special programming languages.

In the general sense of the word, programming is the formalization of a predetermined state, in response to an event, implemented by means of mathematics or natural sciences.

In the narrow sense of the word, programming is considered as the coding of algorithms in a given programming language. In a broader sense, programming is the process of creating programs, that is, developing software.

Programming includes:

· Design - development of a set of algorithms

· Coding and compilation - writing the source code of a program and converting it into executable code using a compiler

· Testing and debugging - identifying and eliminating errors in programs

· Testing and delivery of programs

· Escort

Different programming languages ​​support different programming styles (called "programming paradigms"). Part of the art of programming is choosing one of the languages ​​that best suits the problem at hand. Different languages ​​require different levels of attention to detail from the programmer when implementing an algorithm, often resulting in a trade-off between simplicity and performance (or between programmer time and user time).

The only language directly executed by the processor is machine language (also called "machine code"). As already mentioned, initially, all programmers worked out every little detail in the machine code, but now this difficult work is no longer done. Instead, programmers write source code, and the computer (using a compiler, interpreter, or assembler, which will be discussed later) translates it, in one or more stages, specifying all the details, into machine code, ready to be executed on the target processor. However, in some languages, interpreted binary "virtual machine" code, also called byte-code, is generated instead of machine code. This approach is used in Forth, Lisp, Java (Chapter 3 of the abstract is devoted to this language).

Now that we know a little about the concept of “programming,” we can move on to the material part of the process of creating programs. This, of course, is technical (hardware) programming support - a set of electrical, electronic and mechanical components automated systems makes them up technical support(as opposed to software, which is software for automated systems). For example, an electronic computer (computer) or computer is a set of technical and software tools based on the use of electronics and intended for automatic or automated data processing in the process of solving computational and information tasks.


Concept of programming language

The process of computer operation consists of executing a program, that is, a set of very specific commands in a very specific order. The machine form of the instruction, consisting of zeros and ones, indicates exactly what action the central processor should perform. This means that in order to give the computer a sequence of actions that it must perform, you need to specify a sequence of binary codes for the corresponding commands. Machine code programs consist of thousands of instructions. Writing such programs is a difficult and tedious task. The programmer must remember the combination of zeros and ones of the binary code of each program, as well as the binary codes of the data addresses used in its execution. It is much easier to write a program in some language that is closer to natural human language, and entrust the work of translating this program into machine codes to a computer. This is how languages ​​designed specifically for writing programs arose - programming languages.

A programming language is a special language in which commands are written to control a computer. Programming languages ​​are designed to make it easier for people to read and write for computers, but they must then be translated (by a translator or interpreter) into machine code, which alone can be executed by the computer. Programming languages ​​can be divided into high-level languages ​​and low-level languages.

A low-level language is a programming language designed for a specific type of computer and reflecting its internal machine code; Low-level languages ​​are often called machine-oriented languages. They are difficult to convert for use on computers with different CPUs, and also quite difficult to learn, since it requires a good understanding of the internal workings of the computer.

A high-level language is a programming language designed to satisfy the programmer's requirements; it does not depend on the internal machine codes of any type of computer. High-level languages ​​are used to solve problems and are therefore often called problem-oriented languages. Each high-level language command is equivalent to several commands in machine code, so programs written in high-level languages ​​are more compact than similar programs in machine codes.

Language creators interpret the concept of programming language differently. Among the communities of places recognized by most developers are the following:

Function: a programming language is intended for writing computer programs that are used to transmit instructions to a computer for performing a particular computing process and organizing the control of individual devices.

Problem: A programming language differs from natural languages ​​in that it is designed to transmit commands and data from a person to a computer, while natural languages ​​are used only for communication between people. In principle, we can generalize the definition of “programming languages” - this is a way of transmitting commands, orders, clear guidance for action; whereas human languages ​​also serve to exchange information.

Execution: A programming language can use special constructs to define and manipulate data structures and control the computation process.

Since the creation of the first programmable machines, humanity has already come up with more than two and a half thousand programming languages. Every year their number is replenished with new ones. Some languages ​​are used only by a small number of their own developers, while others become known to millions of people. Professional programmers sometimes use more than a dozen different programming languages ​​in their work.

But creating a language convenient for writing programs is not enough. Each language needs its own translator. Such translators are special programs-translators.

A translator is a program designed to translate a program written in one programming language into a program in another programming language. The translation process is called translation. The texts of the source and resulting programs are located in the computer's memory. An example of a translator is a compiler.

A compiler is a program designed to translate a program written in a language into a machine code program. The process of such translation is called compilation.

The compiler creates the finished result - a program in machine code. This program is then executed. Compiled version original program can be saved to disk. The compiler is no longer needed to re-execute the original program. It is enough to load the previously compiled version from the disk into the computer memory and execute it.

There is another way to combine the processes of translation and program execution. It's called interpretation. The essence of the interpretation process is as follows. First it is translated into machine codes, and then the first line of the program is executed. When the execution of the first line is completed, the translation of the second line begins, which is then executed, and so on. This process is controlled by an interpreter program.

An interpreter is a program designed for line-by-line translation and execution of the source program. This process is called interpretation.

The translation process includes checking the source program for compliance with the rules of the language used in it. If errors are found in the program, the translator enters a message about them on the output device (usually on the display screen). The interpreter reports the errors it finds after translating each line of the program. This greatly simplifies the process of finding and correcting errors in the program, but significantly increases the broadcast time. The compiler translates the program much faster than the interpreter, but reports the errors it finds after the entire program has finished compiling. Finding and correcting errors in this case is more difficult. Therefore, interpreters are designed mainly for languages ​​intended for teaching programming and are used by novice programmers. Most modern languages ​​are designed for developing complex software packages and are designed to be compiled.

Sometimes the same language can be used by both the compiler and the interpreter. Such languages ​​include, for example, BASIC.

Classification of programming languages

If you have noticed, several individual names of programming languages ​​have already been mentioned in the text. But before describing them in more detail, it is necessary to classify them into groups for ease of perception.

Firstly, these are machine-oriented languages, i.e. languages, the sets of operators and visual means of which significantly depend on the characteristics of the computer (internal language, memory structure, etc.). Machine-oriented languages ​​allow you to use all the capabilities and features of Machine-dependent languages:

· high quality created programs(compactness and speed of execution);

· the ability to use specific hardware resources;

· predictability of object code and memory orders;

· for compiling effective programs it is necessary to know the command system and the operating features of this computer;

· the labor-intensive process of writing programs (especially in machine languages ​​and JSC), which is poorly protected from errors;

· low speed programming;

· the impossibility of directly using programs written in these languages ​​on other types of computers.

Machine-oriented languages ​​are divided into classes according to the degree of automatic programming.

As I already mentioned, an individual computer has its own specific Machine Language (hereinafter referred to as ML), it is prescribed to perform specified operations on the operands they define, so ML is a command language. However, some families of computers have a single ML for computers of different power. The command of any of them reports information about the location of the operands and the type of operation being performed.

In new computer modules, there is a tendency to improve internal languages ​​in machine-hardware ways to implement more complex commands that are closer in their functional actions to operators algorithmic languages programming.

Symbolic Coding Languages ​​(hereinafter referred to as SKL), just like ML, are command languages. However, operation codes and addresses in machine instructions, which are a sequence of binary (in internal code) or octal (often used when writing programs) digits, are replaced in YSC by symbols (identifiers), the writing form of which helps the programmer more easily remember the semantic content of the operation. This ensures a significant reduction in the number of errors when compiling programs and greatly facilitates the programmer’s work.

There are also languages ​​that include all the capabilities of YSC, through the expanded introduction of macro commands - they are called Autocodes.

IN various programs There are some fairly frequently used command sequences that correspond to certain information conversion procedures. The effective implementation of such procedures is ensured by their design in the form of special macro commands and the inclusion of the latter in a programming language accessible to the programmer.

A language that is a means for replacing a sequence of characters describing the execution of required computer actions into a more compressed form is called a Macro (replacement tool).

Basically, a Macro is designed to shorten the original program entry. The software component that enables macros to function is called a macro processor. The macroprocessor receives the macro-defining and source text. The macroprocessor's response to a call is to issue an output text.

The next type of languages ​​are machine-independent languages. These are means of describing algorithms for solving problems and information to be processed. They are convenient to use for a wide range of users and do not require them to know the specifics of organizing the functioning of computers and aircraft.

Similar languages are called high-level programming languages. Programs compiled in such languages ​​are sequences of statements structured according to the rules of viewing the language (tasks, segments, blocks, etc.). Language operators describe the actions that the system must perform after translating the program into ML.

Thus, command sequences (procedures, subroutines), often used in machine programs, are represented in high-level languages ​​by individual statements. The programmer was able not to describe in detail the computational process at the level of machine instructions, but to focus on the main features of the algorithm.

With expanding areas of application computer technology there was a need to formalize the presentation of the formulation and solution of new classes of problems. It was necessary to create programming languages ​​that, using notations and terminology in this area, would allow one to describe the required solution algorithms for the assigned problems; they became problem-oriented languages. These problem-oriented languages ​​should provide the programmer with the tools to briefly and clearly formulate the problem and obtain results in the required form.

Universal languages ​​have been created for a wide range of tasks: commercial, scientific, modeling, etc. The first universal language was developed by IBM. It allows you to work with characters, digits, fixed-point and floating-point numbers. The language takes into account the interrupt capabilities included in many machines and has appropriate operators. The possibility of parallel execution of program sections is provided. The emergence of new technical capabilities set a task for system programmers - to create software tools that ensure operational interaction between a person and a computer; they were called dialog languages. This work was carried out in two directions. Special control languages ​​were created to provide operational impact on the completion of tasks, which were compiled in any previously undeveloped (non-dialog) languages. Languages ​​were also developed that, in addition to management purposes, would provide a description of algorithms for solving problems. Non-procedural languages ​​make up a group of languages ​​that describe the organization of data processed using fixed algorithms (tabular languages ​​and report generators), and languages ​​for communication with operating systems. Allowing a clear description as a task, and the actions necessary to solve it, decision tables make it possible to clearly determine what conditions must be met before proceeding to any action. One decision table, describing a certain situation, contains all possible block diagrams of implementations of solution algorithms. Programs written in tabular language conveniently describe complex situations that arise during system analysis.

Object-oriented programming is a programming method that closely resembles our behavior. It is a natural evolution of earlier innovations in programming language development. Object-oriented programming is more structured than all previous developments related to structured programming. It is also more modular and more abstract than previous attempts to abstract data and move programming details internally.

One of the most important principles of object-oriented programming is that the programmer must think about the code and the data together when developing a program. Neither code nor data exists in a vacuum. Data drives the flow of code, and code manipulates the images and values ​​of the data. If your code and data are separate elements, then there is always the danger of calling the correct procedure with the wrong data or the wrong procedure with the correct data. It's up to the programmer to make sure these elements match, and while Pascal's strong typing helps, the best he can do is point out the mismatch. Pascal never says anything about what actually exists together. If it is not marked with a comment or is not something you remember all the time, then you are playing with fate. The object synchronizes code and data by jointly constructing their descriptions. In reality, to get the value of one of the fields of an object, you call a method related to this object, which returns the value of the desired field. To assign a value to a field, you call a method that assigns this field new meaning.

The application is assembled from many elements: forms, program modules, external libraries, pictures, icons, etc. Each element is placed in a separate file and has a strictly defined purpose. The collection of all the files needed to create an application is called a project. The compiler processes the project files sequentially and builds an executable file from them.

The main project files can be divided into several types: Form description files - text files with the DFM extension that describe forms with components. These files store initial values properties you set in the properties window. Program module files are text files with the PAS extension containing the source program codes in Delphi language. In these files, you write methods for handling events generated by forms and components.

Main project file - text file with DPR extension, containing the main program block. The project file includes all the software modules used and contains statements to run the application. The Delphi environment creates and controls this file itself. A Delphi project is a set of software units - modules. One of the modules is the main one, containing instructions that begin the execution of the program.

The main application module is built entirely by Delphi. The main module is a file with the extension dpr. In order to see the text of the main application module, you need to select the View Source command from the Project menu. Each form in the project has its own program module (unit), containing all form-related declarations and event processing methods written in Delphi. Software modules are located in separate files with PAS extension. Their number may exceed the number of forms. Why? Because in some cases, program modules may not belong to forms, but contain auxiliary procedures, functions, classes, etc.

Never change the name manually. The Delphi environment requires that the module name be the same as the file name, so if you want to rename a module, save it to a file with a new name using the menu command File | Save As.... The Delphi environment itself will substitute a new name after the word unit. After that, remove the old module. The content of the interface section of the module (interface) begins with the connection standard modules VCL libraries, which define frequently called routines and classes of components placed on the form. The Delphi environment generates a list of modules without your participation and automatically updates it when you add new components to the form. However, the list of connected modules can be changed directly in the code editor (manually). A module begins with the word unit, followed by the name of the module. The module consists of the following sections:

  • · interface;
  • · implementation;
  • · initialization.

The interface section (begins with the word interface) tells the compiler which part of the module is accessible to other program modules. This section lists (after the word uses) the library modules used by this module. There is also a Delphi-generated form description that follows the word type.

The implementation section opens with the word implementation and contains declarations of local variables, procedures and functions that support the operation of the form.

The implementation section begins with a directive ($R *.DFM), indicating to the compiler that the form description should be used in the process of generating the executable file. The form description is located in a file with the dfm extension, the name of which matches the name of the module. The form description file is generated by the Delphi environment based on appearance forms.

The directive ($R *.DFM) is followed by event handling procedures for the form and its components. The programmer can also place other procedures and functions here.

The initialization section allows you to initialize module variables. The instructions in the initialization section are located after the implementation section (descriptions of all procedures and functions) between begin and end. If the initialization section does not contain instructions (as in the example given), then the word begin is not specified.

It should be noted that a significant number of module instructions are generated by Delphi. Delphi, analyzing the programmer's actions to create the form, generates a description of the form class (after the word type). In order for the compiler to know which specific files are included in the project, some kind of organizing principle is needed. And it really is. This is a so-called project file with a DPR extension (short for Delphi Project). He represents the main program file in the Delphi language, which connects all module files included in the project using the uses operator. There is only one DPR file for each project. When we use the command File | New | Application we start developing a new application, the Delphi environment automatically creates a project file. As new forms are created, the contents of this file are modified automatically. When we finish our work and are ready to compile the project, the DPR file will contain a list of program modules that will be supplied as input to the compiler.

The concept of a component is fundamental to the Delphi environment. Without components, all the benefits of visual application development disappear and there is nothing to talk about. The Delphi developers took care to include easy-to-use components in the library that implement the appropriate dialog boxes. They are posted on the Dialogs page.

The theoretical section of any science is based on mathematical research methods. This also applies to computer science. It uses the methods of mathematics to build and study models of processing, transmission and use of information, creating the theoretical foundation on which the entire edifice of computer science is built.

By its nature, information is discrete and is usually presented in symbolic and digital form in texts and dotted form in pictures. Taking this into account, it is widely used in computer science mathematical logic as a branch of discrete mathematics. The next direction of theoretical computer science is Computational Mathematics , which develops methods for solving problems on computers using algorithms and programs.

Subsection information theory (as well as the theory of coding and transmission of information) studies information in the form of an abstract object, devoid of concrete content. Here the general properties of information and the laws governing its birth, development and destruction are explored. Here we study the forms into which the content of any specific elementary unit of information can be displayed.

System analysis - another direction of theoretical computer science. It studies the structure of real objects, phenomena, processes and determines methods for their formalized description through information models. Simulation modeling- one of the most important methods computer modeling, in which processes and phenomena occurring in real objects are reproduced.

Finally, decision theory studies general patterns for selecting the desired solution from a variety of alternative possibilities. This choice often occurs in conditions of conflict or confrontation. Models of this type are studied in game theory. Figure 1 Conventional representation of the structure of computer science in the form of a map:

Artificial intelligence

This area of ​​computer science is the youngest, emerging in the mid-70s. However, it is artificial intelligence that determines the strategic directions for the development of computer science. Artificial intelligence is closely related to theoretical computer science, from where he borrowed many models and methods, for example, the use of logical means to transform knowledge. Equally strong are the connections of this direction with cybernetics. Mathematical and applied linguistics, neurocybernetics and homeostatics are closely related to the development artificial intelligence . And of course, work in this area is unthinkable without development programming systems(Fig. 1).

Rice. 1

The main goal of work in the field of artificial intelligence is the desire to penetrate the secrets of people's creative activity, their ability to master knowledge, skills and abilities. To do this, it is necessary to reveal those deep mechanisms with the help of which a person is able to learn almost any type of activity. And if the essence of these mechanisms is unraveled, then there is hope to realize their similarity in artificial systems, i.e. make them truly intelligent. This goal of research in the field of artificial intelligence closely connects it with the achievements of psychology - a science one of the tasks of which is the study of human intelligence. A special direction is now actively developing in psychology - cognitive psychology , research in which is aimed at revealing patterns and mechanisms associated with the processes of human cognitive activity and which are of interest to specialists in the field of artificial intelligence.

Another direction of psychology is psycholinguistics also of interest to specialists in the field of artificial intelligence. Its results concern the modeling of communication not only using natural language, but also using other means: gestures, facial expressions, intonation, etc.

In addition to theoretical research, applied aspects of artificial intelligence are also actively developing. For example, robotics is creating technical systems, which are capable of operating in a real environment and partially or completely replacing a person in some areas of his intellectual and production activity. Such systems are called robots.

Expert system - another applied area of ​​artificial intelligence. Unlike other intelligent systems, expert system has three main features: 1 - it is adapted for any user, 2 - it allows you to gain not only new knowledge, but also professional skills related to this knowledge, i.e. not only gives know that..., but also know how..., 3 - it conveys not only knowledge, but also explanations and clarifications, i.e. has a teaching function.

Programming

Programming as a scientific direction arose with the advent of computers, and only software determines the effectiveness of using a computer. Currently, this is a fairly advanced area of ​​computer science. There is a significant team of specialists working in this area, who are divided into system and application programmers.

System programmers are, as a rule, very high-level specialists and develop system software , which includes operating systems, programming languages ​​and translators. OS ensure the functioning of computer technology and provide the user with comfortable conditions for interacting with the computer.

Programming languages are created for the development of application software. These languages ​​are high-level languages, the mnemonics and semantics of which are close to the natural language of human communication.

There are also machine languages ​​that are used directly in a computer and which consist of a sequence of machine instructions encoded in microprocessors. To convert programs written in a high-level language into machine language programs, special programs are used - translators , which are also created by system programmers.

Applied or problem-oriented programming is focused on the development of user programs to solve certain problems in various fields of science, technology, and production. For example, in education packages are used pedagogical software (PPS), which include training and monitoring software in a specific subject area.

Applied Informatics

Achievements modern computer science widely used in various fields of human activity: in scientific research ( ASNI - automated systems for scientific research), in the development of new products ( CAD - systems computer-aided design), in information systems ( AIS - automated information systems), in management ( ACS - automatic systems management), in training ( AOC - automated training systems), etc.

MINISTRY OF SCIENCE AND EDUCATION OF THE RUSSIAN FEDERATION

KAZAN STATE

FINANCIAL AND ECONOMIC INSTITUTE

Department of Mathematics and Economic Informatics

Concept of programming. Programming languages

Completed by: Molotov L.A.

Checked: Assoc. Kodolova I.A.

Kazan 2010

Introduction 3

1. Programming Basics 4

1.1.The concept of programming 4

1.2.Programming paradigms 5

1.3.Programming technology tools 8

2. Programming languages ​​11

2.1. Concept of programming language 11

2.2. Classification of programming languages ​​14

2.3. Description of some programming languages ​​17

3. Java 22 programming language

3.1. Java 22 Language Overview

3.2.The process of creating a Java program 23

3.3. Advantages of Java 25

Conclusion 28

List of sources used 29

Introduction

When you study a subject, you think that you know it; when you can write about it, you become more confident in your knowledge; Confidence increases when you can teach it to someone else; and completely confident when you start programming. Alan.J.Perlis

Until the mid-60s, computers were overly expensive machines that were used only for specific tasks and performed only one task at a time.

The programming languages ​​of this era, like the computers they were used on, were designed for specific tasks, such as scientific computing. Since machines were expensive and slow, computer time was also expensive - so the speed of program execution came first.

However, during the 60s, the price of computers began to fall so that even small companies could afford them; The speed of computers kept increasing, and the time came when the creators of programming languages ​​began to think more and more about the convenience of writing programs, and not just the speed of their execution.

At the dawn of computerization, machine language was the only language; man had not invented anything else by that time. To save programmers from the rigors of machine programming language, high-level languages ​​(i.e., non-machine languages) were created. “Small” (atomic) operations performed directly by machine devices were combined into “larger”, high-level operations and entire constructs, with which make it much easier and more convenient for a person to work. Thus, programming made a colossal breakthrough: new languages ​​became a kind of connecting bridge between humans and the machine language of the computer.

Progress computer technology determined the process of the emergence of new diverse sign systems for recording algorithms (programming languages) and the development of the programming process as a whole.

1. Programming Basics

1.1. Programming concept

Term programming means the process and art of creating computer programs using special programming languages.

In the general sense of the word, programming is a formalization of a predetermined state, in response to an event, realized by means of mathematics or natural sciences.

In the narrow sense of the word, programming is considered as coding algorithms in a given programming language. In a broader sense, programming is the process of creating programs, that is, software development.

Programming includes:

· Design - development of a set of algorithms

· Coding and compilation - writing the source code of a program and converting it into executable code using a compiler

· Testing and debugging - identifying and eliminating errors in programs

· Testing and delivery of programs

· Escort

Different programming languages ​​support different programming styles (called "programming paradigms"). Part of the art of programming is choosing one of the languages ​​that best suits the problem at hand. Different languages ​​require different levels of attention to detail from the programmer when implementing an algorithm, often resulting in a trade-off between simplicity and performance (or between programmer time and user time).

The only language directly executed by the processor is machine language (also called "machine code"). As already mentioned, initially, all programmers worked out every little detail in the machine code, but now this difficult work is no longer done. Instead, programmers write source code, and the computer (using a compiler, interpreter, or assembler, which will be discussed later) translates it, in one or more stages, specifying all the details, into machine code, ready to be executed on the target processor. However, in some languages, interpreted binary "virtual machine" code, also called byte-code, is generated instead of machine code. This approach is used in Forth, Lisp, Java (Chapter 3 of the abstract is devoted to this language).

Now that we know a little about the concept of “programming,” we can move on to the material part of the process of creating programs. These, of course, are technical (hardware) programming support tools - the totality of electrical, electronic and mechanical components of automated systems constitutes their technical support (in contrast to software, which is the software of automated systems). For example, an electronic computer (computer) or computer is a set of technical and software tools based on the use of electronics and designed for automatic or automated data processing in the process of solving computational and information problems.

1.2. Programming Paradigms

At the heart of a particular programming language is a certain guiding idea that has a significant impact on the style of the corresponding programs. Depending on the purpose and/or method of writing programs, they are distinguished paradigms(also known as approaches or technologies)programming:

Structured programming - programming methodology based on a systems approach to analysis, design and implementation of software. This methodology was born in the early 70s and turned out to be so viable that it is still the main one in a large number of projects. The basis of this technology is the following:

· A complex task is broken down into smaller, functionally better manageable tasks. Each task has one input and one output. In this case, the control flow of the program consists of a set of elementary subtasks with a clear functional purpose.

· Simplicity of control structures used in the task. This provision means that logically the task should consist of a minimal, functionally complete set of fairly simple control structures. An example of such a system is the algebra of logic, in which each function can be expressed through functional complete system: disjunction, conjunction and negation.

· Program development should be carried out in stages. At each stage it must be decided limited number clearly defined tasks with a clear understanding of their meaning and role in the context of the entire task. If such understanding is not achieved, this indicates that this stage is too large and needs to be divided into more elementary steps.

Modular programming concept. Just like for structured programming technology, the concept of modular programming can be formulated in the form of several concepts and provisions:

· Functional decomposition of a task - breaking a large task into a number of smaller, functionally independent subtasks - modules. The modules are interconnected only by input and output data.

· Module is the basis of the concept of modular programming. Each module in a functional decomposition is a “black box” with one input and one output. The modular approach makes it possible to painlessly modernize the program during its operation and facilitates its maintenance. Additionally, the modular approach allows you to develop parts of programs of one project in different programming languages, and then combine them into a single load module using packaging tools.

· Implemented solutions should be simple and clear. If the purpose of the module is not clear, then this indicates that the decomposition of the initial or intermediate task was not carried out with sufficient quality. In this case, it is necessary to analyze the task again and, possibly, carry out an additional division into subtasks. If there are complex places in the project, they need to be documented in more detail using a well-thought-out comment system. This process must be continued until you really achieve a clear understanding of the purpose of all the modules of the task and their optimal combination.

· The purpose of all module variables must be described using comments as they are defined.

Object-oriented programming (OOP). The idea of ​​OOP is the desire to connect data with the procedures that process this data into a single whole - an object. OOP is based on three important principles that give objects new properties. These principles are encapsulation, inheritance and polymorphism.

· Encapsulation - combining data and algorithms for processing this data into a single whole. In OOP, data are called object fields, and algorithms are called object methods.

· Inheritance is the ability of objects to generate their descendants. A child object automatically inherits all fields and methods from its parents, can supplement objects with new fields and replace (override) parent methods or supplement them.

2 years ago I wrote an article about the classification of programming knowledge. This was in the wake of my interest and active self-education in computer science. I wrote an article and forgot about it. I didn't intend to publish it on Habré. After all, it's based on mine personal experience and knowledge, which can be very subjective.

Recently, against the background of constantly receiving questions “how to learn programming?”, I remembered this material and re-read it. 2 years have passed, experience has increased, knowledge has been added, and views have changed. But this article has not lost its relevance for me, and I found almost nothing that I would like to change in it. It seemed to me that it was still worthy of publication. And perhaps it will help someone in their own professional development.

But before “launching” the material, still small retreat. About why I wrote all this in the first place. The fact is that in our countries former USSR IT education is very difficult. On the one hand, there are no training programs that will train specialists at the proper level (probably with very rare exceptions, which can be attributed to error). On the other hand, due to wide possibilities self-education, programmers and are in no hurry to study at universities - everyone strives to start practicing as early as possible. Often only one direction is studied (for example, PHP + Mysql is the most popular) and into battle. Moreover, this is where it all ends. As a result, we have a huge number of programmers who don’t even know basic things. This leads to problems with code quality, the efficiency of algorithms, and cycling.

But programming is a full-fledged area of ​​knowledge, which also requires engineering training. Just like construction or telecommunications. Yes, you can build a house (mansion) with your own hands and without education. And you can build most websites by reading a couple of books on PHP and HTML. But you can’t build a high-rise building without special training, just as you can’t write Google without knowing the basics.

The opportunities for self-education in computer science are now enormous. The only thing missing is systematic preparation. How to figure out what to study and in what order? It seems to me that this material will help you sort out the areas of knowledge in computer science and create a study program for yourself using books. The choice of books is a separate topic and is not included in the scope of the article, but this can be discussed in the comments.

Go.

People sometimes ask me what you need to learn to become a programmer. The question is somewhat naive, because... In my opinion it is impossible to answer this normally. Those. First you need to figure out what kind of programmer you need to become. And anyway, are you a programmer? In addition, both highly qualified, expensive specialists and “labor” are in demand on the market. The package of knowledge and experience of the first and second differs to a significant extent.

But, despite such vagueness of the question, it is still possible to answer it. You can describe the approximate maximum of knowledge that in one way or another relates to programming. In fact, they usually strive to teach this maximum in universities in specialties whose titles include the word “programmer.”

I studied to be a programmer in college, then at university. It was the university that sorted out the understanding and interconnection of disciplines related to the so-called computer sciences. Even if the knowledge they gave there was narrow-minded and a little outdated, they had a good systematic approach. After years of practice after graduating, I came to the conclusion that the university classification of disciplines is quite good and allows us to answer the question of what any programmer should know.

Of course, it is impossible to know everything. And it's not necessary. In addition, some questions need to be known in depth, while others require a superficial overview understanding. Therefore, depending on the specialization, some disciplines are more relevant, some less so. But general basic knowledge is necessary for almost all of them for any software engineer, from a systems engineer to a web developer.

In the previous paragraph, I specifically introduced the term “software engineer”. Somehow it turns out that a programmer is not necessarily an engineer. Even from the Wikipedia definition it follows that an engineer is primarily a designer. This is the one who creates, i.e. designs systems. But in programming practice, design is not always necessary. Sometimes coding is enough: using a given set of technologies, create something that works. Typical example- a herd of corporate or marketing sites on Joomla, WordPress, Drupal, etc. This is the level of a technician, not an engineer. This is the level of secondary education. And you can work as a technician even after completing courses in any programming language; a strong theoretical base is not needed.

And, returning to software engineers, I want to offer my own graph of disciplines that programmers study. It is obvious that some disciplines actively use the knowledge of others, or even grow out of others. Accordingly, to fully understand the “upper” subject, some level of understanding of the lower one is necessary.

The graph consists of subjects (disciplines) and is divided into levels. The lowest one - General base - has nothing to do with computer science at all. It is given only to show what the disciplines of computer science are based on.

There are 2 types of connections between disciplines: use (regular arrow) and expansion (outline arrow). Use implies the need for fragmentary knowledge of another subject, and expansion implies the need for at least an overview, but complete knowledge of the discipline being expanded.

First level from CS (computer science) - Special base . This is the starting point for any programmer on four fronts:

  1. arithmetic basics of computers(number systems and operations with numbers, logical operations);
  2. physical foundations of computers(semiconductors, transistors, logic gates, circuits, integrated circuits);
  3. theory of algorithms(algorithms and data structures; complexity, efficiency; methods of representing information in memory);
  4. programming languages(task and concept of language, levels, types of languages, abstraction, levels of abstraction, translation/compilation, patterns, principles, paradigms - review).

A special database offers fundamental theoretical knowledge, on which disciplines are built more high levels. For the average programmer, an overview of all subjects of the special base is required. Some specializations require an in-depth understanding of the theory of algorithms (primarily for developers of various kinds of libraries).

At a higher level are the disciplines that are basic in programming. That's why I called this level Basics . It includes:

  1. computer architecture(processors, microarchitecture, memory, buses, input/output);
  2. data processing(information theory, statistics, models, data retrieval, linguistic aspects, information processing using spreadsheet processors);
  3. C/C++ basics(basic language properties, syntax, pointers, input/output, arrays, STL basics).

Following the Basics comes Level 1 . This is the first application level, and those who are especially impatient can begin commercial practice after mastering this level. It includes 5 disciplines:

  1. ASM basics(development of computer architecture in the direction of programming, writing simple drivers and algorithms, assembly inserts in C/C++);
  2. C/C++(OOP, application development, libraries, WinAPI, make utils, parallel programming).
  3. OS(OS architecture, processes, interprocess communication, threads, scheduling, working with memory and peripherals, POSIX systems);
  4. system analysis(subject area, business processes, flows, diagrams, principles and theory of system analysis);
  5. Database(set theory, types of DBMS, relational DBMS, data models, SQL, specific databases).

Next level - Level 2 - develops the previous one. By the way, computer networks got into it only for the reason that to study them it is desirable (but not necessary) to first master operating systems. In terms of development, this subject is still closer to the first level.

Level 2 includes:

  1. software development (life cycle Software, development stages, basics of running software projects, tools);
  2. data analysis(Data Mining, OLAP, machine learning, neural networks, AI);
  3. computer networks(by levels of TCP/IP and/or ISO/OSI stacks “from and to”, protocols, network programming in C/C++);
  4. managed code programming languages(managed code, virtual machines, garbage collectors, unit testing, actual practice in C# or Java);

Level 3 - the last level for the average programmer. It is the most voluminous and includes only those disciplines that are directly related to software development. There were 6 of them in total:

  1. UI and usability development(principles of designing user interfaces);
  2. team and project management(development methodologies and other management issues);
  3. software testing(overview: types of testing, tools);
  4. web technologies(HTTP protocol, web server, CGI, caching and proxying, client programming);
  5. distributed systems(architectures of distributed systems, protocols for network interaction of components, tools, principles, approaches to building distributed systems, fault tolerance, big data, high loads);
  6. interpreted programming languages(features, basics in two or three languages, practice in one or two languages: JS, PHP, Python, Ruby).

Everything above is extended Expertise . By and large, this level can be expanded indefinitely, adding disciplines adjacent to development and the most complex aspects of software development. I gave 3 examples - compiler development, development operating systems and construction of architectures for large software and hardware systems, or architectures designed for particularly high loads. I didn’t draw the dependencies to the lower levels in the graph, because there will be too many arrows going through all levels, right up to the Common Base. Probably, broad dependencies are one of the signs of questions of an expert nature. This just confirms that the expert level requires the broadest knowledge and good experience.

The interesting thing about the graph is that it not only shows the preferred order of studying subjects, but also:

  1. makes it possible to understand which disciplines are needed more and which ones less for work in a certain specialization (simply select the main subject of specialization and look at connections and distance to others);
  2. gives an understanding of how to study computer science if you start not with the fundamentals, but with applied knowledge (for example, PHP) - you can move along the connections to the sides and down - in fact, this is exactly what my personal path of development was (and I can’t call it the easiest, most effective and optimal).

The graph is a model. And a good model usually gives answers to many questions at once. I set myself the task of making a good graph, close to reality. Naturally, it is based on my personal experience and does not pretend to be ideal. I tried to make it as objective as possible. And I remind you once again that this is a graph for a programmer. Those. for a tester, system administrator and other professions close to programming, it will be more or less close, but clearly different.

P.S. We kindly request you not to develop holivars on the topic that must So what should not know programmer. This is everyone’s personal choice and this article is not about that at all. Here is a classification of knowledge and the relationship between them. Not everyone is interested in this, not everyone needs it.