📜 ⬆️ ⬇️

A simple explanation of simplicity. Chapter 1: Theoretically Easy

Simple explanation of simplicity


image
KDPV with areas which we should visit to answer the MAIN question.

Foreword


I often heard the advice: make it easier.

What does simple mean? When we say that object X is simple, what are our expectations for X? When we say that something is simpler than the other - how do we evaluate it?
')
What is easier:
“A small sentence of five words” or the word “Deoxyribonucleic”?
“6 * 5” or “481”?

Or so:
You have a settings screen. Five of them refer to the chart, the other five to notifications. Do you need to create separate items "schedule" and "notification" in the main menu? Or leave all 10 points on one screen? What will be easier for the user?

You can say it is subjective. That this is determined by a certain “sense of simplicity”, that for one person something can be simple, and for another, difficult.

Okay, then tell me, why does the teacher spend time trying to explain something easier? Why edit the text, trying to make it easier? Why do programmers spend time reviewing code trying to figure out which solution is easier to understand and extend?

If simplicity somehow correlates with our assessment, then the best strategy is persuasion. Let's make readers believe that the text is simple. Or colleagues, believed that our solution is not difficult.

Will this qualitatively change their interaction with the result of our work?

Not.

Your text will not be easier to read because it is considered simple. It will not be easier to work with your code, even if everyone around you thinks that its complexity is the same as that of a stool.

If you were told at the interview that the company has clean code and good documentation and you believe it, then it will not affect the simplicity of working with the code.
Moreover, even if the entire department believes that the code is written well and the docks are there, this will not affect the result either. Their belief about their code may be wrong.

If the code was spaghetti, it would be spaghetti. If the “documentation” is comments of the format “here I have added 2 numbers” - the code has no documentation.
And no desires, confidence, etc. will not help here.

This does not work for about the same reason ( ru , en ) , for which you cannot give 5 of your friends 1 cupcake if you only have 2 boxes of 2 cakes in each. Even if you will meditate for a year with the whole company on the fact that 2 + 2 = 5, the sad situation with cupcakes will not change it.

Again. There is an object, and some of its characteristics may make you think ( ru ) that it is simple. And if tomorrow your assessment changes and stops at the “difficult” mark, the object will not care.

It can be concluded that simplicity or complexity does not depend on our expectations. Rather, the object determines what characteristic we give it.

I wanted to understand what object I expect to see in reality, if I am convinced ( ru ) that it is simple. Conversely, what characteristics of a real object make me think that it is simple.
What for? Well, maybe this will make my life easier?)

If you are reading for the first time
Statistics
Reading time: ~ 30 minutes.
Number of characters: ~ 25k.

How to read the article
General
I have no authority in your eyes. I intentionally do not indicate information about myself. I would like you to read this article as if it was written by a first-year student. In a sense, it is.

If you find an incomprehensible or controversial moment - write about it. So you will help improve this article.

And in no case do not believe me. I do not want my words to convince you that I was right. I want their meaning to convince you of its truth.

About legend
  1. Table of contents. Each chapter will begin with him. It briefly lists the issues that are discussed in the chapter, and provides links to navigate to the relevant subsections.
  2. Links to external resources. They are presented in the form of a * word or phrase * (links from the laguage code ) or regular links . I tried to make it so that you had a choice to read a Russian or English source. Unfortunately, I did not always manage to find both. This will be especially noticeable in the second chapter. Runet is poor on current information on neurobiology.
  3. Spoiler "Short." It is located immediately after the title of the subsection of the chapter. Its purpose is to simplify the work with the article in case you have already read it. You can use it in order to quickly read the article. But be careful! First, you can not understand what is written there, without reading the subsection itself. This is a concise thesis, not a path ( ru , en ) to it. In the second, which is even more dangerous, it may seem to you that you have understood everything. What is a false understanding and why it arises will be explained in the following chapters.
  4. Spoiler "IT'S MATHEMATICS TIME". Used to not scare you with mathematical calculations. He duplicates information that was presented to him in the form of text, but in a more formal way.



general information
About the series
A simple explanation is simple - this is a series of articles united by the general question: “What is“ just ”from the point of view of a person?”

At the moment, 3 chapters are planned:

  • Theoretically simple - this chapter is devoted to the formulation of the question and the basic definitions associated with it. You are here.
  • Machine Ex Homo is the chapter in which we look at our consciousness, starting from the upper behavioral level and ending with neural connections in our brain. The chapter is written and is being edited.
  • Just reading is devoted to people reading any models, be it diagrams, code, graphs, text. This will be the first practical chapter in our series, here we will apply our knowledge, and look at how information should be structured to facilitate its understanding. Chapter in the process of writing.

This is not a complete list of questions that I would like to find the answer. But I want to start with them.

Separately, there will be an article about why I generally deal with this issue. Let's say this about the author's motivation, and how he sees this series. This article will be written after the first three chapters.

Why did this article appear?
I have met such phrases many times: “Write the text easier” or “Make the decision easier”.
Sometimes I heard the word “simple” as an argument in a dispute: “I did it because it’s easier!”. Very often, opponents tried to prove that “They have more things easier,” and led to some strange arguments.

But when I asked people what they thought meant “just,” I heard:
"This is subjective." Or "This is a common sense." Or "Well, for each person in different ways."
I was confused by the fact that quite intelligent people have been arguing for a very long time about a thing that they cannot precisely determine and consider to be subjective. After all, if it is a taste, such as musical preferences, then why do they spend time on it? I repeat, these were clever people, and they didn’t spend their time on holivars about each other’s musical preferences.

I thought about it a lot, and a year later I had a simple thought: what if simplicity is a characteristic of an object that can still be measured? This would resolve all disputes and save a tremendous amount of time. And wrap ...

Why does your simple explanation take 3 chapters? It was impossible to shorter?
Because the reality is complex. And the complexity of this article directly depends on the complexity of that part of the reality that it describes.

This series is the result of thousands of hours of searching and combining information. As well as hundreds of thousands of hours spent by people whose work I used for it.

You will spend a couple of hours reading the entire series. A dozen, if you honestly go through all the links.

I have reduced the amount of time and effort you spend to answer our question a hundred times. And saved you the time it took to set it up correctly.

I'm not sure that this is the best explanation possible. My work is not finished yet. Perhaps in the process I will understand how to improve it. At the moment - this is the simplest explanation that I have.


Chapter 1. Theoretically easy


In this chapter, we will look at the following topics:


At the end of the chapter we will talk a little about Occam's Razor ( Blade Runner ). An article on simplicity would look weird without mentioning this principle.

1.1 The sequence of questions


Briefly
Questions that do not limit possible answers are useless.
The “simple” characteristic can have two meanings:

1) Elementary
2) Simple for some action

We are interested in the second.

Our next question: How to evaluate the complexity of the action and how to connect it with the object?

Our research begins with a question. To ask a question correctly is very important. Small retreat:

- Okay, Deep Thought, what is the MAIN CONDITION of SIMPLICITY?
- Need to think.
...
...
N million years later ...
- < 42.

// Based on a beautiful book

We have the answer, but it gives nothing. All information about him is in the question, and the question was not too specific. We cannot prove that < 42 - really the main condition and we can not show the opposite.

The question should limit the scope of possible answers.

“What is simple?” Is not a very specific question. Let's clarify it. At the beginning of the article we have already done part of this journey:

When we say that object X is simple, what do we expect from it?

According to my observations there are two main cases:

  1. X is an object that does not break into its component parts. Here the word "simple" can be replaced by the word "elementary."
    image
    This is a brick. And, in a sense, he is simple.
  2. X is easy to do with the action we want. For example - a sofa is simple if we want to lie on it, and difficult if we need to raise it to the ninth floor.

The case when the object is elementary is understandable. But what if we are interested in complexity in the context of action?

Let's think about it. We perform actions with the object.

There are three main entities in this sentence:


Then we are interested in the following questions:


We will answer them below.

1.2 Simplicity in action


Briefly
We act by analogy with algorithmic complexity.

The complexity of our action is the sum of the complexities of the actions invested in it.

The sequence of actions is called an algorithm.

An action has a result — a change in the state of the system in which the action was performed.

Actions and objects can be interconnected using the interface concept. An interface is an object that stores information about what actions are possible with an object that implements it.

Unlike algorithmic complexity, we cannot just find elementary operations, and we will have to take into account the performer of our actions.

Our next question - what is the impact of the artist on the action?

Let's look at the action.

Ease of action is something that depends on its complexity. The more complex the action, the less simple it is - this is obvious. We come to the following question:

How to determine the complexity of the action?


What can we do with the action? We can break it into a sequence of others! The action “read the article” can be divided into: “read the first paragraph”, “read the second”, etc. In turn, they should be decomposed as “read the first sentence”, “read the second” ...

image

Similarly, we get to actions, the difference in the complexity of which will not be important for us and will not depend on the object with which it is performed (for example, read a letter). We call such actions elementary.

Then the complexity of the action for a particular object can be measured in elementary actions into which it is divided.

Actions are equivalent when they are broken up into identical sequences of actions.

What else characterizes the action?

Algorithm


Description of the sequence of actions that represent another action, I will call it an algorithm ( ru , en ) .

The algorithm can be described generally, for example:
Reading: read sentences until the end of the text.
In this form, reading is applicable to many texts.

However, as you understand, the number of actions “read sentences” will depend on the number of sentences in the text.

Result


Actions are performed for a reason; they lead to something. So let our actions have results!

The result is a change in the state of the system in which the action took place. You have pressed the switch, and its transition to the “on” state and the lights in the kitchen are the result of this action. You have read the word, and the result is a change in the state of your brain.

Different actions can lead to the same result.

image

Connection with objects


Let's go back to the objects. As we have said, you can perform different actions with them. We need a way to understand for which actions this or that entity is “intended”.

I will start with an example.

- And how do I carry this suitcase?
- He has a pen on the side!

The handle is a strip of leather on the outside of the suitcase, which was nailed with rivets. But in this case we do not care. We are worried that there is an object on the suitcase that can be held.

All such objects we will call handles. They can be at the cup, door, suitcase or bucket.

image

We have come to the conclusion that we have two descriptions of the handle from the example:

  1. Like strips of leather, riveted on a suitcase.
  2. As a concept of the subject for which you can take.

The first is the implementation description ( en ) .

The second is the interface description.

An interface is an object that stores information about how you can interact with an object that implements it.

What are they needed for? It's simple: most often we are not interested in how the object is implemented.
When we want to turn on the light - we are looking for the switch, and for us it doesn’t matter how it works, we only care that we can switch its on / off state.
When we see a button, we already know that it can be pressed.
When we are told that there is a pen somewhere, we already know that we can take it.
And it is very convenient.

Results


An action is a sequence of other actions that define its algorithm. The result of the action is some kind of system change.

The complexity of the action is equal to the number of elementary actions of its algorithm for a particular object.

The relationship between objects and actions defines the object's interface. It stores information about what actions you can take with the object.

Our next question is:
What is the relationship between an action and its performer?

1.3 Objective subjectivism


Briefly
In order to correctly assess the complexity of an object in a situation with different performers of actions, we can define our actions for each specific artist or group of performers.

Our next question is how to calculate the complexity now?

You may reasonably notice:

“But if you perform the same actions, the results may be different! If a professor of physics can fluently read an article on string theory and understand everything, then I will not achieve anything with the same approach. And to get a similar result, I’ll have to search for definitions through the word, read other articles and spend a lot more action.

This is a good point. I have an answer for it.

Like any task, ours have initial conditions. If you change them - you change the task itself. And this leads to the fact that its implementation requires different actions.

You are reading an article. Suppose that after reading a couple of pages, you put it off. Now, in order for the article to be read, you need to spend less action. But did this change the complexity of the article itself? Not. Changed the action that you will do with it. It was: “to read the article”, it became: “to scroll through the article to the moment where I finished, and to finish reading to the end”.

What should we do with actions then? We will fix the desired result. As we remember, you can come to him in different ways.

Further, we can break the performers into approximately identical groups. There are a limited number of such groups if we do not have an infinite number of performers.

Now for each group, we describe the actions that will lead it to the desired result.

We received a set of actions for each of the groups of performers. But now what to do with the complexity?

1.4 Probably easy


Briefly
In a situation with several performers, we can calculate the mathematical expectation of the complexity of the object. For this, it is necessary to estimate the probabilities of performing actions by different performers.

Bayes theorem ( ru , en ) .

The next question: how to describe the objects with which we work?

We have a set of actions. Each of them belongs to a specific group of performers. We know how to calculate the complexity of each of these actions for each specific object.

But what if we try to set the probability of the performer hitting one of the groups?
The task turns into a classical task on a theorever.

We have the magnitude of the complexity of the action. We have probabilities of performing each of the actions by a random person.

We can find the “mean” of our complexity. This is the so-called mathematical expectation ( ru ) . For this, we need to multiply each complexity of the action with the object by the probability of its occurrence.

Where to get these probabilities and how to break the performers into groups, if you don’t know yet who exactly will perform the actions with the object? Good question!

His consideration is beyond the scope of this article, but I will give one interesting example in my opinion.

You are the author. And your task is to write an article on the site which has thematic sections. When you post an article, it will be displayed in the general tape and the tape of the “own” section. The sections have subscribers, they make up a certain percentage of the site’s audience. General tape is shown to all. We will assume that the section subscribed understands its topic, and those not signed do not.
Let our paper be on physics. We analyzed the audience and know that the “physics” section was signed by 3% of the site’s audience. We learned that the probability that the subscriber of this section will go into an article from it is 80%. We also learned that the probability of visiting an article from a general tape is 5%.

Who is our potential reader and should we “optimize” an article for a person who is not subscribed to the “physics” section? In other words, what is the likelihood that our article is read by a person versed in physics?

So, attention, this probability is equal to ... About 33%.

Slightly more than two thirds of our potential readers do not understand physics, and we should take this into account.

How did it happen? In short: a high probability of visiting an article by a person versed in physics is compensated for by their small amount. A small chance of visiting the article from the general tape begins to play a significant role in our assessment. Want to know more about this? Here is a link to a good article about the Bayes theorem ( ru , en ) .
If you want to check:

IT'S MATHEMATICS TIME:
3% , 80% . — 0.03*0.8 = 0.024 = 2.4%.

, - = . «» , . , = 0.05*0.03*0.2 = 0.0003, 0.03%.

5% , 4.97%

. (2.4% + 0.03%) .
(2.4+0.03)/(2.4+4.97+0.03) = 0.328.
: ~33%

We talked about the actions and those who perform them. Time to go to the last question.
We often used the word object, but it does not give us any information about it. We need some kind of description, abstract enough so that we can apply it to many entities, and informative enough so that we can work with it.

How to describe the objects with which we work?

1.5 Systematization modeling


Briefly
.

— , .

— , ( ).

I decided to try to summarize texts, tables, charts ... etc. But how to do that?

Let's go back a step and see how their “creation” happens, maybe it will help us.

We write the text. We have a certain idea, we formulate it in words and write it down. In this case, the idea can be not only in the form of other words. We can describe a picture, music, mathematical objects.

I am writing code. I have requirements that I “translate” into code. They can be expressed verbally or represent an image, such as a sketch of the interface.
We make the scheme. We have some objects, the relationship between which we describe this scheme.

There is something in common in these processes. We have some kind of system. We translate it into another system, without necessarily using the same “terms”.

It seems to me that the word “Modeling” is suitable for describing this process.

So, a model is a system that describes another system using specified notation (terms).

This definition pushes a reasonable question:

What is a system?


A system is a collection of some components. It is given by the set of their possible states and their current state. Components of the system I will often call objects.
They can be elements (something defined in advance) and other systems consisting of these elements. There are still such things as connections — they appear when we want to limit or determine the possible states of one object depending on others.

Example:
There is a system of 2 coins. One of them is “eagle”, the other is “tails”.
"Eagle" and "tails" are the elements of our system.

A coin is a subsystem that consists of the elements "tail" and "tails" and can be in one of these states. For the first coin:

image

Suppose that we cannot transfer coins and thus make changes to the system. In this case, our system can be described as:

image

If we can throw coins, then our system is described as:

image

There are dependencies between some systems. Suppose the state of the second coin cannot be equal to the state of the first one.

Then the set of possible states of coin 2, taking into account our limitation, is all previous possible states, besides that in which coin 1 is located.

image

In this case, we can say that the state of coin 2 determines the state of coin 1.

Now let's see what happens if we change the set of possible states of coins by adding an “edge” there.

We can make all the pairs for the states of coins 1 and 2.

image

In this case we are talking about restricting the possible states of the coin 2.

UPDATE:


I created a java coin implementation example. Here is the repository . In addition, it shows how to count the difficulty if you take the coin toss for an elementary action.

IT'S MATHEMATICS TIME:
S — .
E(S) — .
V — .
e — .
: S=e=E(S)={E(S1),E(S2),E(Sn)},SkS
If a Sk — , , .. .
: S=(V,e),V={E1(S)En(S)},eV .
.

, , , .

:
{SjSk} Si .
X=V(Sj)...V(Sk)x=(En(Sj),,Em(Sk)) .
Y=V(Si),y=Et(Si) .
a=(x,y)XY .
x yx .
x y , .

PS
, , (0 1, ), , — . , . .

( ru ) ( ru ) . «» , .

Back to the models


Model we call another system, which is the first display. In general, it can be built from other elements. The system model is a map, the system itself is a territory ( en ) . No one bothers to build models of other models. You can draw a map card ( en ) .

Let's try building models.

