Should I avoid using dynamic objects? - page 2

 
Nelson Wanyama:

I figured it out myself. I don't see the point of going over to C++ when the minor details I'm after are exploited differently in cpp. 

Thanks though. 

I should write an article about pointers and dynamic objects for prospective learners. I'd hate to see someone get shun while trying to learn, like it happened to me.

It's not shunning, it's quality advice. Like you, I learned programming by learning MQL. A lot of people around here also learned programming from making simple EAs.  A vast majority of the people still tinkering with MQL stay away from MQL5 because they believe that the lower level access it provides is too much work. These same people also don't understand that MQL5 was intended to be used via OOP libraries, which go under-utilized because [again] they don't understand how OOP works. Also, a vast majority of the code that is open source is spaghetti that abuses the hell out of global variables and uses really terrible patterns and style. 

How many times have you seen questions about how to make some spaghetti code out of a multidimensional array work when an object was the appropriate data structure? I used to be that person. Instead of learning programming from the start, I hacked together my education by coming back to the forums and learning bad design patterns. When I go back and look at some of my first programs, I'm embarrassed how bad they were because I was too lazy to sit down and really learn programming concepts.

Building cool stuff is the best way to learn programming, but when you skip over the fundamentals you will hit a wall. When that happens you'll go back and really dig into the fundamentals, and at the point in your education a light-bulb will go off and you'll wonder to yourself why you skipped over the important bits and how much time you could've saved if you had learned the concepts fully from the start.

You remind me a lot of myself when I got started, and I wish someone had given me the advise that I am giving to you. 


I wish you luck in your journey.  

 
nicholi shen:

It's not shunning, it's quality advice. Like you, I learned programming by learning MQL. A lot of people around here also learned programming from making simple EAs.  A vast majority of the people still tinkering with MQL stay away from MQL5 because they believe that the lower level access it provides is too much work. These same people also don't understand that MQL5 was intended to be used via OOP libraries, which go under-utilized because [again] they don't understand how OOP works. Also, a vast majority of the code that is open source is spaghetti that abuses the hell out of global variables and uses really terrible patterns and style. 

How many times have you seen questions about how to make some spaghetti code out of a multidimensional array work when an object was the appropriate data structure? I used to be that person. Instead of learning programming from the start, I hacked together my education by coming back to the forums and learning bad design patterns. When I go back and look at some of my first programs, I'm embarrassed how bad they were because I was too lazy to sit down and really learn programming concepts.

Building cool stuff is the best way to learn programming, but when you skip over the fundamentals you will hit a wall. When that happens you'll go back and really dig into the fundamentals, and at the point in your education a light-bulb will go off and you'll wonder to yourself why you skipped over the important bits and how much time you could've saved if you had learned the concepts fully from the start.

You remind me a lot of myself when I got started, and I wish someone had given me the advise that I am giving to you. 


I wish you luck in your journey.  

Nice advice. Thanks for sharing. 

I've read four  c++ books, and I can confidently say that I'm well enough with C++. All I needed clarification on was some minor implementations in MQL, and felt really bothered when I was redirected to the very things I was running away from. I have just finished creating a Neural Network Model in MQL. No one can really say I'm a noob.

I'm glad you took your time to explain. 

We should really try helping MQL learners in MQL-specific structure and design. Let them not feel bad about taking MQL first and not C++. 

 
Nelson Wanyama:

Nice advice. Thanks for sharing. 

I've read four  c++ books, and I can confidently say that I'm well enough with C++. All I needed clarification on was some minor implementations in MQL, and felt really bothered when I was redirected to the very things I was running away from. I have just finished creating a Neural Network Model in MQL. No one can really say I'm a noob.

I'm glad you took your time to explain. 

We should really try helping MQL learners in MQL-specific structure and design. Let them not feel bad about taking MQL first and not C++. 

Where is your specific question about these minor issues ? I missed it and only see your general opening question.

 
Alain Verleyen:

Where is your specific question about these minor issues ? I missed it and only see your general opening question.

I ended up deleting most of them as I did not anticipate any more help. I should really try to keep my questions to myself or try discovering answers myself. I'm a grown-up now✔

I had posted a question, whether there is an alternative to using dynamic objects in MQL, and how it can be done. Well, I ended up creating my own garbage-collecting system, and therefore I can use dynamic objects whenever I need them without the fear of exceptions and memory leakage. I guess it has some implications on efficiency. But this is Earth. There's time for speed and time to slow down. 😂

Reason: