|
yup, the NaN stuff is amazing, but not sure about 'how a number is a word and how a word is a string'
|
|
|
|
|
Great that you already know the NaN is a number.
Now, if you have ever programmed in low-level, you would know that a word is a size given to a data, 1 byte, 2 byte etc. So the size of the register in CPU is a word; pre-defined size, doesn't matter 8-bit 16-bit or what. The size is number, thus, a number is word.
Now a word in our language, for example, "Hello", cannot be represented as a word in computer which needs some other type, which is string (array of characters), thus a word is a string. From here comes the metaphor,
In programming, a number is a word and a word is a string.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Do you have any reference documentations for it?
I want to learn about it more in-depth. Thanks!
|
|
|
|
|
Sure, read about Word in computer architecture[^] and the string data type[^]. One thing you should know is that there is no actual string type, it is just an array of characters.
Good luck for more in-depths.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Thanks for it. Have a nice day ahead!
|
|
|
|
|
Great explanation of how semantics and jargon are sometimes or often at odds with meaning.
|
|
|
|
|
Afzaal Ahmad Zeeshan wrote: Isn't it amazing, how NaN is a number Yes! Especially since NaN is short for "Not a Number"!
My whole life is a lie!
|
|
|
|
|
Clarified, but how is a number a word (the size of register) and how is a word actually a string (the data type)?
Plus, short form of your life is a lie (removing the F).
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
No, undefined compared with anything (anything includes also again undefined) is "an error" and therefore neither equal nor unequal... it is simply again undefined.
modified 19-Jan-21 21:04pm.
|
|
|
|
|
It's 2015, IEEE 754 is from 1985, how does this still surprise people after 30 years?
|
|
|
|
|
Any after overloading operators...
|
|
|
|
|
spoiler alert -- answer is below
Opened Chrome Dev console and ran the following.
var x = 'garbage' / 10;
x
NaN
x != x
true
x !== x
true
typeof(x)
"number"
|
|
|
|
|
Awesome
|
|
|
|
|
How about int ?
private static System.Random randy = new System.Random() ;
int foo { get { return ( randy.Next() ) ; } }
|
|
|
|
|
Or DateTime:
DateTime foo { get { return DateTime.Now; } }
|
|
|
|
|
|
Down (with Inchworm Action)
===================
Down in the boondocks used to be called sawbones about it's a long, long way to Tippecanoe and paddle boy he watched Sesame Street with Kermott the Hoopoe wrote the Raven maniacronymphomaniacrophobia good guy wireless Paul is dead KenneD. H. Lawrence Taylor Sheriff of Mayberry pie is not just 3.14etc. any more's law-abiding dong the witch is it live or is it memorhesus monkeys to the Kingdom and dumbo Derek and the Dominoes is growingwie Malmsteenager in Love on the Roxanne you don't have to turn it up and down
modified 11-Sep-15 12:47pm.
|
|
|
|
|
I am constantly trying to have metaphors to explain to business people what building software is, and why failures happen, and why having it sooner is NOT better than having it right.
I usually use hiring an architect to design a new building. Having to ask all the right questions about how it will be used, who will be using it (giants or little people, special needs, etc) all impact the design. And those decisions need to be made early. (ignoring waterfall vs. agile debates here).
Recently, I stumbled across someone looking for a "package" to run their shop. They wanted us to tell them which package they should go with, but we were there on an initial meeting. We told them it would be a horrible idea to proffer an opinion knowing so little about what they do, and about what they SHOULD be doing better.
After the meeting, I was pondering how to explain this to them.
So, I thought of the concept of saying. What you have now is a PLAY. You know all the scenes, the lines, the roles, the players. Now, to get to the next level, you need a Musical Score to accentuate that play, and allow people to be more engaged with what they are doing.
Don't you think, before the Music is written, that the Musicians should read/watch the play?
Should understand the meaning of the "Parts"?
Should know the entire story?
Should have a clue where the sequel might go?
I am curious about feedback to this line of thinking?
Does this make sense as a way to get people to understand that the final piece, if done well, adds extreme value, and if done poorly, by people who do not understand, will produce a poor result.
Just loading up Van Halen songs and playing them may be great for the one manager who loves Van Halen, but honestly, is that what they need?
|
|
|
|
|
... music comes from hydrogen bombs ...
|
|
|
|
|
Yeah it's kinda like that.
Software projects are never complete they just have to be shipped at some point.
Audio mixes are never complete They also have to be shipped at some point.
In both instances, the engineer is left holding an unfinished issue list while sales / marketing run off with the "product" because there are boat slip dues and such that need to be paid up.
There is an old adage that goes:
In the life time of any project there is a time to shoot the engineer and go into production.
|
|
|
|
|
Excellent response! +5
"Go forth into the source" - Neal Morse
|
|
|
|
|
|
Yeah, that's the one. I heard it from an old bit slice firmware guy I worked with in the 80s.
|
|
|
|
|
Kirk 10389821 wrote: I am curious about feedback to this line of thinking? Using architecture, to build a house, is more common. It also gives an impression that it is harder to change the basement as building moves on.
Lots of places choose speed over quality and security. If you want to continue building your Skyscraper on those two first floors that are made of paper, you will probably need to do some little adjustments. And yes, you can pick a random deadline. Means it success will become equally random
If you cannot say that you would love to own such a skyscraper, then maybe it is time to stop accepting those kind of "buildings". They're not buildings, they're accidents waiting to happen.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Trying to be a programming rockstar
|
|
|
|