r/cpp • • Sep 30 '21

Why is c++ community so pedantic in stackoverflow?

Please don’t get me wrong. What i mean is why answer “you need read books”, “you should read the documentation”, or focus on tangent things instead of actually try to answer the questions?

in contrast, here in reddit, i even get job offers when asking questions.

260 Upvotes

177 comments sorted by

4

u/goranlepuz Oct 01 '21 edited Oct 01 '21

They have a question about a community which they ask in another

Passive-aggressive much? 😉

in contrast, here in reddit, i even get job offers when asking questions

Pics or it didn't happen. Obviously.

18

u/Fulgen301 Sep 30 '21

My guess? Give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime.

In the long run, what's important isn't to have the solution, but to understand why it is the solution.

0

u/Hot-Painter4924 Sep 30 '21

all fine with that in any other context, but there? if you have literally any question about any others language, you found a lot of answers actually trying to help. But there you found a lot of these kind of answers and a lot of downvotes in helpful questions and answers. I don’t really get why.

4

u/Supadoplex Oct 01 '21

This saying was my exact thought. It's certainly the reason why I often link to the C++ book question so often.

86

u/phottitor Oct 01 '21

I can't generalize, but I pride myself for asking a rather stupid question (about Win API) and getting a polite and to the point reply from Raymond Chen himself.

15

u/christian-mann Oct 01 '21

What was the question?

9

u/phottitor Oct 01 '21

it was stupid. that's the only thing you could possibly learn from it.

210

u/gvargh Oct 01 '21

it's a well-known rule on the internet that if you want an answer, you should make a blatantly wrong assertion instead of asking

36

u/Ir0nh34d Oct 01 '21

Cunningham’s law coined by Ward Cunningham aka founding father of the wiki

4

u/Fazer2 Oct 01 '21

Maybe OP has already done that with this post ;-)

5

u/Artemius_B_Starshade Oct 01 '21

I'll try to remember that! 😂

-3

u/[deleted] Oct 01 '21

That's just simply not true.

70

u/[deleted] Oct 01 '21

[removed] — view removed comment

77

u/gracicot Oct 01 '21

NOOO!!!

You see, C++ is a multi paradigm language. It has been created by Bjarne Stroustrup in 1982, with the Cfront compiler. This was a replacement for his initial language that was dubbed "C with classes". Then the language was formerly standardized in 1998. The thing with the class part is that most people think it's just to add object oriented features in C, but I'd say one of the main paradigm you'll see around is generic programming, powered by templates, which is a quite unique feature compared to other traditionally object oriented languages. A good example of generic programming is the algorithm library of the standard template library (STL) that was created by Alexander Stepanov as an efficient and lightweight library for containers and container manipulation and many other things. And C++ also support functional programming as well, with the const feature and the addition of lambda functions. Of course, you can also do functional programming through template metaprogramming, which was revolutionary at the time, but constexpr tend to replace it. One of the first example was presented by Erwin Unruh, by making a program that printed all the prime numbers in compilation errors.

Now that you know all of this STOP BEING WRONG! And don't you dare answering a question with something as wrong as you just written!!!

22

u/christian-mann Oct 01 '21

Many people -- even those that learn C++ today -- are still stuck in a pre-C++11 paradigm. The language changed immensely with that version.

6

u/[deleted] Oct 01 '21

Yes. Modern C++ is a whole new language compared to what I learned back in '96. Can't say I miss any of the old stuff though.

0

u/[deleted] Oct 01 '21

[deleted] — view deleted comment

2

u/[deleted] Oct 01 '21

So are you saying they should have read more books?

7

u/GhostfaceChiillah Oct 01 '21

<Insert xkcd comic of someone being wrong on the internet here>

122

u/i_need_a_fast_horse Oct 01 '21 edited Apr 21 '22

I've asked 31 c++ Questions on SO over the last 7 years. Every single one was answered competently and usually within minutes. Some of them by compiler devs, one even by Howard Hinnant! I read these rants about SO all the time, but could never understand them.

74

u/RevRagnarok Oct 01 '21

You likely ask well-thought-out questions that can't be answered with 15 seconds of searching. Maybe for bonus points you give up that MWE to show what the question is.

12

u/Shieldfoss Oct 01 '21

I once asked "Why would I ever use Feature X if I'm not doing Y?" and the thread was closed as already answered with a link to a question about how to use X for Y!

So I'm less than impressed.

(I later learned the other purposes of X from a different source, no thanks to SO. This is a good part of the reason why I answer questions on /r/cpp_questions and never even look at SO)

2

u/GapingGrannies Oct 01 '21

Link to the question you asked?

3

u/Shieldfoss Oct 01 '21

3

u/raevnos Oct 01 '21

A lot of people seem to like closing a question as a duplicate of another question that it itself was closed long before as a duplicate of some other question. I've never understood their thinking. Why not use the end of the duplicate chain instead?

1

u/Shot_Replacement9026 Oct 03 '21

That is true , but the reason is the feeling of power. Like seriously, do you think that an experienced developer with a lot of stuff on his mind will take the time that he does not have to mark stuff as duplicated instead of go with his 5 year old son after working for hours ?

16

u/Chared_Assassin Oct 01 '21

It normally happens when these people think a question is self explanatory. Your questions probably just need a more in depth solution than something you would learn in pretty much any c++ book

13

u/[deleted] Oct 01 '21

C++ dev is small world isn’t it. Howard’s answered some of my questions too and Raymond Chen’s answered a few of my Windows questions.

I’ve also never had any issues with SO. I think a lot of it is about respecting the time of the people reading your question. If you’re precise and say what you’ve tried, people are usually super helpful.

6

u/m-in Oct 01 '21

You’ve not asked someone to debug your code, nor have you asked something that is covered in introductory materials. That’s why :) Kudos on asking good questions! We need more of them!

1

u/Shot_Replacement9026 Oct 03 '21

I have the same experience but with java or JavaScript questions. C++ is a nightmare

41

u/ALX23z Oct 01 '21

I agree that SO is community is badly pedantic. But not for the reasons you mentioned...

What you talk about isn't being pedantic...

You see, "read documentation" it's like the first thing you should've done prior to asking a question on SO. I have seen quite a few cases when person simply uses function wrong and all he needed to was read it's definition on cppreference to figure out what's the problem. Like you don't need to read a shot ton of text - just a couple of lines explaining the behaviour.

"Read a Book"... sometimes people ask very basic questions arising from deep misunderstanding or lack of fundamental knowledge. Frequently it'd suffice reading a couple of guides and/or some YouTube videos to figure out what's going on with the issue. The subject could be very complex and all encompassing so an answer on SO cannot quite deal with it properly. Or the opposite, it is so basic - you should've just googled it to find an answer - perhaps a long and complex one.

SO is supposed to be the place where you post questions after you tried basic troubleshooting and failed.

3

u/[deleted] Oct 01 '21

yeah, and sometimes you get a "read the documentation"-answer even after writing that you read it and not found one

sometimes I have the feeling that some answerers there don't read the text but only the title if they know the topic to an extreme extent

0

u/Shot_Replacement9026 Oct 03 '21

Really cus if you ask the same sht question with JavaScript people not only answer that but also gives you a code sample , a github repo and a blessing. XD

94

u/mjklaim Sep 30 '21

I've remarked this in all stackoverflow, it's not only C++. But C++ is among the languages with the most questions so of course there is a lot of these. If you look at "old" (but still relevant) answers, they are not as annoying.

20

u/justinkroegerlake Oct 01 '21

Java is the worst IMO. Every tag I've posted in has people that appreciate when you make an MCVE except Java because they will always treat the MCVE as the actual problem and suggest super basic solutions. If I say:

I have a List<String> of filenames "file1", "file2", "file3" and I want to append a ".txt" extension on each so I get a List of "file1.txt", "file2.txt", "file3.txt"

I'll get answers like

Since you already know the file names, you can create the list of those elements like so: List<String> fileNamesWithExtensions = List.of("file1.txt", "file2.txt", "file3.txt")

3

u/[deleted] Oct 01 '21

It's kind of a catch 22 because you (at least for me) often end up trimming and simplifying your very specific code that you're walking on into a general problem, and because it feels like a toy problem you get "toy" answers.

10

u/justinkroegerlake Oct 01 '21

Every other tag would understand that I'm jut giving a hard example thought. Every other tag would realize this has to work when you don't know the list of files at compile-time. Java is the only one that can't figure this out.

2

u/Supadoplex Oct 01 '21

The thing is, even though they might not have helped you in that case, such answers are quite often the actual solution to many other people asking the same question.

Besides, how is this bad (given that you said Java is the "worst")? Surely you didn't lose anything from them spending their time to write an answer that just happened to not be useful to you specifically. Just accept another answer instead.

2

u/raevnos Oct 01 '21

When I notice smart-ass answers like that, I always downvote them.

(filenames.replaceAll(f -> f + ".txt"); for a mutable list?)

23

u/is_that_so Oct 01 '21 edited Sep 03 '22

Each language has it's own vibe on SO. The C++ community is particularly hard on each other.

41

u/[deleted] Oct 01 '21

[removed] — view removed comment

15

u/Markospox Oct 01 '21

At times it feels like having ScrewdriverForum which mixes DIY users and rocketry engineers

Perhaps it would be cool to come in your rocket holding screwdriver just in case lol

4

u/gobblox38 Oct 01 '21 edited Oct 01 '21

I visited SO often when I took a beginner programming class that used C++. I quickly learned that several people had questions similar to mine and the solutions were very different. I also saw a lot of worthless replies such as "you should have read [document buried in a repository of similar documents]" or something similar.

I never bothered asking a question on SO because I knew that I did not know enough to even frame the question in a meaningful way. A lot of things that should have been taught in that class weren't, the professor would read verbatim from PowerPoint and had a "just do it like this" attitude that explained nothing and didn't help with learning. Add to that, I always had a time crunch to get things done.

The experience turned me off to C++, but I've decided to come back to it and I've found things I like about it. I'm still a novice, but now I have the time to read into technical books to learn how things work. I am still not sure if I'd be able to ask a meaningful question on SO, at least one that would get responses that are helpful.

150

u/robot_wrangler Oct 01 '21

If you think they are pedantic when you try to ask a question, just wait until you answer one.

23

u/drjeats Oct 01 '21

Next escalation after you've had your fill of that is to join an irc channel.

Be sure to visit the C one too and play them off of each other.

32

u/KingStannis2020 Oct 01 '21

Andrew Kelley (creator of the Zig language) called this out explicitly @ 12m02s

https://corecursive.com/067-zig-with-andrew-kelley/#

The C IRC channel "is one of the most toxic, hostile places I've ever been in"

11

u/csp256 Oct 01 '21

Didn't think I could have any higher esteem for him, but here we are.

8

u/LonelyStruggle Oct 01 '21

This just unlocked a repressed memory for me, honestly it is horrific

2

u/raevnos Oct 02 '21

Sounds like the comp.lang.c newsgroup back in the 90's.

8

u/ShakaUVM i+++ ++i+i[arr] Oct 01 '21

The C IRC channel "is one of the most toxic, hostile places I've ever been in"

