|
Leeson Lesson* learned: never use a coffee-based language.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I wonder how this is handled in Typescript?
|
|
|
|
|
The only way to handle this is simply "if (name)"...
Even "if (name === null)" evaluates to true if name is "null"!
And it gets worse "name === undefined" is also true for name is "null"... That's not even close!
Well, undefined === null, but that's just bullcrap.
As is JavaScript
|
|
|
|
|
Which flavour of javascript are you using? I've tried in Firefox, Chrome, IE11 and Edge, and I can't get it to think that "null" is equal to null or undefined at all.
Try this test script: https://jsfiddle.net/bfg9cxg2/[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I just realized I've switched == and !=...
If stupidity hurt I'd be in agonizing pain right now!
|
|
|
|
|
I modified it to test for "undefined == null" and "undefined === null" and only the "==" (double eq) succeeded in being "equal".
Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell
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
|
|
|
|
|
But that's not the point. The test was whether the string value "null" would compare equal to null or undefined , which it doesn't.
"null" === null
"null" == null
"null" === undefined
"null" == undefined
null === undefined
null == undefined
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Yes, I know, and I understood that already. The claim was made that "undefined == null" and "undefined === null" are equivalent and "fail" but they don't. Both are valid well-defined statements and comparisons.
Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell
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
|
|
|
|
|
Running that script in Chrome alerts "Please insert a name".
Even JavaScript isn't that bad. Close, but not quite that bad.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
|
Yeah, that's what I was thinking. What bassakward software is written to see a "null" STRING as a null object pointer. WTF?
Very poorly written software.
And I'm wondering just how real this is?
Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell
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
|
|
|
|
|
Methinks it isn't.
"Null" != "null"; and does it happen to "nulls" also? Come on, a string literal is exactly that, an array of byte in a specific encoding, and it does not magically become a null-pointer.
Sound like something only an idiot would parse in each user-input. Then again, the heir to the throne of idiots may have decided that a NVARCHAR text of 'Null' is actually null. I doubt we will find out.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: Methinks it isn't. Agreed.
Eddy Vluggen wrote: something only an idiot would parse Indeed.
Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell
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
|
|
|
|
|
For websites and stuff to fail like that is really worrying. Shouldn't those just be strings?
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
There's probably some code somewhere in the frontend/backend that's comparing the string to "null" because the developers doughheads decided that was the way to represent (no data) for certain db fields instead of using the more reasonable dbnull field concept.
Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell
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
|
|
|
|
|
TheGreatAndPowerfulOz wrote: developers doughheads
LOL
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Or possibly the management decided that.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
yah, it does sounds like a manager sort of thing to do...
Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell
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
|
|
|
|
|
A new study adds to already compelling evidence that Flash should be retired. On the other hand, it means a lot of people are developing for it (just the wrong people)
|
|
|
|
|
Perhaps the favorite platform for kiddos working in the reverse engineering!
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
The software that Google uses to power its machine learning systems will now be free for anybody to use or alter. Teach your machines well
|
|
|
|
|
A recent Washington Post article entitled "Net of Insecurity" re-bundled old FUD about Linux and the internet's security. Can we get a cage-match?
|
|
|
|
|
Only if you want to get the security pros killed.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Forbes: today: "What Happens If Links Get Copyright Protection In Europe?:" [^]
"According to European Parliament member Julia Reda, this means that “the European Commission is preparing a frontal attack on the hyperlink , the basic building block of the Internet as we know it.”
Reda bases her warnings on a draft Communication from the European Commission to the European Parliament on copyright reform, allegedly leaked to IPKat and released by that outlet last week. Reda asserts based on her reading of this Communication that “the Commission is considering putting the simple act of linking to content under copyright protection.” She asserts that if this happens, “ each web link would become a legal landmine and would allow press publishers to hold every single actor on the Internet liable.” "
«I want to stay as close to the edge as I can without going over. Out on the edge you see all kinds of things you can't see from the center» Kurt Vonnegut.
|
|
|
|
|
That's fine. The rest of the World would simply block EU visitors and move on.
Maybe the final, actual wording will be sensible. Or maybe not.
cheers
Chris Maunder
|
|
|
|