« first day (2410 days earlier)      last day (707 days later) » 
01:00 - 12:0012:00 - 21:00

12:14 PM
@VLAZ why is this?
 
@VLAZ did a C programmer write this?
 
No C programmer would write that nonsense
 
That's my only explanation for the use of integers as booleans.
 
Well, what makes them integers?
Because they used the literals 1 and 0 instead of the symbols true and false?
 
...yes?
 
12:17 PM
That's the same thing :-)
Unless you're a BASIC programmer, then you think true is -1 or something. (Hint: False is 0. True is NOT False. So, True is -1.)
 
@OlegValteriswithUkraine Dunno. Here is the answer.
But that newest answer also reinvented booleans: stackoverflow.com/a/72389330
 
@RyanM reminder that there are no integers in JS :)
which makes the code sample even worse
 
@VLAZ In their magical world, that somehow prints true.
(spoilers: it does not.)
 
do I have to mention the ungodly unguarded for..in loop?
 
errr wait
hang on
that literally only works if the values are also the array indexes or not?
 
12:22 PM
it technically works on everything, although I guess the author never heard of own properties, so...
 
@RyanM Yeah, I sort of rage closed the page soon after.
@RyanM Works on arrays. But it's bad practice. There is another problem, though, it only goes over indexes of a, so [1, 2, 3] and [1, 2, 3, 4, 5] are equal.
 
@VLAZ haven't you heard? all arrays are born equal!
 
I'm generally opposed to deleting answers simply because they're wrong.
But at the same time, I'm not sure there's value in several pages of wrong answers...
 
frankly, I'd cull most of this canonical...
 
Have I ever stated the opinion that JS is horrible?
 
12:27 PM
@OlegValteriswithUkraine And a is more equal
 
@VLAZ well, some are just more equal than others
 
"To compare arrays, loop through them and compare every value." This, alone, is ridiculous!
Not even a C programmer would do that.
 
@CodyGray I thought you wanted to leave C++ behind and only write JS.
 
@Cody Any philosophical objections to the removal of some of the wronger answers here?
You have more thoughts on when answers should be deleted than I do.
 
like showing mercy for the wicked?
 
12:31 PM
When they suck.
No, I have no objections to removing low-quality useless answers.
 
I suspect many answers are repeating existing solutions, too.
But I don't have the time right now to go through all the answers.
 
When a question gets a "More than 30 answers posted to this question" auto-flag, I like to go through and clean up as many of them as possible.
 
my eyes are bleeding. I haven't opened this canonical in a long time...
 
But that often requires domain expertise, and most of the questions that get that many answers lie far outside of my expertise.
 
@OlegValteriswithUkraine Kind of why I rage closed the page. For the second time.
 
12:33 PM
You almost never see 5 answers posted to a C, C++, or assembly question, much less 30.
 
there are also answers that modify the built-in prototypes, for Christ's sake.
The whole canonical is an unholy abomination and needs to be cleansed with fire
this is utterly ridiculous: stackoverflow.com/a/25629360/11407695
 
^ It's why I followed it. I meant to go back and vote on most of the answers. I just...forgot.
 
See, it's not obvious to me why that's wrong
 
[adjustment: "was" ridiculous]
@CodyGray well, the comments basically provided the reason: ["1","2"].join() === ["1,2"].join()
 
@CodyGray .join() converts the array to a string by concatenating all the members with comma as separator. [1, 2, 3].join() gives you "1,2,3"
 
12:38 PM
same goes for all the "just call toString" answers...
 
Yet, comparing the strings produced in no way means that the content is the same. The following arrays also produce the same result when concatenated: ["1", "2", "3"] (array of strings, not numbers), ["1,2", 3]
And yeah .toString() just calls .join()
Also, String(arr) calls arr.toString(). I saw at least one answer that used the String function.
 
oh, there is also ""+arr! As if that was any different
 
I see. Then, yes, it's obviously wrong because it mixes types.
Maybe I need to give up C++ and try Ada.
 
so many of these are not checking the order
 
It's only correct if the arrays have the same amount and type of items. Which is not validated.
 
12:40 PM
how are there so many of them
 
welcome back to the wild west of JS, my friend
 
ah this one (screenshot) uses colons instead of commas to join the string together, that totally fixes it!
 
One of the answers I linked to basically said "this is what worked for me". It's just people hacking around to find something that sort of works. Maybe in their specific case.
 
> for scenarios complex than this example you can use some other separator
> comparing objects for. equality is a complex problem and best thing is to use underscore or lodash library methods
!!!!!
Imagine if comparing objects for equality was a complex problem.
 
unimaginable!
not to mention that even comparing arrays is comparing objects in JS
 
12:44 PM
The thing is, I don't know if it actually is a complex problem in JS
 
well, -ish
I mean... it's a bit more involved, but that's not a hard problem
 
stackoverflow.com/a/54362323/208273 "Here is a very short way to do it" short, overcomplicated, and wrong! Ignores the order.
 
wtf testing framework has to do with this question? stackoverflow.com/a/65472277/11407695. Christ
 
@OlegValteriswithUkraine I thought that was okay since it is comparing arrays in a specific scenario in JavaScript.
not, y'know, great. but okay.
Better than the other ones that don't even do the thing in any situation.
 
oh, sure, it's certainly better than that :)
 
12:48 PM
Seems about as helpful and relevant to that question as an answer showing how to compare arrays in a sane language like C++.
Spoiler alert: arr1 == arr2
 
well, if JS had arrays in the first place, that would be a different matter
 
Does the compiler generate complicated code that loops through every value in the array and compares it for equality? Maybe! Is that what compilers should do if that's what is required to accomplish the thing you asked them to do? Yes!
"JS doesn't have arrays; the answer to this question is 'mu'."
I anxiously await your contribution, Oleg.
 
Anyway, I deleted, um, a bunch.
 
Sorry, not a cow sound. A Douglas Hofstadter sound.
 
12:51 PM
sigh.
 
@CodyGray wut.
 
Ah.
 
(I had originally typed "moo", which is the sound a cow makes, instead of "mu", but I suspect that was not the point of confusion.)
 
It was not.
 
12:56 PM
map, reduce, filter everything! :P — Thoran Jul 16, 2016 at 12:56
 
> and the order is matter
So this only works in Physical JS, where you're dealing with physical matter?
 
@OlegValteriswithUkraine Why are all the nonsense languages you find always described using an East Asian script?
@OlegValteriswithUkraine None of the downvoters could think of a single flaw with the answer to point out.
 
@OlegValteriswithUkraine Here I was trying to figure out why it was wrong...and then I looked at the function signature.
 
@CodyGray ¯\_(ツ)_/¯ maybe they have more fun than we do?
@CodyGray including me - I am a bit... speechless. Let's start with this always hitting the worst-case O(n)
 
1:07 PM
@OlegValteriswithUkraine Someone must be having more fun than we do, because we really don't seem to have all that much.
 
@RyanM are your eyes all right after that?
 
oh, I also missed the function signature
 
If a sentient pair of glasses missed it, I'm not doing so bad.
You can you some function as well which will not iterate completely if we get the required condition satisfied, like above — Vasanth Mar 8, 2017 at 14:42
...what?
 
is that English?
 
There are no deleted comments, for the record. That's the only comment that's ever been there.
 
1:10 PM
@RyanM Nah, that's not a fair argument. I tend to read the paragraphs of text without looking carefully at the code blocks.
 
I think it translates to human as "can you change the function to stop before it iterates over all elements if a mismatch is found", but I am not sure
 
It's what we authors call an "afterword" :-)
 
stackoverflow.com/a/48264990/208273 I have so many questions. Why is the variable you store the result in called isBool? Why are you calling .sort().join() before passing them in?
 
also, if I am going to see another <some boolean> ? false : b, I am going to start crying
 
Why did you write if (condition) { return true; } else { return false; }?
 
