Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
mdalex2547yThen when someone asks why you did something a specific way "fuck, hmmmm, give me an hour to evaluate my decisions and logic"
-
@crapperthepooh Good luck...
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;
} -
donuts238487y@crapperthepooh esoteric business knowledge doesn't... And there's a lot of that in real code...
Sometimes optimization breaks things.
Good code explains itself **when it is paired unit tests that cover the use cases** -
donuts238487y
-
@crapperthepooh
The code about is the inverse square root implementation in Quake 3. It's definitely a great piece of code but there is a whole paper explaining how it works. -
Wow that escalated quickly haha, ofcourse I document classes or complex functions when there intent is not obvious, but I always aim for self explainatory code
-
@billgates and yea, we TDD 90% of the time so if someone breaks something the merge request cant be accepted
-
cino407yI prefer no comments. I like markdown docs or commit comments. If a comment is needed most likely the code requires some touch us.
Related Rants
> Comments are there only for you, please delete them before pushing your code.
I want to kill everyone who suggests that, slaughter them like animals!
undefined
order 66
wk66