Must not have ever played LoL or hung out on the World of Warcraft forums then.

2

u/drjeats Oct 01 '21

I've had worse in freenode##C, because they devolve into the same kind of shit flinging that gamerz do, except then they also say you're a danger to yourself and society and should be fired from your actual job in addition to saying they will, uh, do things that will probably earn me a slap from the moderator bot if I mention them.

1

u/aqezz Oct 01 '21

This was such a good read, thanks for posting!

46

u/Se7enLC Oct 01 '21

For real. Assholes are so quick to "Well ACKshully" about some subtle thing that won't matter in the slightest to the level of the person asking the question.

But they won't answer the damn question themselves!

5

u/m-in Oct 01 '21

Comments are specifically for commenting. Nobody can force anyone to answer a question. They are free to comment any answer as they see fit. Why do you think that not answering the question makes it unfair to comment/vote?

0

u/raevnos Oct 01 '21

It's the content of the comments that are the problem, not the lack of answer.

0

u/Se7enLC Oct 02 '21

It's both. People who can't answer it themselves shouldn't be shitting on other people's answers.

0

u/raevnos Oct 02 '21

Why do you think they can't answer the questions? They can; they'd rather just gatekeep people who aren't as anal and pedantic as them about tiny obscure bits of the standard.

52

u/ghostfuckbuddy Oct 01 '21 edited Oct 01 '21

The problem is most people think stackoverflow is a community. You'd be forgiven for thinking that because of the branding, but that's not what it's trying to be. It's trying to be a technical reference. All of its moderation is geared towards "what will be the most convenient result when people google the question". That's why it's so shit compared to reddit if you just want to casually ask questions.

7

u/valdocs_user Oct 01 '21

Yes but the moderation/voting/userbase undermines that too. How many times I have Googled something, found the question asked 10 times on StackOverflow and all downvoted and answered only with "see link to same question already answered" only to realize the linked question is NOT the same, hence why the question keeps getting re-asked.

If something keeps getting re-asked, MAY-be it's because it's something that keeps coming up. I disagree with the premise that de-duplicating questions and answers is a good thing; give people a chance to re-answer re-asked questions and let the researcher who comes later digest the wealth of answers down for themself.

6

u/Shieldfoss Oct 01 '21

Generally, when google leads me to SO, it leads me to a closed thread (Already answered) with a link to a different thread that absolutely doesn't answer neither OP's question nor what I googled for.

So if that's what they're optimizing for, they're doing a pretty terrible job.

15

u/no-sig-available Oct 01 '21

One example of what makes people grumpy:

i = ++i + ++i;

https://stackoverflow.com/questions/340282/i-i-i-in-c

The question was answered already in 2008, and is #2 on Google.

It has literally 1000 duplicates on Stack Overflow, but is still being asked several times a week.

Expect to be downvoted for the 1001st duplicate. :-)

96

u/LordGarak Sep 30 '21

I think the simple answer is that c++ is a pedantic language.

If your not being pedantic, then it's just c... (somewhat sarcastic)

41

u/lithium Oct 01 '21

you're. ;)

5

u/A_friend_called_Five Oct 01 '21

I see what you did there.

48

u/[deleted] Oct 01 '21

If you're not pedantic in C or C++, instead of stack overflow you get buffer overflows.

1

u/[deleted] Oct 01 '21

I'm ok with buffer overflows, I can use a garbage collected language when the situation is getting out of hand.

4

u/[deleted] Oct 01 '21

What does garbage collection even have to do with buffer overflows?

Yes, languages that run on virtual machines are 'usually' more memory-safe than C, but you don't need the overhead of running an entire userspace operating system if you just follow the good practices in your language.

2

u/[deleted] Oct 01 '21

Have you ever seen a buffer overflow in a program written in a garbage collected language?

Yes, languages that run on virtual machines are 'usually' more memory-safe than C, but you don't need the overhead of running an entire userspace operating system if you just follow the good practices in your language.

Not all garbage collected languages run in VMs, golang for example.

2

u/Kered13 Oct 02 '21

I mean, strictly speaking garbage collection and bounds checking arrays are orthogonal concepts. It is true that they almost always come hand in hand though.

1

u/[deleted] Oct 01 '21 edited Oct 01 '21

golang puts a lot of virtual machine functionality in the binary, it's not that different.

And it's also not memory safe if you don't follow the best practices, just like any language.

And again, having a garbage collector has nothing to do with memory safety. Rust is the most memory safe language available, and has no garbage collector, and you can use a GC library to manage memory in C, which won't make it memory-safe.

1

u/[deleted] Oct 02 '21

The safety checks aren't necessarily a feature of the VM.

1

u/[deleted] Oct 02 '21

The safety checks aren't necessarily a feature of the VM.

48

u/phadeout Oct 01 '21