1:13 PM
I think I might start crying sooner than I thought
3
 
I've heard the argument that code like the above is actually clearer and easier to read
 
Okay, it's now down to 2 pages of answers. I'm declaring victory.
 
@CodyGray than return condition;? :)
 
Yes
 
1:15 PM
And b ? false : true an improvement over !b.
Writing code for people who do not know how to read code
 
@CodyGray while I may concede the if (.... rather than return ... point, that's just worse.
 
The other argument was, ! is very hard to miss
So spelling it out in "long form" is better
 
ternaries are, for all their benefits, not known for increasing the readability of code.
@CodyGray s/hard/easy/?
 
Ah, there's where we disagree :-)
I actually think conditional operators do make code easier to read in a lot of cases
 
I do like them, FWIW
 
1:18 PM
Because you can scan vertically, whereas a bunch of if/else are visually much noisier
 
Kotlin doesn't have a ternary operator and it's terrible.
 
> innerHTML
dang it
> Lot of good answers here
^ nope. Not at all. Nope.
 
I got you motivated to do a full audit of innerHTML usage?
I welcome all PRs :-)
 
@CodyGray that got stuck in the buffer from the above discussion :) re: PRs - would love to once I stop bursting with things to do...
and once my eyes heal a little after today
 
haha
You are telling me about having a lot of things to do.
This is like me telling you about living in a country with a broken government
 
1:32 PM
True that. Joking aside, I do start to feel that the backlog is going to overflow soon...
 
I can assure you that it doesn't
There's never an overflow
You just start to forget
 
isn't that the overflow?
 
Ah, so it just calls shift!
 
Oh, maybe that's the overflow
I assumed the overflow would cause incoming tasks to be rejected
 
That's why I had to be reminded today it's thursday already
 
2:23 PM
> Javascript - How can I accurately extract words from a lowercase string? for example, "thisisatest" => "this is a test"
I'm not sure that's a focused enough problem for SO. I mean, solving it for that string and maybe a few strings of similar length and complexity. But a general solution to the problem seems very hard.
The question is also tagged . However, doesn't actually show any regex usage (it has the mandatory code offering)
 
i think it's focused enough
it's just unanswerable
 
Hmm, or maybe I'm overthinking it. The question takes it as a given that it has an array of all words. Perhaps it's just a matter of trying all possible combinations of words and figure which combination fits the input. It's not trivial but not really impossible.
 
well, if you know it's a string, you wouldn't necessarily need an array of all words
 
Maybe there is a backtracking algorithm that can try subtrings.
 
just common... joining words
"is" and "a" in this case
 
2:29 PM
"redcarpassedme"
No joining words
 
it'd have a preceeding a, at least
now you can begin looking at word endings
 
Although I just realised that the string could be broken down into "red carp assed me"
 
how many verbs are there, if we stick to standard english ratehr than mad eup verbs
though you could still apply the tense endings to them
to cover non-standard
 
@KevinB I see you ran this sentense through the proposed program :)
 
cough therapist cough… — deceze ♦ 9 mins ago
 
2:35 PM
@VLAZ I don't even want to know what this algorithm would do to "therapistsareusuallyfriendly"
 
depends on how much it prefers joining words
 
It's safer to start with the longest match, then take the next longest, etc. If it finishes and there is non-matchable string at the end, it should backtrack and try the next possible match instead of the last one. Repeat until exhausting options. If so, backtrack to the second to last match and try all possibilities again.
thisisatest => this + isatest => this + is + atest => this + is + at + est => (backtrack)
 
"moonshinedbrightly"
Hmm, incorrect
Sorry
 
It wouldn't guarantee that the sentence makes sense afterwards, though. E.g., if you get something like "is at" but was supposed to be "I sat"
 
what would come after I sat vs is at
 
2:42 PM
Can't think of a good example. However, once you have the pool of possible sentences, you might be able to eliminate ones based on grammar.
I'd just make it give you all options. It's probably not going to be overwhelmingly many.
@OlegValteriswithUkraine "moonshined brightly" -> "What did did you do last weekend?" :P
 
