if brainfart then loop
-
Just saw this in a colleague's code:
for (int i = 0; i < 2; i++)
{
if (i < 1)
{
// Some code
}
else if (i > 0)
{
// Some code
}
}and a little further down:
for (int i = 0; i < 2; i++)
{
if (i < 1)
{
// Some code
}
else
// Some code
}What is this talk of release? I do not release software. My software escapes leaving a bloody trail of designers and quality assurance people in its wake.
-
Just saw this in a colleague's code:
for (int i = 0; i < 2; i++)
{
if (i < 1)
{
// Some code
}
else if (i > 0)
{
// Some code
}
}and a little further down:
for (int i = 0; i < 2; i++)
{
if (i < 1)
{
// Some code
}
else
// Some code
}What is this talk of release? I do not release software. My software escapes leaving a bloody trail of designers and quality assurance people in its wake.
-
Just saw this in a colleague's code:
for (int i = 0; i < 2; i++)
{
if (i < 1)
{
// Some code
}
else if (i > 0)
{
// Some code
}
}and a little further down:
for (int i = 0; i < 2; i++)
{
if (i < 1)
{
// Some code
}
else
// Some code
}What is this talk of release? I do not release software. My software escapes leaving a bloody trail of designers and quality assurance people in its wake.
And there is no code outside of the if/else construct that runs in both executions of the loop body? Maybe at some time there was such code and it was removed later.
The good thing about pessimism is, that you are always either right or pleasently surprised.
-
Just saw this in a colleague's code:
for (int i = 0; i < 2; i++)
{
if (i < 1)
{
// Some code
}
else if (i > 0)
{
// Some code
}
}and a little further down:
for (int i = 0; i < 2; i++)
{
if (i < 1)
{
// Some code
}
else
// Some code
}What is this talk of release? I do not release software. My software escapes leaving a bloody trail of designers and quality assurance people in its wake.
without viewing his full code you cant judge him.. :omg:
-
without viewing his full code you cant judge him.. :omg:
I'm curious, under what circumstances would you find the code the OP posted reasonable?
PB 369,783 wrote:
I just find him very unlikeable, and I think the way he looks like a prettier version of his Mum is very disturbing.[^]
-
And there is no code outside of the if/else construct that runs in both executions of the loop body? Maybe at some time there was such code and it was removed later.
The good thing about pessimism is, that you are always either right or pleasently surprised.
Maybe. The guy that wrote it told me that he was playing around with the code, testing out a few ideas to deal with a bug. It's quite possible that this weirdness is a leftover of that.
What is this talk of release? I do not release software. My software escapes leaving a bloody trail of designers and quality assurance people in its wake.
-
I'm curious, under what circumstances would you find the code the OP posted reasonable?
PB 369,783 wrote:
I just find him very unlikeable, and I think the way he looks like a prettier version of his Mum is very disturbing.[^]
-
without viewing his full code you cant judge him.. :omg: