[Archive c 17.03.2008] Humour [Archive to 28.04.2012] - page 688

 
 

All true, with the only difference being that the programmer is being fucked over by the client.

And in general, freelance is freelance, regardless of the profession. The same can be said for designers.

 
Urain: Everything is true, the only difference is that the programmer is being fucked around by the client.

In fact, if you side with the client (say, a humanist), he is quite sincerely convinced that the coder is making fun of him by pretending not to understand the most basic things.

Isn't it like that? Even a housewife knows perfectly well what it means to pour a little less than half a glass of not very fat milk. And the coder is even worse: he does not know what "the price almost reached this level" means...

 
Urain:

All true, with the only difference being that the programmer is being fucked over by the client.

The programmer is best fucked by the programmer himself :-).
 
jartmailru:
The best way to fuck a programmer is to fuck a programmer himself :-).

Oh yeah. I spent five hours today debugging code like this:

bool pos.SendAll(int handle, double mx)
{
  for (int i=0; i<pos.Count; i++) 
  {
   if(pos.Lots[i]>0) 
     if(FileWrite(handle, pos.Symbols[i], pos.Lots[i] * mx, pos.BuyTPs[i], pos.BuySLs[i]) < 0) 
      { Error("pos.SendAll() => FileWrite()"); return(false); }
   else
     if(FileWrite(handle, pos.Symbols[i], pos.Lots[i] * mx, pos.SellTPs[i], pos.SellSLs[i]) < 0) 
      { Error("pos.SendAll() => FileWrite()"); return(false); }
  }
  FileFlush(handle);
  return(true);
}

It works without errors, but it doesn't write anything to the file. It should!

Fix the bug, please. Let's have a laugh together. :))

// All arrays are healthy, it's checked. The error is here.

 
MetaDriver:

Oh yeah. I spent five hours today debugging code like this:

It works without errors, but it doesn't write anything to the file. It should!

Fix the bug, please. Let's have a laugh together. :))

// All arrays are fine, I checked. The error here.


uint  FileWrite(
   int  file_handle      // handle файла
   ...                   // список записываемых параметров
   );

Returned value

Number of bytes written.

I don't know how you open file, but if should be <=0, then there will be an error message.

SZY And in general, go to a specialized branch, because you shouldn't rubbish with all kinds of codes in Humour :o)

 
Urain:

Returned value

Number of bytes written.

I don't know how you open the file, but if should be <=0, then there will be an error message.

SZY And in general, go to a specialized branch, because there's no need for all sorts of codes in Humour :o)

The answer is wrong. Find the mistake first, then it will be funny ))
 
MetaDriver:
The answer is incorrect. You'd better find the error first, then it'll be funny ))

Your else refers to the second if. If Lot<=0, nothing will be written.

if(false)
  if(true)Print("1");
else
  if(true)Print("2"); 
 
Urain:
Other refers to the second if. If Lot<=0, nothing will be written.

Exactly. ))

And the lot was 0. That's why it didn't write. It took me a long time to debug (not 5 hours, of course, but 2 hours for sure), because I was looking for errors in other places. When this one found a long laugh. )

And it's all about saving curly brackets...)

 
MetaDriver:

Exactly. ))

And the lot was 0. That's why it didn't write. It took me a long time to debug (not 5 hours, of course, but 2 hours for sure), because I was looking for errors in other places. When this one found a long laugh. )

And it's all about saving braces...)

Now say the magic word "shovel".

ZS is sad, you're just like my friend nicknamed Mitya.

He was ~30 years old, 6'2" and shorter in the shoulders.

He came to us from the venerologist, and everyone was very sympathetic: "What did the doctor say?

M - said you should be ashamed, you're so big and still have childhood illnesses :o)