Hacker News new | ask | show | jobs
by Novash 6112 days ago
He refers to the known floating point rounding error. You should not expect a 'new coder', as he put it, to trully understand floating point rounding errors because to understand it, you need to already be a coder with some experience.
1 comments

"You should not expect a 'new coder', as he put it, to trully understand..."

Oh, but I do. If you don't understand it, figure it out. If you still don't understand it, ask. If you still don't understand it, sound the alarm, and we'll both sit down and figure it out together. And you will learn it.

But please don't use "newness" as an excuse to leave shit behind. Excellence comes from doing excellently, whatever it takes.

I talk like that because one of my first assignment in College when learning C was exactly a program to calculate change. And the inherent floating point erro causes the said 0.01 difference. I was fresh into C, third, maybe fourth class. You can be sure that no one had the least idea why that happened. Obviously, we all took the easy way out, used integers multiplied by 100 to work around it, but you couldn't expect me to figure out by myself WHY that was happening. This error, and the explanation of why it happened was the introduction to floating point class that we had after we saw it happen. It is just one of those things that you have to see working to understand (like recursion and pointers).

I am always impressed to see how experienced people take a lot of knowledge for granted from others. It is not like you have never 'left shit behind' in your career. I would even daresay that if you pick the code you made six months ago, you will see that it could be improved in a lot of ways. Not because you wanted but because you didn't know better, mostly. This is pratically an axiom in the life of a coder.

Please don't use "experience" as an excuse to diss the hardships of others. We were all there one day.