The real WTF is including credentials into code/executables.
Here's another example I stumbled upon the week http://crashreporterdotnet.codeplex.com/documentation
It suggests obfuscating the executable. So far about false sense of security.
The real WTF is including credentials into code/executables.
Here's another example I stumbled upon the week http://crashreporterdotnet.codeplex.com/documentation
It suggests obfuscating the executable. So far about false sense of security.
@toon said:
@PJH said:@Thomfox said:For the non-programmerWhy are you wanting people, who know nothing about logic, writing programs?Also, why the hell would a non-programmer know about XOR? I'd bet a nice sum of dough, that not all of the programmers I work with know about XOR.
The "or" in natural language is more understood as an either or, which translates to XOR. There the confusion of OR working like XOR might come from and thus this odd pattern to ensure that either parameter is true, not both at the same time.
Yes I know this forum is all programmers and we got used to how boolean logic works. Have you ever had the moment, that you get confused by natural language for a moment?
@Sutherlands said:
@toon said:Why does it matter if expressionA is expensive? If it doesn't short-circuit on the first part of the expression, you know expressionA is false, so you can just writeA coworker of mine, we do all of our stuff in PHP, used to be in the automotive industry, and I don't mean as a developer. When reading his code I tend to run into the following.
<font size="2" face="Lucida Console">if(expressionA || (!expressionA && expressionB))</font>
I tried to tell him why he doesn't want to do this if expressionA is expensive, but it doesn't seem to sink in. Also, to nip a potentially very valid objection in the bud, in these cases it's not important that expressionA be false if expressionB is true.
if(expressionA || expressionB)
No, you cannot write it like that. What happens when both sides of the || are true? You have to make sure, if the left is true, that the right is false...
For a programmer it is obvious that True || True -> True. For the non-programmer, they might confuse it with the XOR.