last day (14 days later) » 

1:36 PM
-5
Q: What does & stands for in C and mmap()

Nizint fd = open("/dev/mem", O_RDWR); present = (unsigned char *)mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x22400000); if ((*present & 1) == 0) { printf("Converter not present\n"); exit(1); } 1) Wha...

 
-1 For lack of research effort
 
@Cicada contrarily: +1 for "people...especially...non-English speakers might have a hard time with the search...as & is one of those symbolic things that search engines choke on; so you have to know is an 'ampersand', and even if you do then it's not necessarily the case that people wrote explanations using that word, nor to combine it with 'operator' or to distinguish its role from that of address-of or reference even if you could." Seems a bit luck-of-the-draw if people are going to get the hammer or just an answer when they ask such a thing. An answer is about as easy as the hammer.
 
@HostileFork I don't think this is more difficult for non-English speakers, as C is used all over the world and tutorials and books exist in pretty much every human language.
 
@Cicada If one took all the time on earth, to read every book, and understand every specification...one would not need to ask any questions here. Routes toward learning sometimes do come from encountering something in the field and asking about it. I actually applaud the C++ Primer for not teaching struct and union except in the last chapters, but instead starting with class as there is no one path to knowledge; not everyone comes to a question on the same road. Don't assume. Remain helpful.
 
@HostileFork If one took a little time to read some books, understand some tutorials, one would not need to ask any obvious questions here. Routes toward learning often comes from acquiring a basic knowledge from existing and widely available resources. This user obviously did not read an introduction to C: are they going to ask a new question everytime they encounter something new? I don't assume anything, but when I see a clear lack of research, I don't want to remain helpful: it is a waste of people's time at the OP's convenience. Anyway this is off-topic.
 
1:36 PM
@Cicada You have [456] your work [912] cut out for you [267]. Thus the drive-by arbitrary random punishment--given to some and not others--is just part of the inconsistent elitism which gives StackOverflow a bad name. I repeat: An answer is about as easy as the hammer....if the question is clear, and you see no duplicate, don't beat people down. Reading any particular book is not a prerequisite to asking a question. The question stands on its own merit.
 
@HostileFork Let's just agree to disagree. :)
 
@Cicada On occasion I do take people to task over this, because I do think it's important.
The reason that question drew my attention is precisely because I was looking for a duplicate to cite in another question, which was not being attacked.
It was actually a bit hard to find a duplicate, and that's the one I came up with.
So, I found it, and what I found was a heavily downvoted question with a several-upvoted answer.
 
This happens all the time
 
And your remark, upvoted 5 times. Noting also the usual disparities that trouble me; a 1 rep user against your 19K or whatnot
And it's easy to turn people off, and it's not fair, really. Note the examples I cite.
Google is bringing people to StackOverflow finding answers to like "what should I use, struct or class"
And they see this one line question upvoted, and these are popular answers. They become canon.
I do think that if you're going to say "everyone who asks a C question must have read and understood a C book" you start getting into "well, which book?"
 
Frankly, I couldn't care less. I try to be nice as much as possible, because everyone deserves respect. But when people don't try searching first, it's very disrespectful IMO: you're wasting my time. The amount of downvotes on the question and upvotes on my comment show I'm not alone with that mindset.
It's true that knowledge regarding symbols is hard to find, on Google.
@HostileFork I didn't say that.
 
1:41 PM
Are they wasting your time or are you wasting your time?
 
They're wasting my time.
I'm here to help for free, don't abuse it.
 
You could just as fast answer with "it's bitwise and" vs. writing the comment.
 
Sometimes I do. Sometimes I don't.
 
Well, so that was a moody day?
 
I don't know? It was a while ago.
 
1:42 PM
I guess I could accept that as an answer.
Because I'm not really so much about what we do, as to what we like to think we should do.
And if someone calls us on things, how we'd say what we might do better.
Anyway, I've tried before with some of the high-rep ultra-anonymous knowitalls on SO to appeal to their inner child
 
I don't think rep and attitude are correlated, there are nice people (and dicks too) everywhere in the scale from 1 to Jon Skeet.
I do my best to be helpful, nice, etc. But this is the internet.
 
I don't understand the connection
Why should being the Internet diminish one's responsibilities to be helpful, nice, etc.?
 
It's a fact
It's easier to be rude / mean / offensive.
Anyway that's unrelated
 
I don't think it's unrelated
A 1 rep user is in essence a question mark. Could be any age. Any native language.
Any gender, any race, or even a robot.
 
So can a 2 rep user, 20k, and so on.
My comment is not directed towards the user
It's directed towards the question
Regardless of its author
 
1:46 PM
There are much worse questions, every day.
 
Yes, there are
 
I wanted to mark it as duplicate, had a hard time marking it as duplicate, and I'm somewhat sophisticated so I thought... hm. This actually is hard to search on.
 
-1 Did you check the manual? There's no such thing as ispressed, there is isDown. Please look up the docs before asking a question next time. — Cicada Oct 18 at 11:24
^ see, I'm not always completely useless
It just depends
We're all humans
 
Well, at least some of us are.
I get bored sometimes.
I'm not entirely sure why I did this
1
A: How many numbers with length N with K digits D consecutively

HostileForkIf one is looking for a mathematical solution (vs. necessarily an algorithmic one) it's good to look at it in terms of the base cases and some formulas. They might turn out to be something you can do some kind of refactoring and get a tidy formula for. So just for the heck of it...here's a take...

Is it homework? I dunno. Guess I felt like it.
 
Yeah, long answers with a terrible writing-effort-to-rep ratio :D I know that
 
1:50 PM
Anyway, I guess moral of the story is we have a chance here
This is what I used to say on Wikipedia
We have a chance to change the way the world works
You kind of see precedent being set in real time
 
Yeah. From my POV I'm doing the right thing :)
 
The thing about a question like "hey what's this operator & mean here" is that you can frame it up like "why are you wasting my time when Google could solve it" and then you try some Google or SO search from a beginner C/C++ perspective and find non-answers
So you go "all right, so yeah, it's tough to search on if you don't know where to look..." and fall back on "well if you just read a book..."
 
Just read a simple tutorial and use your brain
 
But then it becomes which book, and I like the sorta interesting philosophical points here we get
 
People need to learn how to THINK
 
1:53 PM
Like the idea that duplicate questions are good, if closed and pointed to canon
Well I think you should be able to point to things and get a hint like "what's that" and live in an encyclopedic universe, it accelerates thinking.
Problem is that in IDEs you can program for a while and then puzzle the first time you see something like an & used that way, especially if you've only seen it in pointers before
It just depends on how you got to where you are. All our knowledge maps are swiss cheese in a sense.
I learn little bits every day if I read the questions and go "oh, hm. I never knew."
Just because that's something I hadn't hit yet.
Had I read the C++ standard top to bottom and memorized it, I would have known.
 
Me too
But I also read the docs
And I try to think before asking
And I really do search a while
In fact, I haven't asked questions in years
 
Well remember that saying you never get a second chance to make a first impression
and, yeah, I'm not asking questions anymore myself
People are too rude
I get too mad
Can the tides be turned? This is a question. Lot of hate on StackOverflow; not growing expert members; turning away people left and right.
Seems the only new users are 1 rep who ask one question, maybe get help, leave. Probably if they ever ask a second question it's because they created a new account after the previous one got pounded with tons of downvotes.
 
@HostileFork Yes, but, with all due respect, this is not my problem: I am anonymous here. I really do not care what people may think. I try to remain cordial and factual as possible, but beyond that, what the person thinks of me has no influence on my physical person. I will not be rude on purpose, but there are no incentives as a user to be nice on purpose. I think my comment is very neutral, as it should be.
@HostileFork Yeah I agree the boat is kind of uh... going in the wrong direction
You see, a discussion is a mutual effort
I'll make an effort to be nice and helpful, should you make an effort to do your research properly
Here, I didn't feel the user did this effort
Maybe I'm wrong
But it's what I feel
 
I'm from the zen school of thought, I like questions.
"What search did you try before asking to figure out what & might mean in this context?"
 
I do answer that sometimes (often, actually)
This user was just in bad luck, it happens
I'm an old member now (not as much as you, though), I get tired easily
 
2:02 PM
Well, anyway, just pointing to my preference. And I do feel it might be a bit of a lost cause. I don't feel the culture or software infrastructure are supporting good management of new users.
 
Don't worry, I try not to scare new users away. You've just found one specific comment where I wasn't as helpful as I could have been :)
It's just that
 
:)
Well, okay.
 
Even the fact that I took the time to discuss my POV with you proves I'm not that ill-mannered :)
 
Then no problem I guess. Just noticing the disparate response to the friendlier treated question that came along later.
You don't seem to be that much so, no.
I'm "a bit irate" as I say...
But it does set the tone. I guess I'd give the question I gave above about asking about what search on & they had used
This would expose things like "do they know the word operator" or even the word "ampersand" and expose some more details. In this way, I think questions surpass accusations, especially with very new users
 
