if(true) - page 2

 
Renat Akhtyamov:

true is sometimes false

false sometimes true )

 
Renat Akhtyamov:

true is sometimes false

LOL! In wartime the sine value can be as high as 4.

 
It doesn't make any sense. Just a consequence of code changes. When cleaning the code, either remove the construct or leave only the brackets if the block should be highlighted.
 
Dmitry Fedoseev:

There must have been a template and instead of true there was an external variable that included log output. But as there was no such variable in the task, it was deleted. And since programmers are practical people, it was not deleted at all, it was left easy to return it.

If there was an external variable, it would have been easier to set it true/false, but here it is replaced in every if,

I don't see the practicality in this case,

more likely to be a matter of pussyfooting and irresponsibility.

 
Sergey Chalyshev:

if there was an external variable, it would be easier to set it true/false, but here it's replaced in every if,

I don't see the practicality of it,

it's more likely to be a matter of indifference and irresponsibility.

Yes, it seems to me, too, that there must have been some kind of condition at first, and then, not to take too long to figure it out, they put true and left it there, without thinking about the fact that later they themselves wouldn't understand why it was there.

 

if(true) is written when debugging, at least that's what I do to get into the block and check if it works

SZZ: it's highly probable that the code has undergone several modifications, and then you can not see such miracles, the customer can not explain that each modification breaks the code structure

 
Sergey Chalyshev:

I don't understand, can you elaborate?

Can I see the source code from which the code snippet was taken?

 
aleger:

Can I see the source code from which this code fragment was taken?

The code is not mine, nor is it public, so I can't show you all of it

 
Igor Makanu:

if(true) is written when debugging, at least that's what I do to get into the block and check if it works

SZZ: it's highly probable that the code has undergone several modifications, and then you can not see such miracles, the customer can not explain that each modification breaks the code structure

Nonsense

 
Sergey Chalyshev:

Strange design, what does it mean?

Maybe there is a hidden meaning that I don't know?

I did so when I am asked to give a demo version of my time-limited product. And in that part where it is checking for expiration time of the demo version I mix up the code as much as possible with different additional branching operations in the code like if (1==1) and the like. In case someone decides to decompile the code to complicate understanding of how it all works. :) Although they say that the latest versions of mql are difficult to decompile, but I still do such senseless operations in code just in case.