Terminal Globals Problem - page 5

 
WHRoeder:
ProfessorMetal: I'm not one of the neophyte nitwits
Without error checking, I'm not so sure.
ProfessorMetal: don't try to teach Grandpa how to suck eggs, Man. Chill, Son.
WHRoeder: You don't have time to do it right the first time, but you do have time to do it over, or track down bugs caused by it.
You need to Chill. You're getting all bent out of shape over a simple observation. And don't call me "Son", I'm older than you (1957.)

"Without error checking, I'm not so sure." This is exactly the type of comment that I'm talking about. That's out of line.

I don't have a presonal problem with you, Roeder. I took what you said as slamming me undeservedly. My apologies if I misunderstood your intent. BTW, using the term "Son" is common where I'm from. It's like saying "Man" or "Dude" or whatever.

When I'm talking about error handling being expensive, I'm coming from the standpoint of being used to the Microsoft try/catch paradigm. That's very resource intensive and time consuming as far as execution time is concerned. The accepted practice is to architect your app, determine where problems are likely to arise and then add your exception handling. You don't want to over use it, especially in a real time application. That's as bad, if not worse, than doing no exception handling at all. If you're talking about using conditionals to error check then, yeah, I do that as a matter of course.

As to the particular situation I'm encountering when the debugger crashes it doesn't appear to have initialized anything at all. The debugger brings up a chart for a split second and dies. According to the log, it loads the indicators, etc. and then immediately unloads them. In the indie I'm currently working on I have Alerts in OnInit() so I know whether not it's trying to initialize the indie. I see the same sort of behavior if I run run the debugger on on other indies that I know don't have any problems. I'm not entirely sure what's going on but I'll eventually figure it out. Like I said in an earlier post, the documentation is incorrect as far as to where it says debug.tpl is located. The directory doesn't even exist in the MT4 installation. Either the documentation is wrong or the MT4 implementation has issues. So, at the moment, I'm thinking it's 50/50 as to whether I'm screwing up somehow or something is wrong in the platform implementation.

At any rate, let's just agree that we misunderstood each other, shakes hands and move on. There's no need for a battle between us. Cool?

 
angevoyageur:

Can I suggest to our veteran programmers to stop this kind of this discussion here.

Thank you.


Agreed. This is completely counterproductive - and unprofessional.
 
ProfessorMetal. I could not agree with you more on your views on excessive error handling and preference on forward testing.
 
gatoreyefx:
ProfessorMetal. I could not agree with you more on your views on excessive error handling and preference on forward testing.

Thank you. Pleased to make your acquaintance. Experience is a great teacher. :-)
 
  • ProfessorMetal:

    Thank you. Pleased to make your acquaintance. Experience is a great teacher. :-)

    I don't think it's a good recommendation here, as most members are beginners or amateur coders, and one of the most recurring problem comes from no error checking at all. Moreover, experimented coders don't need such recommendations as they have their own experience and habits.
 
I agree with angevoyageur, error handling reduces time spent debugging and/or asking others to help find the cause of the problem(s).
 
Well, since upgraded from build 509, I have been using error handling. Now, almost none since I have removed from the ea which I am definitely know the code are stable enough to handle errors. Something like that.
 
angevoyageur:
  • ProfessorMetal:

    Thank you. Pleased to make your acquaintance. Experience is a great teacher. :-)

    I don't think it's a good recommendation here, as most members are beginners or amateur coders, and one of the most recurring problem comes from no error checking at all. Moreover, experimented coders don't need such recommendations as they have their own experience and habits.


You have a valid point regarding beginner and amateur coders. I wasn't meaning to advocate that anyone follow my approach. I was simply meaning to clarify the what and why of it. I did say "experience is a great teacher". :-)

BTW, I think your last statement is something I was trying to get across to Roeder - along with the point that making your interactions with other forum members consist mainly of attacking and putting people down serves no purpose other than to massage your own ego. Those of us who are experienced should respond to the less experienced who are actually trying with respect and consideration, not derision. With that, I consider the matter closed. I made a conciliatory response to William. If he wants to accept it, that's fine. If not, that's fine, as well.

 
SDC:
I agree with angevoyageur, error handling reduces time spent debugging and/or asking others to help find the cause of the problem(s).


I don't dispute that in any way. My point, really, was that experienced developers gain a "feel", if you want to call it that, of where problems are likely to arise. For example, if I have a method that requires parameters, I always check to make sure they are what they should be before attempting to execute any code. It's an automatic habit developed from years of working on industrial applications where a method is going to be called by other developers working on another part of the application or directly by end users if it's a UI element. You quickly learn not to take it on faith that someone is going to send you what they're supposed to.

Most of what I was talking about was the try/catch paradigm. That's a non-issue with MQL because, as far as I know, MQL doesn't have the exception handling that Microsoft employs. That renders a lot of what I said moot.

For the record, the problem appears not to have been with either of my indies. I didn't think it was but it's always possible - nobody is perfect, me least of all. I use a freebie third party trade management EA because I haven't had time to develop my own. For testing purposes of ideas using demo accounts I deemed that good enough. I guess you get what you pay for - it's a freebie. I got rid of it and the debugger hasn't crashed since. There are still some issues, though.

What I said earlier about the disconnect between documentation and operation still goes. There is no profiles/templates directory in the MT4 installation. In addition, the documentation doesn't tell you diddly squat about how to set up and use debug templates. I've spent quite a few hours playing with things to see what the current behavior in MT4 is. What I've come up with should be shared somewhere but I'm not sure exactly where forum etiquette would dictate. In this isolated thread is probably a no unless one of the Mods who are monitoring this think so. Should I create a new thread, hand my observations to a Mod so they can create a sticky or should I just compile everything and fire it to the Service Desk myself? Whatever the Mods think is the direction I'll go.

 

I dont think there ever was supposed to be a profiles/templates folder. My templates folder is in the terminal data folder.