JSONx is Sexy LIESx
-
-
People like to be aggressively superior sometimes.
Well duh. What's the point of being superior if no one knows about it?
-
People like to be
aggressively superiorarseholes sometimes.FTFY.
I mean the two mesh so closely you might as well throw out the distinction.
-
i.... uhh... defined.... undefined.....
In fact the
undefined
you can use to assign to things is a global variable, whose value is initially undefined because nothing ever got assigned to it. You used to be able to assign any value you like toundefined
. But the fun police shut that down, just like they did for changing the value of 5 via by-reference parameter passing in FORTRAN.
-
I've been having chats with my boss about the difference between web developers and software engineers >.> He contends that there's definitely a place for developers who are uninterested in learning about engineering and perfecting their craft, while I feel that there's too much praise for developers and not enough interest in engineering in the Node.js community which makes me, as an engineer-type, feel unwelcome.
Knowing about comma quirks across browsers is something an engineer-type ought to do but a developer will just be all "lol n00b just use $new_hot_node_plugin_here it makes it so you never have to think again". I like this community because more of my engineering-type people are here :)
-
Knowing about comma quirks across browsers is something an engineer-type ought to do but a developer will just be all
interesting, i consider myself a developer, but by your definition my respinse was mroe engineeringish than developerish (admittedly with a bit of developer thrown in there because "well i can be excused because we were already in nasal demon territory")
-
Yeah, it's really more... do you give a crap about why things work and how to architect things better and learning more about your craft, or are you just interested in grabbing the new shiny library and moving on because at the end of the day as long as it works who cares why?
I'm pretty sure just being here puts you in the former camp XD
-
But you can still redefine String.Empty to mean "hot latino ass" in C#.
-
Yeah, it's really more... do you give a crap about why things work and how to architect things better and learning more about your craft, or are you just interested in grabbing the new shiny library and moving on because at the end of the day as long as it works who cares why?
So basically Raymond Chen vs. Jeff Atwood.
-
do you give a crap about why things work and how to architect things better and learning more about your craft, or are you just interested in grabbing the new shiny library and moving on because at the end of the day as long as it works who cares why?
The first one. Every time.
@blakeyrat said:But you can still redefine String.Empty to mean "hot latino ass" in C#.
Never tried that. Can't think of why I would either
-
Raymond Chen is doing IT wrong.
-
do you give a crap about why things work and how to architect things better and learning more about your craft
YES! yes i do! how did you knowâ˝
of course i'm not that interested in leanring about nasal demon behavior by virtue of the fact that it is extremely unwise to rely on the behavior of any particular nasal demon as it is allowable to be switched out with any other nasal demon with no warning whatsoever.
that being said things in nasal demon territory can often be quite interesting, i'm just not going to lose sleep over them once i know what they are, why they are and how to avoid them. the rest can be learned later.
-
Never tried that. Can't think of why I would either
typeof(String).GetField("Empty", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.GetField ).SetValue(null, "hot latino ass" );
"Empty" is defined as "readonly", not as "const". For some reason.
-
-
I sense closure, and I feel like we all learned something from this topic.
Well, closures ARE used fairly frequently in javascript. They were bound to turn up eventually.
-
Well duh. What's the point of being superior if no one knows about it?
Relevant quote:
EPA Official: S-sir, I'm afraid you've gone mad with power...
Russ Cargill: Of course I have. You ever tried going mad without power? It's boring. No one listens to you!
-
-
Answers don't onebox because obviously the information you want auto-included when linking to SO is the title and the OP's avatar, not actually any useful answers to questions.
See:
-
Well, I guess that explains it⌠still a
-
The first one. Every time.
No. Sometimes I just need something to fucking work and I don't have the time or energy to worry about it.
-
But once you have got it workingâŚ
-
-
But once you have got it workingâŚ
that's when the bos hands you a new assignment.
if you don't have time/energy to learn right then you'll probably need to wait till it comes round again
EDIT: Hanzo'd
-
that's when the bos hands you a new assignment
-
Why do they have a value named undefined that is distinct from null if they also have the ability to not define a value?
The
undefined
bottom value exists because you can have a declared variable which has no value assigned, or a formal function parameter for which the caller did not provide a value. Thenull
value exists as an explicit, initialized bottom value.The behavior you are seeing with arrays here is not a third kind of ability to 'not define a value'; it's the ability to not define a key.
Arrays are just hash maps with a special
length
property that corresponds with the greatest positive integer property name on the map. Its index accessor isn't even a real index accessor that takes numbers; it's the same string-based index accessor that's used with normal objects. E.g.[true][0] // true, because 0 is cast to "0" before accessing [true]["0"] // true, because "0" is the direct accessor [true]["0.0"] // undefined, because "0.0" doesn't exist as a key [true][Number("0.0")] // true, because "0.0" is cast to a number and recast to canonical "0" before accessing
Most array methods can even be applied to regular objects with no problem at all. E.g.
var obj = {}; [].push.call(obj, "A", "B" "C") console.log(obj) // Object { 0 = "A", 1 = "B", 2 = "C", length=3 } [].slice.call(obj, 1) // [ "B", "C" ]
-
JavaScript is more complicated because it's more simple.
-
JavaScript is more complicated because it's more simple.
Yes. Or as I've heard someone once describe it in a moment of zen: JavaScript doesn't have a few screws loose. Its screws are firmly fixed, but everything else in the language is loose.
-
What is the sound of Javascript clapping?
-
-
-
âś b = new Boolean(false)
< Boolean {[[PrimitiveValue]]: false}âś b.valueOf() < false âś if( b ) console.log("I know b is an object, but... seriously?") I know b is an object, but... seriously? < undefined âś b2 = new Boolean(b) < Boolean {[[PrimitiveValue]]: true}
-
Whenever I think it might be worth learning some Javascript and quitting with the whole "I don't do web development, get of my lawn" stuff, I see something like this and am just baffled that the Web hasn't already collapsed under its own weight
-
Well, I guess that explains it⌠still a
This goes into more depth, minimising the scope of the WTF down to the point where it really belongs.
-
Well, to be fair there's no good reason for ever using using
Boolean
.You can write bad code in any language. It just happens it's easy to do it in JS.
-
there's no good reason for ever using using Boolean
If Boolean.false is a truthy value, I completely agree with you
-
Boolean.false is a falsy value.
But then again so is Boolean.true and Boolean.most_definitely_positively_true.
-
I noticed that on WTFirefox,
new Boolean(false).toString()
returns"false"
, just likefalse.toString()
.
So you canât even differentiate them when logging to the console. Brillant!
-
You can if you hover over the word "false".
In the object case, the word is clickable and will open the object properties panel.
-
âŚtrout slap?
<!-- Emoji'd by MobileEmoji 0.2.0-->
Principal Goodvibes: ...Why'd you just hit me with a trout?
Eris: Because the mackerel wasn't fresh.
-
-
I noticed that on WTFirefox,
new Boolean(false).toString()
returns"false"
, just likefalse.toString()
.
So you canât even differentiate them when logging to the console. Brillant!That would be because accessing a member on a primitive value auto-boxes that primitive value into an object. So
false.toString()
is the same asnew Boolean(false).toString()
.Note also that:
var primitive = true; primitive.member = true; console.log( primitive.member ); // undefined
because
primitive
is boxed into an object, which hasmember
added to it with a valuetrue
and then the boxed object is tossed out. When logging the expressionprimitive.member
to the console,primitive
is again boxed into a new object and that object does not have amember
member.
-
Trout slapping originated in 1995 with internet relay chat (IRC).
Wrong.
https://www.youtube.com/watch?v=IhJQp-q1Y1s
Filed under: Get off my lawn
-
Wrong. There are no trout in that video. Those are sardines and halibut.
-
granted, but it does seem to establish a prior timeline for the idea of slapping people with members of the order osteichthyes.
-
But it's ALWAYS a trout. It's never a "fish".
-
i don't know about you but i rarely have a trout handy. i'm far more likely to have a red snapper on hand.
-
i'm far more likely to have a red snapper
Perhaps you should see a doctor about that?
Continuing the lame joke tradition
-
the fish..... red snapper is the trade name of a species of fish......
-
Don't look:
-
There are no trout in that video. Those are sardines and halibut.
What is a trout, if not the average of sardines and a halibut?
Filed under: a good grasp of scale