OOP vs procedural programming - page 3

 
George Merts:

Criterion for comparison ?

I argue that OOP is necessary for the ease of maintaining and making changes to the finished code. You, as I understand it (let's speak on "you"), claim that it is not more complicated (and maybe even simpler) in your code. How shall we compare?

Your phrase alone about "you remember everything" already introduces inequality. Let's say my merchant processor consists of 39 files, and 270kb of code. If developers will change the protocols of interaction with a trade server - I'm afraid that without structuring and OOP-system classes it will be very difficult for me to find all places, which must be affected by this change, and to modify the code, so that, firstly, the blocks working in MT4 would not be affected and, secondly, the written TS would not "feel" this change.

The whole OOP system limits for me the possibility to make errors precisely because I don't remember everything. And if I remembered everything, as you do, probably there'd be no need to build all these virtual interfaces...

You or you don't matter...

All our discussion doesn't get to the specific task at hand. That's why everything remains an empty "chatter". 270kb of code is not much at all if it's your code. You remember it and know it. If you don't know your code well, there will naturally be difficulties modifying it. Switching to a different platform is not a problem for me precisely because I don't use OOP and know all my code very well. Although I have many times more code. Please, describe the specific difficulties you have when you want to rewrite your code in MQL5.

 
Alexey Volchanskiy:

Actually WL is dying, no new versions for a year and a half. And as vika says.

Testing happens on 1core, making the process long on modern computers with multiple cores.

Yes these guys, in my opinion, are let down by their paranoid suspicion and uncompromising fight against piracy.

I remember when I downloaded the WLD for Russians and I had to write my name and surname on it. Well, I wrote my surname... These paranoiacs told me that they wouldn't give you the key because you were "not a good-looking person". I had to write a separate letter to them in Russian, to explain that my paternal great-grandfather was born in Riga, and, therefore, the surname was "zakrodon" (foreign), but I, a native Russian, was born here... They apologized and sent me a key.

But, their community three years ago, in my opinion, was more developed than the MT community. It's true that now, as I see it, MT is increasingly reclaiming its "share of the pie".

 
Реter Konow:

You or you don't matter...

All of our discussion doesn't get to the specific task at hand. That's why it all remains an empty "chatter". 270 kb of code is not much at all if it's your code. You remember it and know it. If you don't know your code well, there will naturally be difficulties modifying it. Switching to a different platform is not a problem for me precisely because I don't use OOP and know all my code very well. Although I have many times more code. Please, describe the specific difficulties you have when you want to rewrite your code in MQL5.

That's my code. But I remember it, strangely enough, rather poorly. Above the topic - I posted my code, you can see how many comments there are, and more than once I've encountered that it's not enough, periodically I come across places that I have to take apart for a long time to understand the subtleties of work. That said, it's nice when those subtleties are already described in the comments beforehand.

I do not understand what I mean by "difficulties that arise". I don't have "a code for MQL4 or MQL5" - my code is the same for both platforms (the only difference is within platform-dependent classes, which were written a long time ago and rarely change.) Everything I write works both under MT4 and MT5

 
George Merts:

That's my code. But I don't remember it very well, oddly enough. Above on the subject - I posted my code, you can see how many comments there are, and more than once I've encountered that it is not enough, periodically I come across places that I have to take apart for a long time to understand the subtleties of work. That said, it's nice when those subtleties are already described in the comments beforehand.

I don't understand what I mean by "complexities that arise". My code is the same for both platforms (the only difference is within platform-dependent classes, that are written a long time ago and rarely change.) Everything I write works both under MT4 and MT5

I'm confused. Above you said that the challenge is to get the code to work on both terminals.
 
George Merts:

In my opinion, these guys were let down by their paranoid suspicion and uncompromising fight against piracy.

I remember on their "for Russian citizens" promotion, I downloaded WLD and had to write my details on it. Well, I wrote my surname... These paranoiacs told me that they wouldn't give you the key because you were "not a good-looking person". I had to write a separate letter to them in Russian, to explain that my paternal great-grandfather was born in Riga, and, therefore, the surname was "zakordonnye", and that I, an original Russian, was born here... They apologized and sent me a key.

But, their community three years ago, in my opinion, was more developed than the MT community. It's true that now, as I see it, MT is increasingly reclaiming its "share of the pie".

Yeah, that's really cool.
 
Реter Konow:
I'm confused. You said above that the objective was to make the code work on both terminals.
Well, so it has been accomplished, and now - the code is one.
 
George Merts:

That's my code. But I don't remember it very well, oddly enough. Above on the subject - I posted my code, you can see how many comments there are, and more than once I've encountered that it is not enough, periodically I come across places that I have to take apart for a long time to understand the subtleties of work. That said, it's nice when those subtleties are already described in the comments beforehand.

I don't understand what I mean about "difficulties that arise". I don't have "a code for MQL4 or MQL5" - my code is the same for both platforms (the only difference is within platform-dependent classes, which were written a long time ago and rarely change.) Everything I write immediately works both under MT4 and MT5


I agree with 100500! I often read my own programs myself and sometimes get confused, what did I want to do here? I think about it, I understand, but time is running out. I comment on nearly every line of code for my customers.

And there is one more person asking to make a video code review for each program. Comments are somehow not enough for him.

 
George Merts:
Well, so it has been done, and now - the code is unified.
George Merts:

Erm... I didn't quite get the point.

The goal was to separate the TC from the terminal. The code must compile on both platforms without any changes. The super task - to transfer all written TS to WealhtLab Developer by writing only classes of working with the trade server.

//--------------------------------------------------


I asked about the current task in order to compare its solutions by several criteria and come to a conclusion about the effectiveness of each. You are taking the conversation away from the practical part. When asserting the effectiveness of OOP, you must be able to prove it in practice. I, on the other hand, am willing to try and prove my opinion.

So, what is the current task? I hope you remember it)

 
Alexey Volchanskiy:

I agree 100500! I often read my own programmes myself and sometimes get confused, what did I want to do here? I think about it, I understand, but time is running out. I comment on almost every line of code for my customers.

And there is one more person asking to make a video code review for each program. He somehow misses the comments.

This is already a "clinic"))))

Generally, how can we speak about efficiency of OOP if people don't remember their code?)

 
Реter Konow:

This is already a "clinic")))

Actually, what kind of OOP effectiveness can we talk about if people don't remember their code?))


I take it you are not a programmer? Then remember where you were 2017.07.05 14:55 GMT 00, who you were talking to and about what ))