How do you programmatically distinguish between a PROFESSIONAL fetus and a DILIETAN fetus? - page 7

 

All string functions are cost-intensive.

All graphing functions are costly.

The more graph items - the more slows down. (so, to speed up work in visual mode, periodically delete order icons (especially if there are a lot of them)).

The most timeconsuming here would be WinowsRedraw() and Comment() since the chart is also redrawn when calling it.

This is how it looks at first glance.

 

The problem is that the code can be written by a professional and very competently (without costly features and designs), but it can embody the absolute nonsense that it has been commissioned to do.

It is no longer interesting.

 
Mathemat:

The problem is that the code can be written by a professional and very competently (without costly features and designs), but it can embody the absolute nonsense that it has been commissioned to do.

It's no longer interesting.

As I see it, a professional programmer must write for himself, like a writer or composer, and to order, also professionally, necessarily with a real positive result. Another thing is if he is asked to write on the customer's idea (TOR), despite the fact that his idea is inconclusive for the programmer, in which case the programmer warns that the customer is unlikely to work with the tip, but the customer insists and the programmer performs the order. I understand that the specifics are different here and that no masterpiece will stand the test of time, but agree that there are examples of longevity (verified by the tester) in the Market on MT5 for the entire history. I think this will be the starting point for determining the professionalism of the program and the programmer, as well as the trader, not because he knows, knows how, but by the result. Of course, this professional work must be priced accordingly. And no one is forbidden to make shoddy work, as writers and composers often do, condescendingly treating it as a forced part-time job "to support their trousers". Pardon my frankness, but without it, why speak out!

 
Inspiration is not for sale. But, you can sell a manuscript.
 

Dimitri, define what your analyzer should be able to do. To distinguish a good code from a bad one is one task; to distinguish a good idea from a bad one is quite another. And while in the first case you may try to find automatic solutions, in the second case it is difficult to do even in manual mode, and even in automatic mode is simply unreal. But since we have started speaking of an analyzer that can distinguish good code from bad, let's discuss the subject:

What distinguishes a professional from an amateur in the first place? In my opinion, it is the level of language knowledge, which is shown through a variety of ways of using the language. So if a developer uses non-trivial notation and algorithms like recursion, he is more likely to be a professional programmer. On this basis, we can construct some expert system that analyzes the code and calculates the number of "tricks" used in it. Each chip gets points. If a chip is, on the contrary, negative, penalties are imposed. So you get a number or a total score which characterizes the code as a whole. For example, you can make some kind of a weighting table:

Here's the tip:
Score
Use of arrays
+1
Code reuse (ratio of functions to code lines)
+4
Operators += -= /=
+1
Operators % >> <<
+3
Recursive function call
+5
Usage of preprocessor directives
+3
Number of lines commented to the amount of code
+5
Use of "slow" functions
-3
Using variables of the same type: time1, time2, time3, time4
-4

As a result, the expert system calculates the weight of each of the parameters and gives a total score characterizing the general quality of the code.

 

Guys, the only way to tell the difference between pro code and rookie code is to have the results of code optimisation. You won't be able to track 100% optimization. You can only trace some of its elements. And a novice can perform partial optimization as well. For instance, replace the "multiply by two" operation with the "add a value to itself" operation. Give it up, the tracking idea is too resource-intensive compared to the result it can give. It's not profitable to invest in a prog - it's an attempt to cut a match out of a log - one match as a product, and the rest as shavings.

 
drknn:

Guys, the only way to tell the difference between pro code and rookie code is to have the results of code optimisation.

Shitheads ))
 

Signs of professional code:
Meaningful names of variables and functions;
Good browsable programstructure;
Good comments.

You can only search for such features manually in the software. Automation will not work.

SZY This all should be looked for in programs written by a programmer for himself.
In our time, a self-respecting programmer will not give this code to others.

 
FAQ:

All string functions are cost-intensive.

All graphics functions are costly.

The more graph items - the more slows down. (so, to speed up work in visual mode, periodically delete order icons (especially if there are a lot of them)).

The most timeconsuming here would be WinowsRedraw() and Comment() since the chart is also redrawn when calling it.

This is how it looks at first glance.


I am interested in faster optimizations (testing is a separate issue) and reduced memory consumption.
The question of speeding up optimizations (testing is a separate issue) and reducing the memory consumption. On the forum someone casually mentioned that it's necessary to prevent "adding" graphical
objects during optimization. In theory, the optimization doesn't see graphics at all and I assumed that such
I assumed that commands such as ObjectCreate() are simply ignored during optimization.
Do I need to block them or not?
But if you still have to disable them, it means that we have to add a check every time
if(IsOptimization()==false ) {
}
At the same time, such checks themselves affect the optimization speed.
Are state checking functions expensive?
Does it make sense to assign them to variables and use them later?
I almost always have Comment() - should it also be locked during optimization?
What about Alert and Print? (again - during optimization). They are not written to the log during optimization, are they?
 
chief2000:

And if you still need to block them, it means that every time you will have to add a check

Just don't

if(IsOptimization()==false ) {
}

а

if( !IsOptimization() ) {
}

But it is better to do it this way:

if ( !IsOptimization() && ( !IsTesting() || IsVisualMode() ) ) {

// ...

}

This condition can be done once and set a value of some flag, which can then be used to check if text and graphical information needs to be displayed on the graph.

PS.

And in general, why are you so lively? The topikstarter from time to time indicates that you ..., and from D'Artagnan.