Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

10 Articles every web programmer should read. Personally, SEO has zero bearing on my work. Java is only relevant to a subset of developers.


I'd argue that the ones on memory, floating point arithmetic and games programming networking have little relevance for most web developers.


Floating point arithmetic is the only arithmetic if you're a web developer.


Any website dealing with any form of sales/money WILL have to deal with FP arithmetic problems sooner or later!


Sorry, no. If you are doing your accounting in floating point, you are setting yourself up for really strange non-balancing balance sheets. You can do everything in fixed point.

Remember that fixed point does not mean the point is at the rightmost position. It means it is in a fixed position.


Of course, yes. But the naive people will start using FP math - so they have to be warned as early as possible.

I'm doing all my math in fixed point (eurocent), but that has its drawbacks too if you deal with VAT and have to hit a specific total price given only a VAT rate and a net price... or if you're dealing with gas pumps and that x.xx9 cheating. Or scales, where the law requires more precision...


Or do all of your math in cents. Then you've only got to worry about FP at the displayed end.


Sure, but not at the ultra low level that the article linked goes into. The article comes at it from an approach that if you're building (for example) scientific software then you need a deep understanding of how rounding will be performed so that the results are correct.

Don't get me wrong, understanding FP representation and arithmetic is useful for web developers, but the comment was on that actual article that was linked which goes into it in a level of depth that most web developers won't ever really need to dive into.


Or do it as everyone else and actually use ints instead of floating points? I thought this was common knowledge by now...


And I just noted the wording made me look like an asshole, sorry.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: