4 ms·
Good call, imagine you had a task like taking the input from the form for the employees wage. A good developer with no knowledge of IEEE754 might do something
by fleitz 13y ago
Good call, imagine you had a task like taking the input from the form for the employees wage.
A good developer with no knowledge of IEEE754 might do something like this:
float hourlyWage = hourlyWageTextbox.text.floatValue();
While a hacker with intricate knowledge of IEEE754 might insist that everyone do the following:
string hourlyWage[] = hourlyWageTextbox.text.split('.')
int hourlyWage = hourlyWage[0].to_int * 100 + hourlyWage[1].to_int
It's essential to get rid of all these hackers who just slow down the dev process with extra unnecessary code. After all a quick unit test will show that there's no benefit from all the extra work of storing currency values as cents.
- jameshart 13y agoWell, while the developer might have cased a few rounding errors, the people with an hourly wage of 6.8325 are in for a nice bonus paycheck the month the hacker starts work...
- fleitz 13y agoHaha good point
- aerolite 13y agoisn't the hacker the first guy and the developer with experience the second guy?
- jey 13y agoNope. http://www.paulgraham.com/gba.html http://www.paulgraham.com/gba.html
- pbreit 13y agoI thought the same thing, re-read the essay and am still confused.
- jey 13y agoDefinition of "hacker": http://www.catb.org/jargon/html/H/hacker.html http://www.catb.org/jargon/html/H/hacker.html A "developer" is usually someone who just codes for money, isn't into it, and therefore probably sloppy.
- nostrademons 13y agoAnd then the developer with ISO 4217 experience realizes that splitting the input on '.' doesn't cut it. The Indonesian rupiah is formatted 1.234,56; the Japanese Yen is formatted 123,456; the Lebanese pound is formatted 1 234. The rabbit hole goes deep. Be careful when you think you've reached the end of it.