Let's start with the classics: black box.
You have: “input”, “exit” and box. You designate the components you would like to change to get the result as “input”, the components representing the result as “output”, and the rest as a black box. Such a model does not describe the internal dependencies of the system, but hides them. We do not know how the result is.

image

This approach is often used in cases where we want to study the work of a system, but at the same time we cannot “open” it. For example in psychology. We give people testiki, they solve them. We do not know what happens at the moment in people's heads. But, having collected enough data, it is possible to describe the device of a box which will give similar results. In the Machine Ex Homo section, we look at this in more detail.

Now we will build a model that displays the entire set of components and their possible states.

You live in ancient Greece. Your neighbor Zeno ( ru ) already got you. This Aidov son breaks into your house every evening with another brain-wielding riddle ( ru ) , and after that you spend a sleepless night in meditations. You need to sleep and for this you need to shut him up for at least a couple of days.

He last ran with the story of Achilles running after a tortoise ( ru ) . During this night, your eyes fell on one of the buckets. An interesting thought came to mind: to consider its aporia in a more detailed way, using buckets and stones.

You want to make sure that you have the opportunity to find out the position of Achilles and the tortoise in relation to the starting point, for each step of the tortoise. We have: a tortoise that walks, Achilles, which is 10 times faster than a turtle. And their initial positions: 1000 steps and 0 steps.

Our model does not yet know how to represent numbers. And it is absolutely impossible to discern where Achilles, where the turtle, where the path.

With the representation of natural numbers is simple : take a bucket, set the number of stones equal to this number.

Now we can describe the speed and the path. In the bucket that indicates the speed of Achilles will be 10 stones. In the bucket for the speed of the turtle - one stone. We now turn to the "buckets of the way . " In the turtle we will put a thousand stones, leave Akhillesovo empty. When the turtle takes a step, we will shift the stones from speed to go. Is it done?

Not yet. We have no paint to sign the buckets. Only stones. How to handle this?

Alternatively, we can put a turtle bucket "speed" to the right of its "bucket path." Do the same with the buckets of Achilles. And push back the buckets of the turtle. Now we know that in the “two buckets” combination - the right bucket is speedy, and the left one is the track bucket.

You are looking at two groups of two buckets. In order to find out which of the Achilles groups is you have to go, look in the bucket, count the stones in it, remember that Achilles’s speed is 10 steps, and conclude that Achilles has a bucket. And if we want to make some changes and make the speed of Achilles equal to the speed of the turtle? Then our way of checking for Achilles will stop working altogether!

Therefore, in front of buckets of speed and path, we put a "bucket of the name." Now it has become the most right. And let our rule look like this: if the bucket of a name is empty, then the buckets following it are turtles. And if there is a stone, then this group of buckets denotes Achilles.

image
I did not draw stones in S, but I think it is clear that for the first step the Achilles bucket is empty, and the turtle contains 1000 stones.

You are rejoicing. Now, Zeno will have to seriously think about why he decided that he could continue the stone-cutting process forever. At least you hope so.
Unfortunately, it did not help you improve sleep. Zeno didn’t really come the next evening, but now you yourself are deep in thought. Will the moment come when stones cannot be divided ( ru ) ?

Look, for each step we received some kind of state of each of the objects we considered. The position of Achilles corresponds to one bucket, turtles - another. For speeds the situation is similar. Our model fully describes all possible states of all objects of the simulated system.

Text is also a model of the system. The terms in this case are words. They are determined by their meaning, or set of meanings, which is limited depending on the context.
Our sensations are also a model that our brain creates on the basis of information coming from outside.

In short, the models you constantly face.

Do you still remember why we all did it? Just in case: we gave a definition for the model, then to calculate its complexity. The time has come, let's see how this can be applied.

You are a UX designer. Your task: to make the application settings page. You know that they will not change in the future. There are ten of them: five graphic and five notification settings.

You can leave them all on one screen. You also have an idea of ​​what can be done on the first screen with the “graphics” and “notifications” items, and a transition to the corresponding screen with five settings.

image

Let's assume that our user has a very bad memory and a habit of reading from top to bottom. But at the same time, he is still smart enough not to make a mistake with the section, in the case when we have grouped the options. He does not read the names of the screens and goes directly to the menu items.

We have only 10 settings, they can be displayed on the screen with a list, and the user simply sticks to the desired item. We believe that the user does not need to scroll the sheet in this case. On the other hand, if the user needed the settings from the end, it would be easier for him to find them, because he would not have to read the entire list, he would be able to skip half of the items he did not need.

Which model will give us a simpler interaction?

