Link Details

Link 93287 thumbnail
User 111696 avatar

By bloid
via codeodor.com
Published: Jul 08 2008 / 11:55

Several days ago I wrote about common excuses people use for commenting code and things you can do to get rid of them. I took the stance that rarely is there something so complex that it really requires comments.
  • 5
  • 2
  • 2066
  • 6

Comments

Add your comment
User 282283 avatar

Tantalus replied ago:

0 votes Vote down Vote up Reply

So, before it was open sourced and famous, if you came across this bit of code:

float InvSqrt (float x){

float xhalf = 0.5f*x;
int i = *(int*)&x;
i = 0x5f3759df - (i>>1);
x = *(float*)&i;
x = x*(1.5f - xhalf*x*x);
return x;
}


you wouldn't want a little comment hint to help you out?

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (5)



Voters Against This Link (2)



Java Performance Optimization
Written by: Pierre-Hugues Charbonneau
Featured Refcardz: Top Refcardz:
  1. Design Patterns
  2. OO JS
  3. Cont. Delivery
  4. Java EE7
  5. HTML5 Mobile
  1. Node.js
  2. Debugging JavaScript
  3. OO JS
  4. JSON
  5. Ajax