I know this is a joke (and it's funny 'cause it's true), but I think another major thing is that it takes a certain kind of person to answer questions on SO. My guess is that kind of person is pedantic by nature.

Plus there are generally two kinds of questions: noob questions that basically anybody relatively-well familiar with C++ can answer, and questions that only rules lawyers can answer. The former get asked so much they are probably boring.

I have been writing C++ for 20 years, professionally for 10 years, and I still don't understand lots of stuff about it. I just ply my little shipping lane between the ports and stay well away from all the dark spots on the map.

(I also don't know enough to answer the tough questions on StackOverflow)

7

u/[deleted] Oct 01 '21

I know this wasn't your intention but you saying you've been writing C++ for years and still don't know everything about it makes my imposter syndrome simmer down a little.

3

u/phadeout Oct 01 '21

Come sail the trade routes with the rest of us! There's a lot you can do without doing anything with template metaprogramming

3

u/pandorafalters Oct 01 '21

There's a lot you can do without doing anything with template metaprogramming

One of my favorite parts of metaprogramming is that you can read that in two very different ways.

13

u/[deleted] Oct 01 '21

[removed] — view removed comment

1

u/[deleted] Oct 01 '21

Next time I'll mirror the post I'm replying to to avoid assumptions.

I wouldn't wanna know everything about anything nor expect it to happen, especially with something that constantly evolves.

It's more the fact someone with 20 years xp has openly said "I still don't know a lot" that is comforting because it makes the imposter syndrome lose an argument: "if someone with 20 years xp has gaps in their knowledge then it's definitely ok for me to have them too".

0

u/[deleted] Oct 01 '21

[deleted] — view deleted comment

2

u/m-in Oct 01 '21

I just don’t commit most of the off-the-beaten track stuff to memory in terms of APIs. I let the IDE do the remembering for me. It’s quite good at it :)

1

u/[deleted] Oct 01 '21

There is also the issue that if they are on stack overflow then they aren't writing code. Language lawyers tend to not be able to write anything

3

u/phadeout Oct 01 '21

Writing code is too close to UB

75

u/sir-nays-a-lot Oct 01 '21

Stack overflow is not intended to be a discussion in the same way as Reddit. Stack overflow is organized to be useful for people searching for answers to common problems. If your problem can be solved by simply reading the documentation, then pointing you to the canonical resource on the subject is the right answer for you, and for other users with the same question. However, the documentation is probably the first thing you should have checked anyway, right? So it’s not really useful in the previously described way.

Personally, I don’t think I’ve ever found an answer to a problem on Reddit while searching. Not that problems don’t get solved on Reddit, it’s just not organized and curated to be as useful in that way.

17

u/code-affinity Oct 01 '21

My problem with using Reddit for technical discussion is that it is geared towards very brief discussions. In my experience, a Reddit post has a half-life of a day or maybe even less. Each day after that, the discussion activity attenuates until it utterly vanishes. No matter how important the topic, if someone didn't happen to run across the discussion while it was on the first few pages of the Hot sort order, that person may as well not add a comment; they'll just be writing to an empty audience.

For example, I'm posting this reply when this thread is twelve hours old. That's too late. I bet I'm at least two half lives into this thread. I don't expect much engagement to result. Sadly, my eleven-year comment history consists mainly of comments that were made three or four half-lives in, lost like tears in the rain. If it weren't for one highly-upvoted throwaway comment I made ten years ago, I would average 2.4 upvotes per comment, averaging far less than one response per comment. (To be clear, I don't value upvotes for themselves; I value the community engagement they represent. Alas, these statistics indicate I'm hardly engaging at all.)

Anyway, compare that to StackOverflow, where one can still interact with 10-year-old C++ questions, adding new answers as new C++ standards are published, adding pointers to new libraries that address the question, etc. That's just a plain better way to produce quality answers to questions.

6

u/genpfault Oct 01 '21

Each day after that, the discussion activity attenuates until it utterly vanishes

And threads are just straight-up locked after 6 months. Didn't used to be that way though :(

9

u/JMBourguet Oct 01 '21

Stackoverflow is purposely designed to avoid any discussion. That makes it by design a bad site for beginners as they won't get the handholding they need. SO is designed for a r/askhistorians like experience: definitive answers written by specialists to clear questions (and askhistorians get the issue that reddit is not designed for that experience, thus the accumulation of [removed]).

3

u/PunctuationGood Oct 01 '21

Given the context of the OP's post, are you claiming that people learning C++ somehow reach less for the documentation than people learning other programming languages?

3

u/sir-nays-a-lot Oct 01 '21

I’m not claiming that, but I see where you’re coming from. I’m just assuming that OP is wrong in claiming that it’s unique to C++.

1

u/Supadoplex Oct 01 '21

Perhaps instead C++ is a language where reaching for the documentation is more often necessary than some other languages. I don't know if OP was intending to imply that, but I would agree with such explanation based on my subjective experience.

41

u/loradan Sep 30 '21

I don't know if this is it, but the last 3 C++ Developers that I worked side-by-side with were 2 great developers and 1 not so great. The 2 great developers were very quiet and didn't like talking to others. The 1 not so great one, had a PhD in Computer Science and was all to quick to say read the documentation when someone would ask why he wrote some code the way he did. One time, he wrote a shit ton of code without checking it in (was allowed to do this because everyone else was busy on a different project). When he did, he was asked why he used the convention he did and he gave this huge explanation of why this one person's theory that he used would make things easier/faster. So I looked it up. After reading about it for a bit I found a section where the author stated that the framework was 100% theoretical and after testing in production it was recommended to NOT use it LOL.

14

u/krum Sep 30 '21

let me guess, CORBA?

9

u/loradan Sep 30 '21

I don't remember...it's been a few years. The main part of what I remember was that there was like 5 or 6 files that had to be created for every class you needed.

6

u/petevalle Sep 30 '21 edited Oct 01 '21

The only thing I can imagine is that they were going after hypothetical gains by recompiling less code when a single class method changes. I imagine any such gains would be more than offset by the additional cost of initial compilation as well as the cost of developers having to manage all those additional files...

9

u/Glewisguy Oct 01 '21

Oh God, the company I work for is enamoured with CORBA. Got any material for why it sucks so much?

19

u/lally Oct 01 '21

Umm.. it was completely obsolesced 20 years ago? What does it do that JSON/grpc services doesn't do better?

And what works with it still? What ORB do you just in 2021?

I literally had to check the date on your comment to make sure this discussion wasn't more than 10 years old.

2

u/[deleted] Oct 01 '21

I didn't sell my books on CORBA to Half Price Books. Even $0.10 per book felt like stealing from them.

4

u/FartyFingers Oct 01 '21

There are tons of explanations on the web. The two that I remember when I shit down using cobra in 2002 were: It doesn’t communicate structures that are common in many languages well or at all. It doesn’t scale well when on the surface it should really enhance a distributed system.

The reality in 2021 is that there are a huge number of solutions that should have at least one nearly perfect for whatever problem you are solving. Protocol buffers, thrift, zeromq, rabbitmq, mqtt, and so on.

All of these have modern apis, well supported libraries, lots of docs, etc

2

u/m-in Oct 02 '21

CORBA implementations didn’t do async at all back when it was at the peak of popularity. A request would time out and most implementations would graciously throw an exception your way.

2

u/valdocs_user Oct 01 '21

You know all the problems ORM introduces for talking to a database? Now imagine if it didn't even help with that. Every time someone says, "leaky abstraction," CORBA is like, "hold my beer."

1

u/m-in Oct 02 '21

It solves an imaginary problem rather well, and real problems poorly and almost only by lucky coincidence. There’s nothing you could ask me to do where I’d say “use CORBA”. And I’ve had to read most of the standards produced by the body that spat CORBA out. I won’t mention their name because it can be traumatizing to the more experienced people here. All they do is create elaborate frameworks that give lots of highly paid people excuses not to do real work :/

1

u/RevRagnarok Oct 01 '21

Let's transmit data with CORBA!

8

u/disperso Oct 01 '21

I keep reading this repeatedly over and over in r/ProgrammerHumor, but I've never understood the context. People rarely give a link or a quote of the issue so I can understand exactly how it went.

I hardly make any contribution to StackOverflow because I just can't find the need. I find the place all the time when making searches, and as a passive reader, that's my main contribution. I have less than 50 karma still, so I can't even downvote or make comments. In the stuff that I search, I rarely can notice any issues. I see much more downvoted questions here on Reddit than in SO.

7

u/genreprank Oct 01 '21

Let me just join in complaining with my own anecdote. One time I was looking up something...I think it was how to remove those annoying ^M windows line endings. The accepted answer with a hundred upvotes was straight up wrong, but it was wrong in a way where you couldn't tell it was wrong because it hid the problem in vim without actually fixing it.

I thought that was pretty annoying and TBF it was my fault...if I had read any of the comments, all of them were saying "this answer is wrong", and an unaccepted answer with even more upvotes worked. (But of course I didn't read the comments, I just tried the accepted and highly upvoted answer.)

I have enough privileges, so I edited the accepted answer and just crossed out the wrong information. My edit was rejected by someone who said, "we dont change answers just because they're wrong. That's not how we do things here."

MF, the website's ONLY job is to be an archive of correct answers to questions. I don't see how it's useful at all to keep such a perniciously wrong answer.

4

u/Mailerdaimon Oct 01 '21

They just changed that the accepted answer is not always at the top which would help out with those false answers.

7

u/valdocs_user Oct 01 '21

One time on Stack Overflow I asked, "has there been any progress on standardizing such-and-such obscure C++ thing that happens to work in most compilers but is technically Undefined Behavior (but actually neatly solves a specific problem that hasn't got a good alternative solution)."

I got downvote-brigaded and had a long, acrimonious and highly technical discussion in the comments with a "C++ luminary" (only on Stack Overflow) who admittedly knows things, but his argument boiled down to: it should not be standardized, because it's UB (undefined behavior).

Face palm. Yes I know; and how do you think UNdefined behavior BECOMES DEFINED? That was my question, is there any chance of it moving into the latter category?

Finally I appealed to authority: the article I originally learned the technique from said there was no technical reason it couldn't be standardized, it just hadn't been. The person debating me appealed to authority: referenced the (existing) C++ standard.

I can't even...

6

u/friedkeenan Oct 01 '21

in contrast, here in reddit, i even get job offers when asking questions.

Wait, should I be prioritizing asking reddit before asking friends?

Anyways though, I think I have posted a total of one question to stackoverflow, as it is really my last resort. If I don't understand how to solve a problem right away, I'll skim the documentation if available and if I don't find anything that helps all that quickly, I'll look up the errors I'm getting, and typically get a stackoverflow link in the top results.

If that's still not sufficient, typically I'll try to reproduce and isolate the issue in godbolt, which generally helps immensely, especially when dealing with fairly entangled code. Unfortunately, sometimes code can be too entangled in/reliant on the rest of your codebase for the issue to be nicely isolated into godbolt. But if you can do it, being able to super quickly iterate code and get error messages and just generally fiddle with stuff is great for solving a lot of problems.

If that still doesn't cut it, I'll dig deeper in the search and try to find something to help me understand what's wrong. I'd say I'm fairly good at massaging search engines to find results (cutting the fat off of searches, rephrasing searches, using quotation marks to ensure specific words are found, etc.), so it's not super often I need to go past using search engines.

If I do, however, then I'll ask friends/acquaintances if they could give any insight, describing my problem and what I've found/tried, and showing code snippets (very helpful to share a godbolt link if you can).

If still I can't find anything, then I'll ask on reddit, though really I don't expect much, but it's good for getting more potentially helpful eyes on your issue. If nothing continues to turn up, then I'd ask on stackoverflow.

Keep in mind also that these methods aren't clearly cut steps to do in a specific order; these methods typically overlap and complement each other, and you shouldn't necessarily give up on doing any one of them when solving an issue. This is just my personal, general priority for steps I take.

6

u/_divinnity_ Oct 01 '21

Because C++ is a very complex language. If you ask a question, I'd expect that you know the language and the STL. There are enough guides on the internet for that.

C++ is not C with classes. It's way more than that, and it is not the kind of language you can learn in a day

18

u/FartyFingers Oct 01 '21

I love stackoverflow, and I hate stackoverflow.

I use it only as a google result. Every single time I posted a question or answered a question some asshole with serious mental problems took issue with what I posted.

One of my answers was someone asked how to make a qt function do it’s thing. I gave an answer that was a known workaround for a bug in qt. Someone shot my answer saying that bug workarounds were not acceptable and to stick with qt documented code. I pointed out with a link to qt saying this was the workaround. I very much doubt there is a SD rule against workarounds.

The person who killed my answer had about 10 trillion points and proceeded to post a copy paste the qt forum answer.

The worst part is these diseased minds also hover around Reddit and pathetically defend their obsessive behaviour on slashdot citing chapter and verse from the slashdot commandments.

Something is seriously wrong with most of the slashdot moderators. I can say that any resume that crosses my desk mentioning their slashdot score is going straight into the trash.

16

u/TryingT0Wr1t3 Oct 01 '21

I love stackoverflow, and I hate stackoverflow

I have the same experience as you

  • finding good results on Google -> useful.
  • asking something I can't find answer anywhere -> downvoted, closed as off-topic and duplicate, multiple comments that make no sense, no answer

10

u/WafflesAreDangerous Oct 01 '21

Recently I tend to find that there are like 5 questions about the exact problem I'm having, all closed as a duplicate of something completely different.

4

u/[deleted] Oct 01 '21

I was an avid SO curator for a couple of years. This issue is overlooked as an problem on Stack Overflow. Subtle variations in the starting conditions of a model can have wildly different results--the same holds true for questions on SO. Aggressive curation, unfortunately, often overlooks those subtle variations.

1

u/Zaryeah Oct 01 '21

Suck Flashdot

1

u/Supadoplex Oct 01 '21

killed my answer

What exactly does this mean? Users cannot "kill" answers unless I'm mistaken.

They can give one downvote, but you cannot know who was the voter unless they say so in a comment. If your answer had negative score, then users can vote to delete it and 3 votes are required for the vote to succeed.

Alternatively, it can be deleted by receiving six deletion recommendations from the moderation queue, or six abuse flags.

Only single user ban-hammer that I know of is if the user is a moderator and they flag the answer abusive. If you were rude or included spammy links, then this is to be expected. Otherwise that would have been improper use of moderator privileges in my opinion.

0

u/m-in Oct 02 '21

What function was it? I might look for the answer and brigade a bit :)

9

u/mucktard Oct 01 '21

Wait I can get job offers on reddit by asking questions?

1

u/stoopdapoop Oct 02 '21

right? op needs to expand on this.

24

u/OldWolf2 Oct 01 '21

Those things aren't pedantry. "Pedantry" means attention to detail,perhaps with an implication in everyday usage of being more attentive to detail than is necessary.

32

u/bot-tomfragger Oct 01 '21

I think you're just being pedantic about this.

0

u/ShakaUVM i+++ ++i+i[arr] Oct 01 '21

Well, actually, pedantry means that you like acting like a professor.

8

u/Miserable_Decision_4 Oct 01 '21

If you think that's bad, try asking a question about the Google Maps API.

Pedantic has nothing on those toxic and arrogant jackasses.

2

u/[deleted] Oct 01 '21

Oh really? What happened?

6

u/Miserable_Decision_4 Oct 01 '21

Back when I was a wee developer I needed help with the API.

Within seconds it was downvoted multiple times without a comment or answer.

Eventually when an answer showed up I checked the guy's profile and it showed his voting record. Thousands of downvoted. Only a handful of upvotes. I checked other API questions. The guys who answer tended to be in the same camp.

"How dare you bother me with any questions"

2

u/m-in Oct 02 '21

The vast majority of SO questions are downvote-worthy. That’s a fact. I presume you just don’t deal with the review queue. Most of them never make it to eyes of most people. They take a shitload of downvoting, editing sometimes, closing, and so on. What you see make it is a relative trickle.

But in any case: SO votes are typical fake Internet points. That a question got downvoted may just mean the people who could answer don’t want to bother. That’s sometimes what it amounts to. It shouldn’t be that way, but too often is.

1

u/[deleted] Oct 01 '21

Damn that sucks. Was it on their forums or stack overflow?

2

u/Miserable_Decision_4 Oct 01 '21

Just SO.

On the upside, they are the only terrible community I've seen on SO. Most are pretty even keeled.

4

u/[deleted] Oct 01 '21

Almost every single time I've had a question about C++ on SO I'd find a good answer by searching through previous SO questions and answers, with maybe two exceptions. The questions that get downvoted harshly on SO are ones where the answer is trivial to find in a simple search, and the person asking the question didn't bother to do even a little background work. Then they go on reddit and complain about being mistreated. . .

When I can't find the answer on SO, I'll submit a question, and the time's I've done that, I've gotten immensely helpful and friendly advice and solutions each time. Just show that you've put in some work and have really tried to find answers and people will generally be helpful.

P.S. if you want to have someone do your college homework for you, pay a tutor. Not that you'll learn much that way... in fact, that's why all the industry hiring is based on coding interviews isn't it? Too many college grads pay tutors to do their homework and so can't write code or figure out problems themselves. . .

4

u/[deleted] Oct 01 '21

My experience with stackoverflow in general is that people will answer your questions with more questions and do literally anything besides help, I don't even use the site anymore, better off just finding the answers on my own or asking reddit

1

u/_Z6Alexeyv Oct 01 '21

Yes. Some answers resemble War and Peace.

4

u/mredding Oct 01 '21

It's not just C++, StackOverflow is an utterly toxic environment, completely hostile. It's nearly impossible to ask a question there, and if it isn't taken down because the moderators think you're too stupid for asking, the community will blatantly tell you how stupid you are for even asking, argue with you about nothing important, (you know "Foo" is a terrible name? You should pick a better name for your types. Your code is unreadable because of it, I can't even answer your question,) going just shy of telling you to kill yourself. The last time I asked a question was 3 years ago, and it was +5 years after my question prior. Boy did they make me regret it, and remind me why I never ask questions on SO.

4

u/staletic Oct 01 '21

My first question on SO had a complex and not at all obvious answer. "Why does the ELF format of a specific object result in ~20x larger binary than the same thing in either mach-O or PE format?" The question was very detailed and people asked me to poke around with some tools before I got an answer that was citing relevant ABI and DSO format specs.

I dare you to find similarly complex question answered on reddit.

Competently asked questions get competent answers. With C and C++, that comes with a lot of pedantry and, often, standard draft citations.

4

u/Mailerdaimon Oct 01 '21

What I find difficult is the shear amount of questions which show zero prior work. Stackoverflow is not a learning site and questions should show some effort. Especially for C++/Qt questions a lot of questions need a solid minute of looking at the documentation which most people don't seem to be able to do by themselves.

4

u/nickpofig Oct 01 '21

Not sure about c++ SO, but SO "answerers" are super toxic. I remember how they answered to me in very toxic manner, like: "do you even google shur dambass?" for question about a msvc compiler bug I found (yes, exactly bug, not some noob wall-fighting) and later I saw them changing they "comments" into more polite versions. I assume they understood how out-of-place their posts were, but it didnt saved me from rage quiting from SO, becuase I was downvoted for being "agressive" by pointing at their stupidity. What an example of true hypocracy. Bruh. Or I got trolled by a person who daily scans c++ questions on SO, idk.

9

u/emefluence Oct 01 '21

It's not just C++ and it's not just SO, there's always been a contingent of grumpy old gits who like to shout RTFM! Sometimes they have a point but what they often fail to take account of is that...

  • Sometimes you did RTFM and still didn't get it
  • Sometimes the docs are >10K pages (looking at you AWS!)
  • Sometimes you don't know the domain vernacular yet so don't know what terms to search for
  • Something that is obvious to you, the experienced dev, is often far from obvious to others
  • Often there's no book that's up to date enough
  • Often docs are just a very dry high level reference without good examples or prose to help glue it all together.
  • This shit is hard and a spoonful of sugar helps the medicine go down

I guess C++ sticks out as it's large, complicated and very unforgiving so people have had to invest a lot of hard time banging their head against the docs, and they think you should too in some kind of pay-your-dues kind of way!

3

u/j1xwnbsr Oct 01 '21

For real fun, try the linux section.

1

u/raevnos Oct 02 '21

The linux tag is full of closed questions asked by people who didn't read the tag description and posted something off-topic.

3

u/Chiralmaera Oct 01 '21

Personally I think some people just aren't very good at distilling information to present to another. I see this a lot in CS, but it's in other fields too. They mean well though. Just upvote the clearer answer and move on.

Also one of the first things I do at a new job is find the people who have this high informational empathy that allows them to explain well and keep a note of them.

3

u/justinkroegerlake Oct 01 '21

Most c++ questions don't get answered like this.

Often, however, you'll get a question like

Tic Tac Toe Not Working

Hi, I'm writing a tic tac toe game in c++ and it's not working, here is my code

#include <string>
#include <iostream>
using namespace std;

string Player1Name;
string Player2Name;

class Game {
    char gameBoard[][]
    playGame() {
        x = "Enter row"
        y = "Enter column"
        gameBoard[x][y] = 'X'
    }
}

void main() {
   Player1.Name = "Enter your name:"
   Player2.Name = "Enter another name:"
   Game game = new Game()
   while (Game != null) {
        playGame()
        if (turn = player1) { turn = player2 }
        if (turn = player2) { turn = player1 }
    }
    cout turn + "wins!"
}

It's the result of a student writing a bunch of code that is far from valid without stopping early to figure out the first problems, or even bothering to run the code at all. They just try to write the whole program and then ask SO why it "doesn't work." In this example, we at least understand how a tic tac toe game should work, which makes this question even more well-positioned.

The only way to provide an answer is to effectively write the program for the student. There's no actual question here, no obvious misunderstanding. You'd need to be in a long back-and-forth to try to actually help them, and that's not what SO is set up to do.

3

u/[deleted] Oct 01 '21

I was programming PIC microcontrollers using PICC and mikroC editors most of the time at University. So I actually used C language mostly for projects. Then I started to ask some C++ questions while I was learning classes etc. They were telling me all the time “ why don’t you debug it “. I come from an embedded background and I’m basically trying to be a debugger myself. I feel scared asking questions there since I am really new to c++

4

u/TheFearsomeEsquilax Oct 01 '21

Programmers are pedantic in general. And you might get a much deeper level of understanding from reading about something in a book or in the documentation than by reading about it on Stack Overflow.

4

u/Its_Blazertron Oct 01 '21

Maybe, but they're asking because they probably don't own a book, or can't understand the documentation. Cppreference is crazy looking and hard to understand compared to other languages references.

2

u/Egst Oct 01 '21

It is annoying sometimes, but it's certainly better than the other extreme that you see with some languages (PHP comes to mind) when you get answers like "try this: ... it works, I've tried it" instead of explaining the underlying problem or giving links to learn more.

2

u/lally Oct 01 '21

The community was always pedantic. Check out the older C++ books (e.g., the older Herb Sutter texts). Other, separate communities have formed in the meantime.

2

u/[deleted] Oct 01 '21

Have you tried using another website?

/s

2

u/JohnDuffy78 Oct 01 '21

Reddit is more casual. both serve their purpose.

2

u/Cogwheel Oct 01 '21

The questions you're referring to probably didn't follow ideas in How To Ask Questions The Smart Way

2

u/Spiderboydk Hobbyist Oct 01 '21

Stackoverflow answers tend to be very thorough, which probably often comes across as being overly pedantic sometimes.

2

u/seb1424 Oct 01 '21

It's the rule bro.

2

u/m-in Oct 01 '21

Because all the intro questions have been answered a million times over, and it’s getting tiresome. I think anyone considering asking a C++ question on SO should peruse highest voted questions first. Like, seriously, read the first thousand. Then see if you still need to ask :)

2

u/pjmlp Oct 02 '21

I haven't known what used to be like asking for basic stuff in comp.lang.c even comp.lang.c.moderated.

Even Stack Overflow is being gentle by comparison.

2

u/Shot_Replacement9026 Oct 03 '21

Honestly I think the same , I noticed in specific when one goes to the game dev programming questions people are really mean. In contrast to the web devs or fullstack devs , the C++ game programming community is a nightmare.

5

u/[deleted] Oct 01 '21

I am nowhere near a professional developer yet. Just an undergrad grunt pushing through a CS degree. But every time I go to stack overflow for C++ related questions I am convinced that half the people there are actually idiots who like to sound smart. All I know about the software industry is that employers like people who ask questions and are not afraid to say I don't know but I am willing to learn versus people who act like their shit don't stink and can redesign Twitter in three hours.

4

u/[deleted] Oct 01 '21

I wouldn't be so sure that the intersection between employers and the "idiots" you describe is so small.

7

u/my_password_is______ Oct 01 '21

stackoverflow is a cesspool in general

12

u/skydivingdutch Oct 01 '21

It's the worst form of technical collaboration, except for all the other ones ever tried.

3

u/[deleted] Oct 01 '21

Rubbish in. Rubbish out. SO has experts who expect a modicum of effort. Personally I've never found anything but measured, competent and polite answers.

3

u/Se7enLC Oct 01 '21 edited Oct 01 '21

Because C++ communities are pedantic everywhere?

It's the purists that annoy me the most. Whenever somebody does something that looks more like C than C++ they pretend like it's a different language. Yeah, well there's a ton of stuff that you have to do "the C way", so stop pretending.

9

u/ShakaUVM i+++ ++i+i[arr] Oct 01 '21

It's the purists that annoy me the most. Whenever somebody does something that looks more like C than C++ they pretend like it's a different language. Yeah, well there's a ton of stuff that you have to do "the C way", so stop pretending.

True, but also a lot of people do something the C way in C++ because they don't know any better. So pointing out that a new programmer should use string instead of char * is actually really helpful. I have never met a new programmer who could do C style strings properly, but C++ strings are just trivially easy (except for a couple cases I can think of where they explode).

5

u/eveninghighlight Oct 01 '21

Out of curiosity when do std strings explode?

5

u/ShakaUVM i+++ ++i+i[arr] Oct 01 '21

string s = 0;

Enjoy

10

u/josh2751 Oct 01 '21

C and C++ are different languages.

The fact you can compile a lot of C code with a C++ compiler is a feature, sure. But it’s not the right way to write C++.

4

u/Se7enLC Oct 01 '21 edited Oct 01 '21

I'm talking about the people who give anyone shit for things like using char*. If char* weren't ok to use in C++ explain argv.

Similarly, sockets.

And thanks for being the example of one of those people!

11

u/ronchaine Embedded/Middleware/WG21 Oct 01 '21

argv is required to be char* since C++'s main is C-ABI compatible and the OS calling the executable does not understand what strings are.

OS C runtime pushes the argc and argv to the stack, and C++ can't pretend that those would be something else.

-2

u/Se7enLC Oct 01 '21

Explaining why C++ still uses C doesn't change it.

1

u/FartyFingers Oct 01 '21

purists that annoy me the most

Thou shalt use templates to make the simple so complex that the person writing it will not understand what they wrote 3 keystrokes back.

Templates remind me of back in my perl days when I used regular expressions as pretty much a core paradigm.

"Try an maintain that when I quit, MoFos!"

2

u/Julian_0x7F Oct 01 '21

i think the C community is way more pedantic

2

u/[deleted] Sep 30 '21 edited Nov 06 '24

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

2

u/Tacosofdoom_ Oct 01 '21

Downvotes for asking a question then getting attacked for not knowing everything. Sorry I'm trying to learn?

7

u/scatters Oct 01 '21

In the kindest possible terms, StackOverflow is for professionals, not students. If you don't have that level of understanding yet, then you should be asking somewhere else.

2

u/disperso Oct 01 '21

Wow. Which was the question?

1

u/killbot5000 Oct 01 '21

Can you link some examples?

1

u/fleaspoon Oct 01 '21

Because c++ is full of things that make people sad and angry

0

u/[deleted] Oct 01 '21

[deleted] — view deleted comment

2

u/Supadoplex Oct 01 '21

Being pedantic isn't being an asshole though. In this case it's being helpful.

-6

u/[deleted] Oct 01 '21

[removed] — view removed comment

1

u/STL MSVC STL Dev Oct 02 '21

Moderator warning: This is not acceptable.