Actions that a user can take with a list item: read and poke into it. If you translate into the language of interfaces: the menu item has the properties of readability and poking ability. All the points are short, so the difference in the difficulty of their reading is neglected. We assume that the actions "to push" and "read" are elementary in our context. Their complexity is 1.

We expect the user to be equally likely to need any of the items. There is no sense in bringing up some of them.

Of course, you already have some guess about the answer. I suggest you write it down, as well as write down your confidence that your answer is correct. For example, on a scale from 1 to 10, where 10 is absolutely certain, 1 is not at all sure. You will need this data in order to compare them with the result. Under the spoiler "Solution" will be a poll. Unfortunately, Habr does not allow you to do polls anywhere in the text, so the link leads to Google form. There you can go through it and see the statistics on the overall results.

I advise you to take a pen, a piece of paper, open a calculator and calculate the complexity yourself. And only after that open the spoiler.

Decision:
If the user needed the second item, the algorithm of his actions looks like this:
Read the first paragraph -> read the second -> poke a finger, and the difficulty, respectively: 2 + 1 = 3.
To find the average difficulty we need to find the difficulty of navigating to each of the items, add them together and divide by 10.
For items on one screen: ((1 + 1) + (2 + 1) + (3 + 1) + (4 + 1) + (5 + 1) + (6 + 1) + (7 + 1) + ( 8 + 1) + (9 + 1) + (10 + 1)) / 10 = 6.5
We now turn to the complexity of the option with splitting into submenus. In order to find the desired option, we first need to select the desired partition and poke at it. For the first item, the actions look like this:
Read the name of the first section -> poke -> read the name of the first item -> poke.
Difficulty 4.
Let's honestly count:
((2 + 1 + 1) + (2 + 2 + 1) + (2 + 3 + 1) + (2 + 4 + 1) + (2 + 5 + 1) + (3 + 1 + 1) + ( 3 + 2 + 1) + (3 + 3 + 1) + (3 + 4 + 1) + (3 + 5 + 1)) / 10 = (4 + 5 + 6 + 7 + 8 + 5 + 6 + 7 + 8 + 9) / 10 = 6.5

They are the same?!

...
...
...

Honestly, when I came up with this example, I was expecting another answer. It seemed to me that the way with the groupings in this problem is better.

As I promised, you can participate in the survey and see the statistics on the answers. And please do not use the fact that you can send multiple answers. I do not want to force you to log in to your Google account, so that it is more convenient for you to respond and watch the result, and in exchange, please do not interfere with collecting statistics.

So, what if we keep the example the same, but consider a different number of points? 4 and 4, 3 and 3, 6 and 6?

I again suggest that you do everything yourself. Hint: read about the amount of the arithmetic progression and make an equation, depending on the total number of points.

Below is only the answer, so if you want to know how it turned out, you will have to work a little.

Answer:
If you have 5 points in each section - the difficulties will be equal.
With 6 and more will win the option with a split.
With 4 and less will win the option with one list.


I inserted this example into the article at the stage of final edits. It was important for me to summarize what we were talking about. Link the information from previous chapters in an understandable form. So that you can easily imagine it and try to use what we talked about.

I was wrong. When I wrote this example, I thought I knew what the answer would be. And now I am pretty surprised. No that's not true. When I honestly did all the calculations, the result hit me very hard. About the following happened in my head:

- * Chorus * WE'RE MISTAKED ?!

And wrap ...
- * Voice 1 * What? How so! Me, your mother, a mobile application developer! And judging by the reviews of my colleagues, I am a good developer! My competence in this matter does not cause me any special doubts!

- * Voice 2 * Well, yes. So what?

- * Voice 1 * Yes, I see these applications day and night. I read a bunch of guidelines. I have already made hundreds of these lists. I have enough qualifications in my field to correct the mistakes of our designers!

- * Voice 2 * Yeah, and then what?

- * Voice 1 * I wrote this fucking article! Most of my work is to make it easier for other people to interact with my decisions! I have been doing this for years! Not only during working hours, but almost everything is free. My experience has long passed for a banal 10k hours!

- * Voice 2 * Boy, I'm actually you too. You did not say anything new, go to the bottom line.

- * Voice 1 * I conclude that my example is synthetic. It does not reflect reality, everything will be different in it, and therefore the answer that I suggested first will be correct. My experience allowed me to consider much more than was in this example.

* Sirens and red lights on *

