Stack Overflow making me nervous

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
User avatar
eekee
Member
Member
Posts: 891
Joined: Mon May 22, 2017 5:56 am
Location: Kerbin
Discord: eekee
Contact:

Stack Overflow making me nervous

Post by eekee »

It seems every time I see an answer on Stack Overflow regarding something I know, there's a highly-upvoted answer with something I know is wrong. Here is a question on web cookies where the second answer cites an RFC which is practically a work of fiction; it never matched actual practice.

Is Stack Overflow more trustworthy on deeper, non-web-related software questions? Or should I just be very careful which answers I pick?
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
nullplan
Member
Member
Posts: 1790
Joined: Wed Aug 30, 2017 8:24 am

Re: Stack Overflow making me nervous

Post by nullplan »

StackOverflow is as trustworthy as any Internet resource, such as this forum, Wikipedia, Ask.com, the usenet, etc. They are all as trustworthy as their members/editors. Consider any information from there unverified opinion until it is actually verified. Anyone answering you might be talking out of an organ not typically used for that, or might be the world expert on the topic, and you have no way to know.

However, any time I've hit them up in the past, the answers they provided were at least correct (whether they were helpful is a different question). That said, I've typically searched for things regarding C or C++, and the answers typically consisted of liberal amounts of quoting from the standard. Or linking cppreference.com.
Carpe diem!
User avatar
Schol-R-LEA
Member
Member
Posts: 1925
Joined: Fri Oct 27, 2006 9:42 am
Location: Athens, GA, USA

Re: Stack Overflow making me nervous

Post by Schol-R-LEA »

I agree with Nullplan on this; you should never take any source as definitive (on the Internet or off) without some sort of verification. In some cases, you have to take an answer on faith when it is the only answer available, but don't be surprised if it turns out to be wrong.

As for Sewage Outflow, well, as you can guess I have my own issues with the site, given what I call it. However, the major problem I have with it is less about the replies, and more about how those answers are often misused; 'coding by Stack Overflow' is a known problem, here and elsewhere. Also, the relative lack of dialogue ensures that it is harder to identify and address instances of the XY Problem than in a more open-ended forum.

I am certain that Solar will be by soon to defend the site, and he's got better reason to than most; if you really want to know about the pros and cons of S-O, talk to him.

Having said that (and talking about your toxic web sites), I want to mention in passing that the question of cookie size limits came up briefly in the discussion of the classic Daily WTF article "Tossing Your Cookies" (Not Safe for Sanity, given how terrible the code in question is). Not that the horrible piece of code in question didn't have enough problems as it was, but it did lead a few to ask whether the poisonous cookie being generated was even viable in the first place. That program is so bad it almost counts as both a psychohazard and a cognitohazard; phrases such as "I refuse to believe that's production code" came up repeatedly in the comments. ~'s code is elegant in comparison to this eye-raping monstrosity, and the code itself isn't even the Real WTF (the way it stores a SQL query string in a cookie and then retrieves it for execution is).
Rev. First Speaker Schol-R-LEA;2 LCF ELF JAM POEE KoR KCO PPWMTF
Ordo OS Project
Lisp programmers tend to seem very odd to outsiders, just like anyone else who has had a religious experience they can't quite explain to others.
User avatar
eekee
Member
Member
Posts: 891
Joined: Mon May 22, 2017 5:56 am
Location: Kerbin
Discord: eekee
Contact:

Re: Stack Overflow making me nervous

Post by eekee »

