|
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare
Home | LinkedIn | Google+ | Twitter
|
|
|
|
|
Did that half a year ago.
Goodbye car, hello commuter train, hello walking shoes. Still no regrets!
Good luck!
|
|
|
|
|
Congrats!
I hope it's a good one!
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Congratulations and good luck!
/ravi
|
|
|
|
|
That's what she said...
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Hi All,
Return to working mode, Clean shirt, Clean trousers, have shave, go!
|
|
|
|
|
glennPattonInThePUB wrote: Hi All,
Return to working mode, Clean shirt, Clean trousers, have shave, [Coffee] go!
When confronted by management, just think, What Would Mick Do...then probably do the opposite.
Michael Martin
Australia
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible."
- Mr.Prakash One Fine Saturday. 24/04/2004
|
|
|
|
|
Good luck for you first day in the new job - hope it all goes well!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Control to Glenn, you're good to go!
veni bibi saltavi
|
|
|
|
|
Good luck!
By the way, you work in a PUB!?
Maybe it's time to change your screen name
|
|
|
|
|
Well done, hope they pay reasonably well and you enjoy the work.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Congratulations!
glennPattonInThePUB wrote: Clean shirt, Clean trousers, have shave, [Coffee] go
No, don't do any of this. Make them feel that you are really underpaid.
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
Just as long as they don't require you to provide breakfast for the office on Friday of your first week.
"Rookie Breakfast", yeah that's a think at one company I worked for.
|
|
|
|
|
var result = new[] { 1, double.PositiveInfinity, double.NegativeInfinity, double.NaN }.Max();
var result = new[] { 1, double.PositiveInfinity, double.NegativeInfinity, double.NaN }.Min();
var isNaNSmaller = double.NaN < 1; So NaN is not the biggest value, it's still bigger than one, but it's also the smallest value.
I hate to sound infinitely negative, but that's messed up
|
|
|
|
|
NaN means Not a Number, so you cannot compare it to a proper number and get a valid response.
|
|
|
|
|
I know, so always treat it as smallest value, or always as biggest value or, better yet, throw an exception when comparing it to numbers.
These results are contradictory and just don't make any sense at all!
If this was JavaScript I'd be okay with it, but we're talking C# here. I expected better from C#
|
|
|
|
|
This has nothing to do with C#. I refer you to IEEE 754.
|
|
|
|
|
I'm glad that a lot of people have thought about how NaN should have contradictory results in different usages
<Edit>
So it seems the contradictory result are in IEEE 754, but the weird behavior in Min and Max is Microsoft[^]
</Edit>
modified 2-Oct-16 17:16pm.
|
|
|
|
|
That is true. But keep in mind that the Min and Max functions have nothing to do with C# - they are written in C#; yes, but they are part of the LINQ / the .NET Framework.
The difference in both is that Max excludes NaN, while Min will take NaN exclusively. You can see the difference here (Min)[^] and here (Max)[^].
That is different to some JS functions (such as everything in Math), which are defined by the same specification as the language.
|
|
|
|
|
"Not a number" means exactly that. So you cannot equate it to any numeric value.
|
|
|
|
|
Richard MacCutchan wrote: So you cannot equate it to any numeric value Yes you can, and that's the point.
I expected either an exception (compile or run time) or at least a predictable weird behavior (well, it's predictable once you know all the edge cases I guess).
Now whether you should is a different discussion...
I found this because I had some weird JavaScript bug by the way, casting some object to a number results in NaN and I was wondering how C# handled the case the followed.
NaN is not smaller than 1 (when comparing and when using the Min function), but when both are thrown into the Max function NaN is smaller than 1. Got it
Luckily, I've never had to work with NaN in C# because why would there even be a NaN anyway...
|
|
|
|
|
Sander Rossel wrote: why would there even be a NaN anyway...
- 0/0
- ∞/∞
- ∞+(-∞)
- √-1
- and so on...
Just because you are not familiar with the subject, does not make others wrong.
|
|
|
|
|
0/0 should throw a DivideByZeroException (which it does for integers).
And apparently 1/0 equals infinity.
Now what is it? NaN, infinity or just plain not possible?
Doesn't it sound weird (and, indeed, very wrong) that a NUMERIC type has a value "NOT A NUMBER"!?
Anyway, when I said "why would there even be a NaN anyway" I was referring to NaN in actual real life business cases that make sense and have practical use
|
|
|
|
|
I would recommend you to this article before you continue your rant about IEEE754.
|
|
|
|
|
Tried to read it once, but to me it makes as much sense as the whole NaN implementation: none whatsoever (and I admit my limited math skills are to blame).
However, I tried reading the NaN part and what they basically say is that in some edge cases you don't want computations to stop (throw exceptions) when some bogus values are inserted (e.g. divide by 0). The workaround without NaN would be to catch exceptions and simply try again. Unfortunately, every language handles exceptions differently so they standardized on NaN.
Awesome, they destroyed our numeric system to support some edge cases (correct me if I'm wrong)
Luckily .NET offers some sensible numeric types with int, long and decimal
Unfortunately, I'm currently working in JavaScript, with floating point arithmetic, where NaN is quite common, and 0.1 + 0.2 equals 0.30000000000000004 (yes, I know that's IEEE754, but that doesn't make it right)
|
|
|
|