I present to you a famous parable from Dijkstra - from one of the most famous people in the world of the computer industry.
One of the forms of Dijkstra’s scientific activity was letters (yes, ordinary paper letters, because it was very, very long time ago), which he sent to his correspondents from time to time, calling to distribute them further. When the views of E. Dijkstra became known to a wide range of programmers, they caused a strong (and not always positive) reaction.
Here is one of his parables, which I, as a programmer, really like: In immemorial times the railway company was organized.One of its managers (probably, the commercial director) discovered that a lot of money can be saved if not every railway car is provided with a toilet, but only half of it.So it was decided to do. ')
However, soon after the start of passenger traffic began to trouble with the toilets.The reason for them was extremely simple: although the company had just been created, there was already enough confusion, and they did not know anything about the disposal of the commercial director at the marshalling yards, where all the cars were considered the same.As a result, there were almost no toilets on some trains.
To remedy the situation, each car was provided with an inscription saying if there was a toilet in it, and the couplers were ordered to make up the trains so that about half of the cars had toilets.Although this complicated the work of the couplers, they soon proudly announced that they were carefully following the new instructions.
Still, the toilet troubles continued.A new investigation into their causes showed that although indeed there are toilets on the train in the train, it sometimes happens that they all end up in one half of the train.To save the cause, instructions were issued prescribing alternate wagons with and without toilets.This added work to the couplers, however, grumbling, they coped with it.
But the problem did not end there.Since the toilets are located at one end of the car, the distance between the two adjacent toilets on the train could reach three car lengths and for passengers with children — especially if the corridors were packed with luggage — this was too far.Then the cars with toilets were equipped with an arrow, and new instructions were issued, ordering all arrows to be directed in one direction.It cannot be said that these instructions were enthusiastically met at the marshalling stations - the number of turntables was insufficient, but, straining, the couplers learned to do this.
Now that all the toilets were at equal distances, the company was confident of success, but the passengers continued to worry: although there was not more than one wagon to the nearest toilet, it was not clear which way it was located.In order to solve this problem, arrows with the words “TOILET” were drawn inside the cars, making it necessary to correctly orient the cars without toilets.
At the marshalling yards, the new manual caused a shock: it was impossible to make what was required on time.At a critical moment, someone whose name is now impossible to establish, noticed the following.If we hook up the car with the toilet and without it so that the toilet is in the middle, and we never unhook them, the sorting station will deal instead of N oriented objects with N / 2 objects that can be considered in all respects and from all points of view symmetrical.This observation solved the problem at the cost of two concessions.First, the trains could now consist only of an even number of cars - the missing cars could be paid for by saving on reducing the number of toilets, and, second, the toilets were located at slightly unequal distances.But who cares about the extra meter?
Although in the times to which our history relates, mankind did not know the computer, the unknown, who found this solution, was the first competent programmer in the world.
I told this story to different people.Programmers, as a rule, liked it, and their superiors usually became angry more and more as it developed.Real mathematicians, however, could not understand what the salt was.