USA/UK English

What is an algorithm and why is it important on the Internet?

.

Among all areas of human knowledge, technology is one of the ones that most produces neologisms or popularizes words previously restricted to certain scenarios. A practical example is the word algorithm, which is far from being new, but which until a few years ago was predominantly used by programmers.

It is currently part of the vocabulary of many people, who talk about the algorithms of Google and Bing, the algorithms of social networks, electronic games and various applications.

But despite the “fame”, do you know what an algorithm is? Why is he so important? Or even, how is he able to determine his next steps?

So come with us, and together we will understand everything that is behind this word so closely linked to digital transformation.

What is an algorithm?

Until not long ago, the term algorithm was used only by professionals in the fields of mathematics and computing to designate the finite set of precise instructions that must be applied to input data to produce an output.

Okay, it’s a short definition, but generic and without much practical effect for someone who is not from the area.

When we think of comparisons with situations that anyone knows, a possible analogy is a cooking recipe.

When you read: “put 200 grams of flour, 100 ml of milk and 1 egg in a bowl and mix everything for 3 minutes”, this recipe step corresponds to a part of an algorithm for making a dish.

But there are several other situations in which we use algorithms and therefore follow precise instructions on what to do to obtain a result, such as following the steps of a software installation tutorial, or using a bicycle or furniture assembly guide, or maybe the instruction manual for a new appliance and even when we use GPS (turn right, go for 300 meters, keep to the right, etc.) to go to a destination.

The difference for algorithms in the scope of computing is that they are intended to “teach” the computer, or cell phone, or household appliance (eg microwave oven), what to do with the data they receive and according to with the nature of that data.

Yes, even in the case of a “simple” microwave oven, because with each button – or sequence of buttons – that is pressed, the operating system residing in it (yes again, there is an OS in the microwave!), corresponds to data and a corresponding set of actions.

Pressing the clock adjustment button and the numbers corresponding to the time does not produce the same action as pressing numbers for minutes / seconds and the “start” button.

In the oven, each button and the sequence in which they are pressed, determines different inputs of data and therefore different outputs of data, or if you prefer, different results.

And it’s the same with all electronics that are programmable, which could be the washing machine or the dishwasher, the SmartTV and which probably has a Linux-based system, or the sound system in your car.

What is the origin of the word algorithm?

There are some slightly divergent possibilities related to the origin of the word, but what most of them have in common is the Persian mathematician, astronomer, astrologer, geographer and writer named Muḥammad ibn Musa al-Khwarizmi, who lived between the years 780 and 850 .

His last name in westernized pronunciation, sounded like “Alcuarismi” and that, like many other words, evolve and are modified over time, producing in addition to the word algorithm, another common term in mathematics – numeral.

This version gains strength, also due to the fact that, as we learned, nouns beginning in “al” are of Arabic origin, like the word “alface”.

Among his legacies, al-Khwarizmi was notable for registering his studies and discoveries in mathematics and other areas in which he focused on books, but with a very understandable language, different from that of other scholars and especially the mathematicians of the past.

And from what we saw of the definition of algorithm, that’s exactly what al-Khwarizmi did, when, for example, he explained precisely and through instructions, the system for solving linear equations.

How do algorithms work in computing?

The instructions or steps that we have to follow to bake a cake, assemble a piece of furniture or travel by car are not suitable for a computer.

Algorithms only serve as a basis / guide for the actions that a program needs to perform to fulfill what is expected of it. This is what is called a logical structure of actions.

For this to become something that a computer can execute, it needs to be implemented in a programming language and whose comparison with situations known by all is not difficult either.

Just remember the instruction manuals that come in more than one language. The instructions and sequence of what to do, remain the same, however they can be in addition to Portuguese, in English, in Spanish, German and French.

Keeping due proportions, it is analogous to choosing the most appropriate language to create the desired program.

If, on the one hand, each programming language offers its own resources, on the other hand, all of them also contain syntaxes, rules and conventions, like spoken languages.

In addition, programming languages ​​have structures that are intended for certain situations.

If, for example, in real life an algorithm to change a light bulb contains an instruction “go up one step” for each unsuccessful attempt to reach the light bulb, in programming a structure known as repetition is used and which makes use of the words “repeat” and “until”

That is, the act of climbing one more step on the ladder is repeated (repeat) until (until) the lamp is reached, which in this case is the condition that needs to be tested as true (true).

