Questions on OOP in MQL5 - page 53

 
Dmitry Fedoseev:

The analogy of these patterns with the encyclopaedia is totally inappropriate and not realistic. For these patterns, the well-known analogy of an empty barn and an inscription is more appropriate.

I was not comparing "patterns" with the Encyclopaedia. But the possibility of applying the right knowledge in the right way.

Remember Henry Ford.

During the First World War a Chicago newspaper called him an "ignorant pacifist". Since Henry Ford took offense and sued, the newspaper had to prove that he was, firstly, ignorant and, secondly, a pacifist (i.e. an opponent of war).

The newspaper's lawyers thought it would be fairly easy to prove Ford's ignorance, since he had only completed sixth grade and, in their opinion, was not interested in anything but his cars. They prepared themselves very carefully and started asking questions in court along the lines of, "Who is Benedict Arnold?" or "How many soldiers were sent by Britain to America to suppress the 1776 rebellion?" At first Ford was in a good-natured mood and even tried to quip, answering the second question, that he did not know exactly how many Englishmen had been sent to America to suppress the rebellion, but knew for sure that far fewer had returned.

When he was "wound up" with more insults, he broke down and, pointing his finger at his lawyer, said very sharply something like the following: "If I really have to give answers to your questions, all I have to do is push a button and I'll have a bunch of experts around me who can answer these and all your other stupid questions. Now, you tell me why I have to keep a bunch of unnecessary information in my memory when I have a bunch of assistants providing me with whatever knowledge I need whenever I need it.

There was no convincing answer to this question, and the court could not accept that Ford was an uneducated man. It is also quite clear to you and me that Ford, with his sixth-grade education, was able to form not only himself, but an enormous automotive empire, and in addition he formed a hundred great men and the finest professionals working in his firm. Moreover, Ford is considered a classic of management (one of the founders of the science of management).

 
Artyom Trishkin:

I wasn't comparing 'patterns' to the BSE. It is the ability to apply the right knowledge in the right way.

Remember Henry Ford.

If it is knowledge and not a shed with a sign on it.

 
Dmitry Fedoseev:

If it's knowledge and not a shed with a sign on it.

I always try to find something useful for myself in all discussions and literature. And even in a shed with a sign on it, you can see what you can't see behind the sign.

 
Igor Makanu:

...

although you may have used 20 or 30 patterns with, well... what are the names of samurai swords? - One for fish and one for hara-kiri, and you use the same sword to clean fish and slice up sausage for dinner? - not by sensei!

)))

I didn't come up with those patterns. And the analogy with samurai swords is inappropriate too, it's insulting to samurai swords.

 
Artyom Trishkin:

I always try to find useful things for myself in all kinds of discussions and literature. And even in a shed with a sign on it, you can see what you can't see behind the sign.

Well, nobody learns maths from a book on crochet. Or do they?

 

When authors are not familiar with design patterns:

 
Dmitry Fedoseev:

Well, nobody learns maths from a book on crochet. Or do they?

:)

Of course not. But even a book about crochet can be useful. But you have to understand that theorems in that book won't be solved.

My message is simple - look for the positive in any situation, and in any discussion highlight what you need. For myself.

 
I read about the "strategy" pattern, it's using the primary property of OOP - polymorphism. And not even so, but simply - polymorphism in a pure form. But no - we have to call it otherwise.
 
Dmitry Fedoseev:

I found about 20 or 30 pieces and laughed when I finished. Then I searched the internet and found another 20 or so, but I didn't study them, just laughed it off.

Yeah, come on, tell me, reading the titles doesn't mean studying them, you're like an STL guy who says "stl is a vector".

 
TheXpert:

yeah, go ahead, tell me, titles read does not mean studied, you have with patterns like with STL which is "stl is a vector"

https://www.mql5.com/ru/forum/85652/page52#comment_16423899 Why the surprise? So you don't know about them yourself, but you believe in them sacredly? It's truly a sect of believers in the "Holy Design Pattern".

and not STL is a vector, and the main thing in STL is a vector. Please, if you decide to quote me, quote me accurately.