What is stack, recursion and natural algorithm

Table of contents:

What is stack, recursion and natural algorithm
What is stack, recursion and natural algorithm
Anonim

They say that the theory and practice of programming are high technologies and they are developing. The field of information technology is rapidly expanding its capabilities. New professions and markets are emerging.

Perhaps this is how it really is, but the fundamental constructions of programming, as they were at the beginning of the beginnings, remain so to this day. And this is not a hammer or a screwdriver, which, in essence, are eternal.

Syntax constructs and real logic

Without formal representation of data, there is no programming. Man felt great in the world of information long before he realized that many of his actions are algorithms. Conveyors, machines, tools are mechanisms, rigid forms of implementation of sequences of actions.

An ideal example is the protocol stack. Each works at its own level: physical, channel, network, transport, etc. At the same time, in each network design, the set of protocols and their interaction are different. itworks! By the way, the protocol stack is not only local and global networks. Diplomacy has its own set of protocol ideas, the economy has its own set, in the organization of production in general there are a lot of rules and conventions, laid in layers in a single system.

communication protocol stack
communication protocol stack

The appearance of computers, computers, smartphones did not cause a revolution. All programming languages that have ever existed and exist to this day have manipulated and continue to do so with the same algorithms, but only in softer constructive forms.

The "softness" of the programming language against the "hardness" of the sequence of actions of the conveyor did not give the desired effect. In fact, every programming language is a system of strict syntax rules, and the information to be processed is wrapped in a strict formal data structure.

Real logic is mobile. A person makes decisions on the situation, relying on a dynamically developing foundation of knowledge. The whole arsenal of human algorithms is living dynamics. "Similar in essence" actions are instantly clothed in a recursive form, and each subsequent action relies on the previous one.

What is a knowledge stack in reality is the dynamics of new opportunities based on existing circumstances.

Full stack developer

According to "Google", the first mention of the "developer" ("=developer" - something more significant than just a programmer) dates back no earlier than 2010. According to other sources, the idea of a "developer" is 2004. ByIn fact, time is of little importance here. A developer with a full set of knowledge came to programming, but nothing has changed.

developer=developer
developer=developer

The stack in programming is the moment when the first processor appeared, because it was he who had to ensure the sequential execution of commands. It is difficult to think conceptually at the level of machine codes, but the stack was confidently formed in the minds of specialists as a surprisingly simple and effective rule for organizing computational processes.

Stack and processor
Stack and processor

Without a stack, there is no recursion, and without it, any algorithm turns into a cumbersome sequence of actions. Every person can think and act recursively, but not every programmer can write such an algorithm, it’s hard to say something definite about “developers” in this context.

Whatever you call the profession, nothing will change: programmer, developer or full stack developer. A person must know his business in full, and in such a way as to dynamically grow adequately to changing working conditions.

Knowledge cannot be static, as it is always dynamic.

Pile of plates against rigid syntax

Programmers and persons accompanying them (specialists of various profiles) have long learned to speak beautifully:

Full-stack developers: Programmers who understand the whole stack tend to create better applications.

You can find many similar declarations on the Internet. But if in any cafe and restaurantthe old-fashioned way they stack the plates so that they are convenient to use and this technology adaptively takes into account the realities of the current situation, programming is still dominated by: if, switch, for, foreach, while and the assignment sign.

All the syntactic achievements of the last century migrated to the current century with a clear claim to live to see the next one.

Full or not full, but a programmer who thinks reality and strives to create a quality software product can go beyond the predefined rigid syntax. What is a stack, if not a tool to combat this brake on progress? Whatever the creator of a modern programming language thinks, trying to preserve the legacy of the last century, it can be tritely leveled by means of a stack.

full developer
full developer

A simple example. There is real information. There is a data that can be processed by a specific algorithm. The solution is achievable. But the real information determines the variants of the data. This means that versions of the algorithms are needed, and this will lead to solutions.

There is nothing easier than creating a stack: a specific situation arose, and it "sorted out" down, decomposed into components, and then went up and showed the solution.

Recursion, what is a stack for it

It is impossible to describe everything with one algorithm. When creating a program, a specialist constantly discovers similar sections of code. By using functions, the programmer optimizes it and makes it readable, testable, and efficient.

Recursion is a qualitatively new level of functionality: the skill of a functioncall itself when necessary and return to the previous state of affairs, changing the required amount of data. What is a stack, if not a plan to dive into the problem until it is fully recognized (understood) and return back to its original state with an adequate change in the surrounding reality (data).

About Function Skills
About Function Skills

Programming manipulates data, not information. According to most experts, data is a formal system for representing information. If you create several formal systems, you get more options for presenting information, which means a stack. The computer will receive an algorithm to adequately respond to the information provided by formal data systems.

Of course, in this context, everything depends on the level of knowledge of the programmer and his ability to represent information in various systems of data structures. Giving each such structure the necessary functionality (at the level of each of its own), you can get a picture of data and functions. In a general system, this will be an adequate universal solution.

It is not necessary to be a full stack developer, it is enough to be a programmer who strives to create dynamic recursive algorithms. The world, of course, will not collapse at the feet of such a specialist, but he will know his work well.

Natural algorithm

There are no special options: a natural algorithm is something that runs by itself and adequately received information. As usual, natural algorithms are peculiar to man, animate and inanimate nature. It can be said that thereconscious algorithms and laws of physics, chemistry, economics, society.

Recursion and stack
Recursion and stack

Information is a flow of something that has a system and patterns. You shouldn't understand it all at once, you can always do it later. To solve current problems, it is enough to perceive information and adequately respond to it.

In the context of programming and "high technology", recursion and the stack rule are enough to achieve an objective and efficient solution to any problem.

Popular topic

Editor's choice

  • IPv6 protocol: setup on Windows systems
    IPv6 protocol: setup on Windows systems

    Probably, many users of computer systems, delving into the network settings, noticed that in the list of protocols, in addition to the well-known IPv4, there is also the sixth version (IPv6)

  • View history on computer
    View history on computer

    Today you can learn about almost all the actions taken on the computer. It's about browsing history

  • Computer technology hardware: definition, description and types
    Computer technology hardware: definition, description and types

    Modern computers to ensure maximum performance and correct operation use hardware and software that are very interconnected and clearly interact in different directions. Now let's touch on the consideration of hardware, since initially it is they who occupy a dominant position in ensuring the operability of any computer or even mobile system

  • Keyboard shortcuts and the evolution of operating systems
    Keyboard shortcuts and the evolution of operating systems

    It takes about a minute to copy or move a file from one location to another using the menu system. The developers introduced a keyboard shortcut that replaced all these actions and made it possible to reduce the time of this common operation by 3 or more times. True, for this it was necessary to slightly modernize the keyboard: new keys were added - "Ctrl", and later - "Windows"

  • If the torrent does not download
    If the torrent does not download

    An article for those who consider the ability to download files from torrent trackers a convenience, not an echo of the past. Not only the unavailability of "high-speed" tariff plans is the reason for the choice, but also personal preferences