Upon reaching the lamp, the repetition is interrupted and the next instruction is followed, which could be: “unscrew the lamp counterclockwise”.

In addition to structures such as “repeat – until”, programming languages ​​have a wide range of resources, such as mathematical and logical operators, variables, constants, functions, procedures, etc.

Thus, it is possible to check if a value is greater, lesser or equal to another, if a condition is verified, calculate a value, or simply check if a key is pressed or evaluate a value that is typed by the user and based on previously determined rules. , perform an action.

As there are also some “tricks”. If, for example, a program must perform the same action for all numbers between 0 and 9 that are pressed, except when it is equal to 5, the corresponding algorithm would be something like:

se não (num=5) faça “tal coisa”

That is, for every situation in which the variable “num” is NOT equal to 5, it performs the action, and it is not necessary to repeat the action for 0, 1, 2, 3, 4, 6, 7, 8 and 9.

It is on this basis that a program “knows” that when clicking on the “ok” button in the print window, it must send the document to the printer and that clicking on “cancel” aborts the process and closes the window. It uses another piece of code whose “responsibility” is to keep monitoring what clicks the user makes and what keys he uses and passes the result of what he “sees” the user doing.

How are algorithms used on the Internet?

With the development of the Internet, it was soon realized that algorithms could be used beyond implementing functionalities on websites.

Thanks to the logic resources, conditions verification and databases and some Statistics principles, they could be used for more “intelligent” destinations.

In fact, it has been said for a long time that some of the main companies on the Web are using increasingly sophisticated algorithms and rules based on artificial intelligence and machine learning.

The idea behind this is to create and manage huge databases that are very well organized, categorized, of diverse origin and constantly evolving, the so-called big data.

Basically, this universe of data supplied by the various actions of Internet users on websites, services, social networks (or would that be anti-social?), serves as a subsidy to know their behavior, their desires, their needs and their expectations.

How is this possible?

Alongside what was already available in terms of programming, technologies were being developed that are capable of extracting usable information from the machine, as is the case of natural language processing, which in short has the function of making the algorithm that evaluates a text, not only identify and collect keywords, but the context of the other words that accompany it.

It has already been like this with Google’s BERT update, announced in 2019, in such a way that when performing a search in the search engine, it will not only deliver the most likely results based on one or two main words, but on all those that are present in the search field.

And this has evolved day by day and includes a number of other factors.

In authenticated services, that is, those where we identify ourselves through username and password, the entire history of what we do while we are logged in is stored.

It is known from there, how many clicks we give on each thing, which pages or resources we access the most, how long we stay on a page, what is our level of engagement (likes, likes, shares, comments, etc) for each type of content, the that we searched in the internal search, etc.

Even for cases where we are not logged in, we end up providing information through other means, such as our IP address, the permissions we grant when installing and using the numerous apps on our smartphones, such as geolocation, or the cookies we accept to be recorded and that often don’t even give us the option to deny it, going against the LGPD.

Added to this, the registrations you make to take advantage of the numerous “free” services that many offer and which can be an email account or a social network and which reminds you/encourages you to complete your profile at all times , so that they can offer you the best content.

With these and other tricks, the algorithms use the many logical checks and rely on the accumulated statistics of everything we do, to “recommend” content.

Whether providing a list of pizzerias close to where you are and whose owners have registered on Google’s “Company Profile”, when you enter the word pizza in the search, or when after researching lipstick, you are flooded with advertising for cosmetics, in each site you access later.

But there is also an algorithm learning more than what keeps you inside the platform, when you watch the last second of the YouTube video, or the Insta reels, in such a way that the next time you access, as if by chance, several similar videos or videos from the same producer will appear in your feed.

A lot of people think this is fantastic! After all, it saves us work and time, in addition to keeping us entertained with what we like.

Yes, in fact the algorithms are quite intelligent and the set of instructions contained in them, provide us with several benefits and although each social network, each service has its own algorithms and that can be different in several points, what they all have in common common, is the fact that they compete with each other to have as much time as possible of your attention and interaction and for that, they have already evolved to another level in which we talk about deep learning.

But that’s a topic for another meeting!

Conclusion

In addition to programming, algorithms are responsible for much of everything on the Internet. Understanding what they are helps in understanding the current Web itself.

.

Mostrar mais

Artigos relacionados

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

Botão Voltar ao topo