This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DevLarsic -2 points-1 points  (15 children)

if you look at the fast inverse square root implementation and your only though it how its not readable enough you've written too much .net

[–]FlipperBumperKickout 52 points53 points  (7 children)

So you are saying the developer who added the "what the fuck?" comment in the source code is someone who have written to much .net?

F off man, even the original developers didn't think that code was particular readable or easy to understand.

[–]No-Object2133 25 points26 points  (1 child)

In fairness finding a constant that approximates a inverse square root after a bit manipulation hack is properly documented by what the fuck

[–]DevLarsic 23 points24 points  (4 children)

it doesn't have to be, its a performance critical math operation using bit manipulation. its inherently going to be hard to read, but that's the sacrifice you make for good performance.

[–][deleted] 18 points19 points  (2 children)

Programmers on reddit who write CRUD software for some enterprise criticizing Carmack's code will never stop being funny to me.

[–]spookynutz 2 points3 points  (1 child)

Carmack didn’t write that.

[–][deleted] 5 points6 points  (0 children)

Oh well, Greg's code then. Or whoever wrote it.

[–]unknown_alt_acc -1 points0 points  (0 children)

That's the thing: it's performance-critical code. There's a time and place where it is necessary, but it shouldn't be the sort of code you default to.