not brightly, but still :)
 
3:25 PM
Ugh "Seeking recommendations for books, tools, software libraries, and more" when the question is asking "using <some library> how do I accomplish <this task I have code for>". I sometimes wish there were anti-close votes.
 
"Help me ..." -> "Can you help me ... please?" — Paul Sanders 2 days ago
:facepalm:
 
we do have anti-close votes
you just have to randomly find the question while in review
 
That just removes it from the review, it leaves the close vote on it.
 
good enough
 
I'm thinking of something that cancels them out for being stupid.
 
3:34 PM
that's too much power for ordinary users
 
What can go wrong?
 
as long as the "vote to close" button stays
 
lol
 
@KevinB Technically, it does. It has all the required letters at mostly the correct places.
 
Unrelated, today in "people are so sarcastic that the unfriendly robot thinks praise is unfriendly": "What a superbly written question" was flagged as possibly unfriendly.
...and honestly, I had to look at the question to tell if that was sarcasm or not, so...
 
3:45 PM
xD
 
lol
 
(It was not. The question is, indeed, very well-written.)
 
the comment on the other hand...
 
What a superbly valuable comment
 
Well, I needed to know whether to pick "Delete" or "Decline and delete" :-)
@VLAZ here, I found one for you in the robot-flag queue:
> Voted to reopen. Closing this it the ultimate counterproductive pedantry. Yes, the question doesn't have words that end with a question mark, but it's clear from the text what the question is. Sigh. No wonder newbies think this site is hostile.
 
3:49 PM
I think that falls somewhere under community-specific
 
Ah, da Vinci's Vitruvian Turtle. — cdlane yesterday
Okay, that one's funny.
 
It is, I did indeed laugh out loud
 
I did too.
> if u give ur email i ll give u solution.. got very much friends in ireland (they are as much drunkards as we czechzs are ) buddy i love u all i was born on metallica and oizzy osborne. my email is [redacted]@gmail.com since last month i was softwaew developer for czech technical university.. industrial robototics. i wanna help u
I am once again begging people to please not drink and comment on Stack Overflow.
 
oizzy
 
(Naturally, the question this was posted on is nearly 14 years old...)
oh dear, this is amazing...some other selections from their comments that day:
> as i said i m drunk. u can use my nuget package.. [redacted]Library. i wanna update it.. it is completly free.. i made my living with medical technologies.. cuz i am ia m a medicinae universal doctor.. hope u ar so smart and u can speak latin :)
> i am using for this attachmend propertiees. sorry mN / WOMAN I AM DRUNK got reall\y baD DAY. WANNA HELP. [redacted]@gmail.com if u need some more
 
3:57 PM
@RyanM this suggests that the comments might have been in Latin. Not sure if that's better or worse.
 
It was on their answer, which started off with the phrase "try to use this.. i am necromancer. cuz iam here oncee for 6 years"
 
i mean
at least they're being somewhat inclusive
 
Fun Linguistics fact: "necro-" is "dead" and "-mancy" is a suffix for generally divination magic. So, "necromancer" is somebody who uses magic that sort of has visions either by using the dead (e.g., chicken entrails). Basically, a card reader just...without cards.
Same thing for "pyromancer" - it's one who uses fire to try and tell the future (or some other hidden facts).
At least that's the linguistic roots of the words. Nowadays "necromancer" is somebody who controls the dead and "pyromancer" is somebody who controls fire.
 
This comment is useless and unnecessary. — Levente Mészáros yesterday
 
@VLAZ it's as if... English had roots in Latin, who'd have thought :)
but yeah, it's kind of fascinating how progenitor languages had assigned explicit meaning to words that was made implicit by derived languages
 
4:24 PM
OMFG
9
Q: New stacks editor discards all contents

DharmanThe new stacks editor destroys content in the most drastic way possible. It seems that if HTML tags are used the whole content is discarded. Tested in Chrome 101 on Windows 10.

