You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Well, that's a bit too much. The man is all about OOP from the beginning. At least just by making a cup of coffee. Why are there any pattern breaks? IMHO, nonsense of inept teachers shifting their problems to students.
OOP should be explained without any code and all that abstruse nomenclature like classes, objects, pointers, etc. etc.
How does classical programming education work? At first, a student is agonizingly trying to move from human thinking to programming basics (loops, functions, variables and other stuff like that needed "knowledge baggage"). Then, when mess of functions, variables and if's forms some more or less orderly structure, the student is told: "Look: there is such a thing as OOP. Forget what you were taught before, and start thinking like a human again". What follows is a rupture of templates, the "baggage of knowledge" just obtained with such difficulty is thrown on the trash heap, and the person finds himself somewhere between heaven and earth. Naturally, this "PLO" is then remembered for several years as a bad dream with shuddering and pain in the remaining parts of the brain (the others have been scorched by the new knowledge).
No, I categorically state that one should not learn programming. On the contrary, it is harmful and dangerous. Instead it is necessary to teach thinking. And with that there is a complete failure of the classical method of learning.
Write an article.
Write an article
Maybe. But Alexei might be even better able to explain the PLO.
Don't.
no )
Read carefully. That's what I'm saying: a person initially sets and solves his tasks in a style approximating to OOP. But then he is taught procedural programming. After that a pattern break occurs because it is procedural programming (not OOP) which differs greatly from human thinking.
I don't see anything wrong with learning procedural programming beforehand. In order to learn how to write novels, it's a good idea to start by learning the regular alphabet and syntax and just learn how to read and write.
Actually, even by programming in just C/Pascal etc, we are already manipulating objects without knowing about their internal structure and functioning. It remains to explain that it is an object, and then to teach how to build these objects.
....
Question:
Suggest a topic on OOP in MQL5 for 10 minutes, I will put it on youtube, i.e. it will be useful for everyone
------------------
Write everything that is interesting, I will sort it out, I will try to satisfy your requests within my free time
Good luck ))
Help me solve a problem. There are two buttons and a line. One button, when pressed, puts the line in edit mode, and when released, deletes the line. The second button, when clicked, fixes the line, and when clicked, puts it back in edit mode. Each button can change the colour and some other properties of the Line object. The "Line" object is defined globally. Is it possible to pass a reference to the "Line" object to each button immediately after creating buttons so that when you manipulate the reference variable inside the "Button" objects, all changes are remembered in the global "Line" object.
I've sketched out a simplified script below, instead of pressing a button, it's an addition() function that increments the counter of the "Line" object. I understand that you can pass the "Line" object as a function argument by reference, but just in the working version, there are several such functions, so I'd like to pass the reference at the very beginning once. I.e. is it possible to make Btn1.addition() or Btn2.addition() increase the gLine.count ?
This is what I have going on right now: