Page 2 of 2
Re: Some self humorous coding-love-hate!
Posted: Thu Jan 26, 2012 11:49 pm
by Robin
That's an excellent read, I recommend it to anyone here. I've run across it two or three times before.
Re: Some self humorous coding-love-hate!
Posted: Fri Jan 27, 2012 12:04 am
by Jasoco
1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.
Perfect.
Re: Some self humorous coding-love-hate!
Posted: Fri Jan 27, 2012 11:09 am
by coffee
Robin wrote:That's an excellent read, I recommend it to anyone here. I've run across it two or three times before.
So, will Lua have an entry someday? How probably would sound?
Jasoco wrote:1940s - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.
Perfect.
I always felt was more important debate the margin distances in punched cards.
Re: Some self humorous coding-love-hate!
Posted: Fri Jan 27, 2012 4:49 pm
by YellowAfterlife
nevon wrote:
Just saying,
Math.min returns +Infinity if given no arguments
Math.max returns -Infinity if given no arguments
That is intermediately logical, and is how you would normally calculate min\max, without adding additional 'if' for zero arguments or undefined argument values.
Re: Some self humorous coding-love-hate!
Posted: Sat Jan 28, 2012 12:11 am
by Robin
YellowAfterlife wrote:Just saying,
Math.min returns +Infinity if given no arguments
Math.max returns -Infinity if given no arguments
That is intermediately logical, and is how you would normally calculate min\max, without adding additional 'if' for zero arguments or undefined argument values.
Yes, but that's not the point. The point is that it is unexpected, counter-intuitive and inconsistent.
Normally, for any number of arguments, the property Math.min(x1, ..., xn) <= Math.max(x1, ..., xn) holds. That is what you expect. The only exception is when n = 0. That's enough to warrant a wat.