title: why not to use thread.sleep for no reason, and explain it to a programmer
body: <p>While passing through code in our project I came across a web method that had this code at the end of it:</p>
  
  <pre><code>thread.sleep(6000);
  return true;
  </code></pre>
  
  <p>Now, this was done so the jQuery ajax call from the client gets delayed and the ajax animation will show for a little bit longer.</p>
  
  <p>This is very wrong in my eyes. There shouldn't be this kind of connection between UI and server side. If he wants the animation to take longer he can use the <code>setTimeOut</code> function in the client side.</p>
  
  <p>Here is my problem: how can I explain to the programmer why this is so wrong? Not just because the client/server thing, but why ever call <code>thread.sleep</code> on a website?</p>