- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
One frist post available, only 2569 of the same posts on the clock. NO ACCIDENTS! Unlike Discourse.
Admin
JetBrains WebStorm obviously wants to be emacs.
Admin
The frist time I read the article, I thought it was another Steam error... But google maps is pretty terribad, it has to be said.
Admin
Seeing that 'discover Ontario' thing reminds me of a visitor centre I travelled through on my trip through the US last summer. A publicly accessible computer with limited internet access... running Windows 98 and IE 6.
Admin
Admin
Engrish strikes again?
Admin
And yet the word "Press" is used in the following line.
Admin
And yet no mention of an Any key.
Admin
Admin
Half of them speak that evil spit talk from across the Channel.
Admin
It's weird. I find myself living surrounded by foreigners, who seem to think that I'm foreign or something, when it's quite clear that I'm English and therefore can't possibly be foreign. It's quite logical - if I was foreign, then I couldn't be English, and I am English, therefore I'm not foreign, therefore it must be them who are foreign.
Admin
I saw this in the "New Post" list and I thought someone was making fun of @codinghorror's car / truck analogy and all I got was this stupid Error'd.
Admin
+1, that thread, etc.
Also, that should be a T-shirt.
Admin
I'd buy that as TDWTF merch.
Admin
Admin
How do you ever manage to can't math that hard and still stay in business?
Admin
You must be new here. We see this level of math fail in the real world all too often.
Admin
Also, Javascript ain't helpin'
Guess what happens!
Admin
Undefined?
Admin
Amended. It's
min
andmax
, notMin
andMax
. Bleurgh. Too many languages.Admin
Yes, that's a strange one. Infinity > -Infinity.
Admin
It's actually correct, in a weird way, due to fucking JS "helping" you.
max
andmin
return the largest and smallest number in an array. In order to support arrays of length 1, they already have an array with-infinity
andinfinity
, respectively, stored in them. That way, no matter what you pass into it in an array of length 1, it will give you that number back (since it will be compared to one of the infinities).But... You can pass an empty array. Or, in this case, nothing, which gets converted to an empty array... Guess what you get back in that case.
Admin
That makes sense, it's not something I'd ever actually looked at the mechanics of before now, and I could totally see me doing something similar with similar unexpected side effects.
Though I think I'd baulk at an empty array coming in rather than returning a phantom element that isn't reaaaaaaally supposed to be there.
Admin
Yup. But that's JS for you.
Admin
FWIW PHP is slightly more sane. Calling
min()
ormax()
without parameters generates a warning but otherwise the value ofNULL
which means in PHPmin() > max()
is false, but so too ismin() < max()
.You know it's bad when PHP is more sane.
Admin
I've never heard of WebStorm, but I'm assuming from that keyboard shortcut that it's some sort of 1990's console fighting game, and the "project" is a cheat far more exciting than a simple god mode.
Also, Discourse is fun - it only remembers part of the post you've started typing when you pop back to check the details on the previous page. Regular HTML text fields are for beginners, right?
Admin
That's a VERY specific Netflix category... >_>
Admin
It's not really all that strange. It makes sense for an n-ary operation to return the identity for that operation when called with zero arguments. For addition you'd have
and for multiplication:
I don't know whether JS provides those functions, but that's the way that, e.g., Common Lisp does it (see + and *). When a function takes any number of arguments, mapping the zero argument case to the identity element makes a fair amount of sense. You get associativity for free. E.g.,
Admin
Yes, but there's stuff like this that's intentional and documented.
And there's JavaScript.
Admin
Discocurse - The Shittiest Forum software in the World!
Admin
I love a good gripe about undefined and undocumented behavior too, but this isn't it. The behavior of min and max is clearly described in the standard on page 163 (emphasis added):
Similarly for min, on the same page:
Admin
Wait, JavaScript has a standard? When did that happen?
Admin
Well I'll be a... how did I not know that?
Oh.
Admin
The latest release of ECMAScript, informally known as JavaScript, was 5.1 in 2011, according to Wikipedia, and "The first edition of ECMA-262 was adopted by the Ecma General Assembly of June 1997". So it's had standards for 17 years, now.
Admin
Nominating for the whoosh badge.
Admin
Maybe it went over my head, but in a thread where it's clear that people aren't aware that the behavior is specified, and in a field like browser extensions where many things don't have a formal specification until well after everyone's got their own versions, each with their own quirks, it's not impossible to have the impression that something is an ad hoc standard without a formal specification.
Admin
Yup, it kind of did.
I'm well aware that JavaScript has a specification though standards-adherence is questionable. I wasn't aware that this specific behaviour was documented, but given the questionable standards-adherence it could just as easily be one of the many quirks of the language.
The whole 'JavaScript has a specification" was basically a joke because it never seems like it even though it has had for some years. We have a very strange mentality here and pointing to things like sources to back up your claims is... usually not right laughs
Admin
Disturbingly so.
Admin
So I guess that data entry errors and Netflix easter eggs are IT errors now.
Admin
Why do I get the feeling HR is looking into whether "nephrotic adventures featuring very tiny children" is considered SFW right now.
Admin
Reminds me of the old "anglais" mod file "Vous etranger?" "Non, je suis anglais."
Admin
Ugh, "The Frozen" I really hate those scam movies. I've previously sent feedback to Netflix that having them lowers their lower to me, because of having to wade through crap, and makes me think of cancelling.
Admin
The Netflix one was for their April Fool's Day prank. Search for the phrase and you'll find that for that day, they pushed a number of "disturbingly specific" categories.
Admin
This, however, is an actual thing. Saw the DVD at Barnes & Noble last night:
[image]Admin
That's kind of frightening. At least when Team America has that musical at the start where everyone has AIDS, it is at least satire of the musicals genre. This is just offensive.
Admin
How so?
http://www.imdb.com/title/tt0481580/
"Follows five autistic children as they work together to create and perform a live musical production."
Admin
As an autistic person, I can confirm that @Arantor is offended by my kind.
Admin
As a partially autistic person, I too can confirm that I am offended by your kind. :stuck_out_tongue:
Seriously, though, I thought it was a spoof documentary looking at the cover, but I retract my offended nature because it does seem legitimately good.
Admin
How does that work? There are a lot of different shades of autism. Are you saying your shade is partially transparent?
Admin
I'm saying that I present on the spectrum probably to a lesser degree than you do.