- * Voice from loudspeakers * That part of your consciousness that we have set up to detect erroneous patterns in thinking speaks. Errors noted: the effect of overconfidence , confirmation bias , selective perception . A pattern of appeal to authority was recognized, but this information is still being verified. Due to the danger of self-deception, you are ordered to breathe deeply and drink tea.

- * Voice 1 * There is no self-deception! You know that everything that I said we consider true!

- * Voice 2 * And you know that there is a big difference between reality and your opinion about what it should be.

- * Voice 1 * Well, bliiiiiiin, again these lectures.

- * Voice 2 * Imagine that you believe that people can fly. Will it save you when jumping from the roof?

- * Voice 1 * I can not. I see that other people do not fly, so I will not make such an idiotic conclusion about myself. And in general, you are exaggerating.

- * Voice 2 * You are crazy. Or you have drugged. Or they put on you a perfect virtual reality suit, you spent 5 years in it and all the people flew there, you could fly, your brain adapted and “knows” how to do it. Our thoughts, sensations, expectations and, in general, all of us are a state of our brain. At least this is our working hypothesis. And we know that there are situations that are much stranger than confidence in the possibility of flying. Remember the book "The man who took his wife by the hat."

- * Voice 1 * Well, brains can really fail, but in your example, I will really fall, even if I think in flight that I'm flying. If I have enough time, I will notice that I am not treating there, but it will be too late.

- * Voice 2 * Okay, and now we will return to the debriefing. Heh, cool pun. You came up with this example. You knew about his rules. You knew that you greatly simplified it, in comparison with reality. You knew how to solve it. And you made a mistake in your original assumption.

- * Voice 1 * It's not me! I made the choice intuitively, you know how it works!

- * Voice 2 * And you know that it often works incorrectly. And here's another proof.

- * Voice 1 * And what about my last argument? After all, this is really an approximation, and in reality everything will be different.

- * Voice 2 * This argument is true. In reality, everything will be different. Only it does not mean that you were right.

Imagine: you begin to bring an example to reality. You honestly consider the relationship of the complexities of “poke” and “read” actions, you do research on how people look at the screen, which part of the name on this list is enough for them to understand that this is not the point.
You supplement this example with a huge amount of conditions; it becomes hundreds of times more complicated.
Sorry, but in this case the probability that you received the correct answer “because the intuition” is much lower than the ~ 50% that random choice has.
Are you so sure that reality will be on your side? Why? Prove it.

- * Voice 1 * Yes, I'm not sure! Simply…

- * Voice 2 * Difficult. It's hard to admit that you were wrong, I know. But you understand why we need it. The fact that this situation occurred only says that we are a brake and learn more slowly than we would like. But we know what to do.

- * Voice 1 * Simple truth reread, or what?

- * Voice 2 * Very good option. It always calms us in such situations. You can also breathe deeply. And yes, we dealt with this situation in less than 1.5 minutes. Have you seen how quickly the error detection system worked? I think we deserve a pie. He is not on the shelf, there is a fucking Potential Bucket , but we will buy it for ourselves.

- * Voice 1 * And yet it’s interesting what will happen in reality ...

- * Voice 2 * Have you forgotten why we are writing an article ?!

...
...
...

I apologize for such a large digression and an example. Perhaps you are not ready to read further, and you want to think everything over again. And this is a good choice.

At the beginning there is a table of contents, you can bookmark the article and quickly return to this place.

Have you decided to continue? Then, we have the last topic of those that I wanted to raise.

1.6 Blade Runner


Briefly
Occam's razor and probability hypothesis.

Occam's razor on the simplicity side of the system.
Denote the complexity of the change for Cand the complexity of the system is up to how C and after how C .
k=(CC)/Cand .
If a k greater than 1 is a good change.
If a k less than 1 is a valid, but not payback change.
If a k less than 0 is a very bad change.

If we assume that the complexity grows with the number of objects in the model, and that we already have a certain set of models, we get that the best option is a model with a minimum number of objects, which is very similar to the formulation of Occam's Razor.

Most likely you know Occam's razor, but just in case I remind you:
“It is not necessary to attract new entities unless absolutely necessary.”

In general, this principle is interpreted as: of all the hypotheses, the one that is described by the shortest subprogram (or, more simply, the one that is shorter) is the most likely ( ru , en1 , en2 ) .

How it looks in real life:
If you turn on the light and the light bulb comes on, then the hypotheses may be:

  1. The switch closed the electrical circuit and the current went through the light bulb.
  2. The switch kicked a little gnome who connected the wires, causing the circuit to close and the current to go through the light bulb.
  3. The switch kicked the little gnome who pushed the trolley in which sat a small dragon, who, frightened by the fiendish flame, which melted the solder, which connected the wires, caused the circuit to close and the current went through the light bulb.