This reminds me that I wanted to try and find a way to get around the super broken "undo" feature in the normal editor.
 
Wait, new users on SO are forced to use that editor?
 
@VLAZ It's worse in the new one!
@cigien Yeah, in the ask wizard test
 
Hmm, "ask wizard test"? But forcing anyone to use that, in any situation sucks.
 
...I think. I'm having trouble finding it.
Found it
134
Q: Feature Test: Ask Wizard for New Users (trial has completed)

Yaakov EllisThis experiment was live from 2022-03-21 14:20 UTC until 2022-04-06 12:00 UTC. Initial data from the test looks to be positive. We plan on doing some bigger data analysis on the results and will post it on Meta Stack Overflow when this is completed. We will soon be turning on an experiment on St...

See the "I notice that the wizard is using the new Stacks Editor." section
 
 
4:33 PM
Dang, I upvoted that MSO post. I really need to pay more attention to things :(
 
So no one is currently forced to use it, but users in a recent A/B test were.
 
I just hope they don't try to force it on everyone.
 
> We are planning on moving forward very soon with fixing outstanding issues with the Stacks Editor, with the goal of getting it ready for wider use. Using it here will be a new area for testing, and additional impetus to make sure we fix things. That said, this does not mean that we are as of yet committed to opening up the Stacks Editor for wider use on Stack Overflow or other sites on the network.
It seems like they want to but are aware that that would be a problem in its current state.
 
4:50 PM
What on earth is this...
-4
Q: Why does this code print characters that aren't numbers?

Tyler Baerlocherfor a in i: for b in i: for c in i: for x in j: for y in j: for z in j: for k in range(50): for l in range(50): for m in range(50): if (k*a)**x+(l*b)**y==(m*c)**z: if k>0: ...

 
@VLAZ yikes!!
@VLAZ yeah, annoying as hell as not all actions are, apparently, counted - I wonder how hard was it to just maintain a stack of actions...
 
@OlegValteriswithUkraine Or, radical idea, just not do anything at all and leave the default undo.
 
Probably not possible, since it's not just a textarea (or whatever it is in HTML).
 
@RyanM yeah, it is a textarea
 
Wait, even the WYSIWYG editor? Or do you mean the old one?
 
4:55 PM
The old one
 
in which case, yeah, I don't really understand why it doesn't work out of the box.
 
@RyanM the old one
 
@RyanM SE have some code to do their own Undo
 
5:23 PM
Uh, OK, so I found a trick that disables the undo functionality but...it disables it completely. If you add ?noundo to the URL of the page, then the UndoManager is not created.
So, you don't get the broken undo. You just don't get any undo.
Oh, also, it doesn't need to be in a query parameter. It just needs to be anywhere in the URL. So, congrats - if you visit a question with a title that results in "noundo" in the URL, then undo doesn't work at all there.
Wait, sorry, my bad. It's actually literally only ?noundo which disables it. Missed the question mark.
 
I see. [melancholically writes down another userscript idea]
 
I thought disabling UndoManager would just re-enable the normal undo/redo functionality. How is that disabled, in that case? I saw the event handler for Ctrl+Z/Ctrl+Y that triggers the custom actions but not what disables the default ones.
 
5:44 PM
frankly, no idea...
 
I'll be digging later, I think. Time to have a couple of beers.
 
that's a venerable occupation :)
 
 
1 hour later…
6:48 PM
Right, so accidentally, the user wrote this recursive function that works like it should. Without actually understanding how it works or why.
I'm only bringing it up because it seems to happen at some regularity. Users come here asking how or why their code works after they've already written and used it.
 
7:02 PM
@VLAZ to be fair, I occasionally wonder how some of my code ever worked.
 
often, the case is it never actually worked the way you thought it did
 
7:49 PM
Hello, guys 📣
 
 
1 hour later…
8:54 PM
@Catija Thank you for the update!
 
Sure :)
 
01:00 - 12:0012:00 - 21:00

« first day (2410 days earlier)      last day (707 days later) »