nullplan wrote:StackOverflow is as trustworthy as any Internet resource, such as this forum, Wikipedia, Ask.com, the usenet, etc. They are all as trustworthy as their members/editors. Consider any information from there unverified opinion until it is actually verified. Anyone answering you might be talking out of an organ not typically used for that, or might be the world expert on the topic, and you have no way to know.
Yeah... this reminds me to be extra careful to test thoroughly and not just trust. I'm not actually very good at testing, but I'm better at it than I am at comprehending some standards.
nullplan wrote:However, any time I've hit them up in the past, the answers they provided were at least correct (whether they were helpful is a different question). That said, I've typically searched for things regarding C or C++, and the answers typically consisted of liberal amounts of quoting from the standard. Or linking cppreference.com.
That would be useful to me in saving time and frustration searching. Yesterday, I got a little frustrated searching the Intel x86 SDM for the significand sizes of floats. They weren't in section 4 which I understood specified floating-point things, they were in the section which specifies FPU-specific details. And binary representation of floats is something I'm much more comfortable than with some language details.
Schol-R-LEA wrote:I agree with Nullplan on this; you should never take any source as definitive (on the Internet or off) without some sort of verification. In some cases, you have to take an answer on faith when it is the only answer available, but don't be surprised if it turns out to be wrong.
I hear you. It wouldn't be my first time for that kind of surprise. I remember there were one or two things when I was still at school, long before residential Internet access. These were published facts, but I was pretty sure some of the logic didn't add up. They may simply have been poor explanations... in fact, I recall figuring out an explanation was illogical but the fact bein explained was correct. When I'm not trying to get something done, I rather enjoy these things as challenges. (Last night, I got an idea to investigate regarding Fourier transform of square waves, but it won't be easy.) The trouble comes when I am trying to get something done.
Schol-R-LEA wrote:As for Sewage Outflow, well, as you can guess I have my own issues with the site, given what I call it. However, the major problem I have with it is less about the replies, and more about how those answers are often misused; 'coding by Stack Overflow' is a known problem, here and elsewhere. Also, the relative lack of dialogue ensures that it is harder to identify and address instances of the XY Problem than in a more open-ended forum.
I haven't been a disciple of Duct von Tape for many years, but I can appreciate the temptation to just accept an answer. The XY Problem is a tricky issue. I've been blaming it for the bloat of Unix core utilities for longer than I've been aware of its name. I can fully understand why people do it, but I also understand how deep it goes if you really think about it. A friend (of sorts) took it to the point of saying "trying to use a computer for these things is the problem." :lol: He now writes his novels with a typewriter and he's happy with that. He also maintains several websites, so he hasn't given up on computers entirely. I was never quite clear what he meant by "these things". Anyway, this sort of thinking is why I got into Forth as an operating system, I thought it would cut out a lot of complexity and prove it unnecessary. I wasn't ready to abandon computers, but I hoped to prove much of traditional operating systems, languages, and GUI foibles to be extremely deep cases of the XY Problem. ;) Unfortunately, Forth brings its own complexity in the form of a broad and deep knowledgebase you have to have before you can fluently write good safe code.
Schol-R-LEA wrote:I am certain that Solar will be by soon to defend the site, and he's got better reason to than most; if you really want to know about the pros and cons of S-O, talk to him.
I am a little surprised he hasn't turned up, but I have been using his time on another issue. Besides, I think it's covered by your and nullplan's replies.
Schol-R-LEA wrote:Having said that (and talking about your toxic web sites), I want to mention in passing that the question of cookie size limits came up briefly in the discussion of the classic Daily WTF article "Tossing Your Cookies" (Not Safe for Sanity, given how terrible the code in question is). Not that the horrible piece of code in question didn't have enough problems as it was, but it did lead a few to ask whether the poisonous cookie being generated was even viable in the first place. That program is so bad it almost counts as both a psychohazard and a cognitohazard; phrases such as "I refuse to believe that's production code" came up repeatedly in the comments. ~'s code is elegant in comparison to this eye-raping monstrosity, and the code itself isn't even the Real WTF (the way it stores a SQL query string in a cookie and then retrieves it for execution is).
I had a look at that, got a few grins from reading the comments especially. I like reading about terrible code, although not so much the code itself. :lol: And yeah, it's such a wonderful example of security! :lol:

Thanks guys!

Edit: Almost forgot, but not sure how: SQL has true, false, and true2? That's a WTF in itself. :D
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: Stack Overflow making me nervous

Post by PeterX »

eekee wrote:SQL has true, false, and true2? That's a WTF in itself. :D
Where did you read that? It has true, false, unknown and the non-value NULL.

Greetings
Peter
User avatar
eekee
Member
Member
Posts: 891
Joined: Mon May 22, 2017 5:56 am
Location: Kerbin
Discord: eekee
Contact:

Re: Stack Overflow making me nervous

Post by eekee »

PeterX wrote:
eekee wrote:SQL has true, false, and true2? That's a WTF in itself. :D
Where did you read that? It has true, false, unknown and the non-value NULL.
It was in one of the comments. It might have been something specific to SQL Server in or before 2005.
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
nullplan
Member
Member
Posts: 1790
Joined: Wed Aug 30, 2017 8:24 am

Re: Stack Overflow making me nervous

Post by nullplan »

eekee wrote:Edit: Almost forgot, but not sure how: SQL has true, false, and true2? That's a WTF in itself. :D
Clean your glasses, that comment was about varchar2. Which is a string data type, so of course it has every combination of characters you can imagine. Now, that a varchar2 and a varchar even exist, that is a WTF, yes.
Carpe diem!
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Stack Overflow making me nervous

Post by Solar »

eekee wrote:
Schol-R-LEA wrote:I am certain that Solar will be by soon to defend the site, and he's got better reason to than most; if you really want to know about the pros and cons of S-O, talk to him.
I am a little surprised he hasn't turned up, but I have been using his time on another issue. Besides, I think it's covered by your and nullplan's replies.
:lol: :lol: :lol:

Nah. I'm not going to defend SO much. It's like going to the coffee machine and asking coworkers about an issue; many a time you will get good advice, many a time you will get some cargo cult stuff that someone who really knows will turn his eyes up at in disgust. But it's better than trying to brute-force a problem without asking anybody at all.

This is my "favorite" example from the realm of "all the world is (assumed to be) ASCII-7". ;-)
Every good solution is obvious once you've found it.
User avatar
eekee
Member
Member
Posts: 891
Joined: Mon May 22, 2017 5:56 am
Location: Kerbin
Discord: eekee
Contact:

Re: Stack Overflow making me nervous

Post by eekee »

Thanks guys!

@nullplan: That was a different comment. I may have wasted a lot of time on those comments. ;)

@Solar: Fair enough! Most of those answers don't know about the problems, do they? (Or they didn't in 2013.)

I ended up browsing SO/SE at random because I was so tired. Like Wikipedia, it's a great site for relatively unimportant trivia, isn't it? ;) Plus there's the "worldbuilding" sci-fi board I would probably spend most of my time on if I was 20 years younger.

All that timewasting did turn up one relevant gem:
For an embedded device, I have a hacked compiler that uses 0x20000000 as representation for NULL, with an XOR operation (which fits into a single instruction on ARM) to convert between pointers and integers. This avoids at least some of the problems with having interrupt vectors at address 0 and no memory protection. – Simon Richter 12 hours ago
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
Post Reply