Of these hypotheses, one that contains fewer entities, without a gnome, is preferable. If you turn on the light bulb when you hear a silent curse from the switch, the second hypothesis is preferable, because the former does not explain why the switch curses and the latter contains redundant entities.

I will be honest. When I first heard of Occam's Razor, I did not think about hypotheses. And her vague wording in verbal form led me to the idea that this is a general principle - reduce the number of entities that are in your system and everything will be cool.

I was very wrong .

But when I had a description of the simplicity of the system, I understood how to correct my misinterpretation of this principle. And make something useful out of it.

We have a system before and after some change.

If the difference between the difficulties before and after is greater than the complexity of the change process itself - this change is justified. It is understood that the change did not affect the result (at least on the part of it that we need). Call it ... a prerequisite for simplification.

Again:

The expected simplification of the system after the change should be greater than the complexity of the change itself.

If we denote the complexity of the change forC and , the complexity of the system is up to howC and after howC then we get:

C - C > C and .
We can also express a certain analogue of efficiency for our change.
k = ( C - C ) / C and .
If a k greater than one is a good, kosher change corresponding to the necessary simplification condition.
If a k is less than 1, but more than 0 - this means that you simplify the system, but spend more time on it than get a profit.
If a k is less than 0, then it tells you that such a change is not worth doing. You complicate.

Why is it needed?Well, for example, you act in conditions where you have limited time and you would like to prioritize the changes you want to make. Changes with greatk should be considered first.

Example:

We have two texts, one with an example of the other without.

On the one hand, we have increased the volume of the text, thereby complicating it. But on the other hand, thanks to this, some readers will not go into Google “an example of an Occam's razor,” which is more complicated than just reading. If, by our estimation, there will be many such readers, then the introduction of an example will simplify our article.

We should not forget about the fact that we also did some actions to describe it, and they had their own difficulty. If we spent too much action, and the simplification was not enough - the introduction of our essence “does not pay off”.

Hmm, how is this all connected with Occam's razor?

Let's assume that we already have several systems. And their complexity directly depends on the number of entities (in the real world this is not always true, as we have already found out). The results of actions with these systems suit us.

Since the systems already exist,C and0 (you do not need to do anything in order to make changes to the system). Let's take a system with a minimum number of entities, and calculatek relative to other systems. We will get thatk will be equal to minus infinity. From the point of view of simplicity, in such conditions, choose a system that is different from the one that contains the smallest number of objects - an infinitely foolish solution. This tells us that from all systems we should choose the one that contains the smallest number of objects. HmSuspiciously similar to Occam's Razor.

What else can be described using this condition?
For example, you can evaluate when it is worthwhile to apply various practices of improving code, and when it is meaningless.

In fact, if you write a task in a higher education institution, the code of which will be read once (or not read at all, but simply see how it works), then you should not worry about it so that it is well read.

But if you write for the OpenSource project, and hundreds of people will work with your code, or you write your project that you plan to develop, you should take care of its quality.

If you are writing a synopsis, you should evaluate whether you will need it in the future. If the teacher will check only its availability, and all the information is easier to find in Google, then why complicate it?

If you are writing an article - determine how you see the interaction with it. For example, this article is intended not only for a single reading. I tried to optimize it for a quick search. That is why under each part there is a “Short” spoiler and a table of contents at the beginning.

Eh, if we had a way to somehow describe how a person would read our model, and find the complexity of this model for reading. We could tell exactly how our actions will affect the complexity of this process and apply our theory in a huge number of practical problems.

Unfortunately, for this you need to create a general algorithm for people to read any model. If it seemed to you that this is a very difficult task - you are right.

Fortunately, I have already done some of this work.

In the next chapter, which will be called Machine Ex Homo, we will analyze how our brain works with information. We will talk about understanding and how information that we already know affects the perception of a new one. Let's look at the research of psychologists and neurobiologists in the field of studying human memory and create their own model of memory based on them. With its help, we will explain some interesting psychological effects, such as the effect of word frequency, edge effect, optical illusions. And there will be a lot more pictures.

In short - it will be interesting, I promise.

PS
.

, — . , , .

.

: , . , , - .

, , . .

, , . .
, , . , , .
, , simple.explanation.of.simple@gmail.com . , , . , , -, .

License:
CC BY-NC-SA 4.0

Source: https://habr.com/ru/post/432460/


All Articles