I know
 
2:05 PM
And if they turn out to be unwilling to refine their message or respond, downvote them to oblivion
 
Sometimes I answer that too, for difficult-to-google questions
 
"ask questions first, shoot later"
I used to run a C++ group, about 400 members
And I used to talk about StackOverflow a lot
And people would always say "ooh, THAT site..."
 
But I felt like operator& would appear fairly fast in a tutorial/book, contrarily to some other syntaxes, so I am less tolerant, maybe wrongly, but that's another matter
 
"I asked a question there once..."
"...sorry I asked"
 
Yeah SO is a massive turnoff, I don't disagree
 
2:07 PM
"I just read it now, no I'd never ask a question there."
 
But sadly this is not SO-specific
 
Well that's the Internet pessimism again
 
Yeah, probably
Or just humanity
 
On good days I like to try and help set precedent that we might see a day where the Internet does not suck so bad. On bad days, rather than merely cursing the darkness, I light a candle and look for stockpiles of gasoline to set on fire and possibly burn down the Internet.
But it was designed to survive nuclear weapons, so, hm. Might need more than candles.
 
I think the problem is larger than Internet :)
Humans will be humans
For better and for worse
 
2:11 PM
Well in any case, good conversation, and hopefully perhaps that "ask questions first, shoot later" tendency can win out more in the future.
I tend to go off on high rep users vs. 1 rep users
 
I'm not high rep D:
 
Several orders of magnitude more than 1
These days it is harder to get points; it's a bit of a pyramid scheme.
 
Same order of magnitude as you :p
@HostileFork Yes, it's definitely much harder than when I started as a repwhore
 
These days I mostly comment because I refuse to answer questions that are not defined well enough. So I just poke at the person, because I now believe teaching how to ask is actually one of the most important functions of the site.
Again with the Zen dojo perspective
And I so wish this was around when I was a kid
Except without the douchebaggery
Back when I was a kid on a dial up modem I could use RelayNet on BBSes, and I was trying to write a video game with two players who could use the PC keyboard at the same time
And the BIOS interrupt was not sufficient; you had to replace it. But I didn't know what a BIOS interrupt was, etc, so I had to ask "grown ups" I'd never met
The result? ManyKeys, my first open source library. And to this day I remember the guy who walked me through it, Richard Biffl.
Somebody I've never met, off on the Internets (of the day)...
 
That's a nice guy
 
2:19 PM
I guess when I think about these opportunities of how we can engage or not engage people, I do wonder...I mean, I didn't say how old I was
And I wrote at a pretty reasonable level and had unusual access to "Internet" (as it existed in those relaynet BBS days)
So I think about each of these questions, and maybe because so many people use it we get jaded
And so we don't see each thing on a case by case basis, we don't envision the kid in India, y'know... on dialup
In Turbo C++
It becomes a very callous thing, and I don't think it has to be.
 
Hm, you must be significantly older than me :D
 
I'm 40
 
Almost double
 
Well, then perhaps, you can see it as advice from someone thinking after many years of philosophy
 
I don't disagree with your general advice
I disagree with that specific question :)
But then again, I'm acknowledging that my comment isn't as helpful as it could have been
 
2:23 PM
I would not have answered it. Because I would have expected someone else would have.
I would not have downvoted it, because I don't downvote first-or-close-to-first-time askers unless they actively show a disinterest in feedback.
But I would have asked what they used to try and find an answer prior to asking; what searches. So that's what I'd have done.
If they said "why I need search? u answer my question or not?" => downvote, close
 
Again, that's also what I usually do. This is an exception. Don't focus on it D:
 
Well, then let's agree to agree
 
NO :D
Kidding.
 
Something we can do is actually turn back time
Despite lack of moderator priilege, we can delete all the comments...and you can make that your comment.
My comments now gone... from stackoverflow.com/questions/14928972/…
 
But my initial comment gives an explanation on the downvotes D:
 
2:28 PM
Your new comment can say "before I said X and downvotes, but perhaps a more constructive remark would be..." etc.
In any case, I'll leave it in your hands. You might be right, that the Internet is a lost cause, and that if we worry about it too much then it's a recipe for disaster
 
I added a clarification
 
Well, all right. I still like the version where one asks "what search did you do before asking" because it is a tricky search if you're just doing it symbolically.
But that will do. Take care. Good luck...
 
You too
Thanks for the conversation and kind advice
 

last day (14 days later) »