Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm going to completely disagree with you. I've always (WITHOUT EXCEPTION) learned valuable information when I've chosen to ask a basic questions I could have Googled. There is a reason people choose to answer it.

Here is a typical basic question anyone could Google: "Could you explain the difference between C-style and C++-style arrays."

I guarantee you that the answer is better than the Google search.

Now let me search: https://www.google.com/search?q=difference+between+C-style+a...

Yep. NOT ONE of the search hresults (I opened about 10) explains what they are, easily.

As a quick test, go ahead and ask your coworkers "Could you explain the difference between C-style and C++-style arrays." They are a hundred times more likely to give you better answers.

I thought I would be downvoted for this comment so I went ahead and got on IRC. This is the answer I received: hi - could you explain the difference between C-style and C++-style arrays?

<[respondent]> C-array is just a pointer to a bunch of values you hopefully know the count of <[respondent]> C++ std::array thing iirc has more type safety

That summarizes EVERYTHING. That's literally it. The key, key, key thing "you hopefully know the count of" comes FIRST. It's just a pointer. You hopefully know the count.

And then it mentions that this is information which std::array can track.

That's it. Try to find anything like those two lines out of all of the links. As far as UNDERSTANDING - as in, if there's a conceptual hurdle, you will never EVER get as easy and quick an understanding as if you ASK someone. NEVER EVER EVER.



I think the point of the parent is that if you are going to ask a basic question, you should respect the person's time enough to do 5 seconds of googling to see if it is sufficient.

Then when you ask the question you can preface it with "I googled and found X, does that sound right or is there more I should know?"

Oddly enough, I've found this is something that is surprisingly hard to get through to some junior people on. They see me as a more convenient search interface so ask me first. I still haven't found a super nice way of explaining that "my time is better spent on other things so please Google before asking me."

That might sound harsh and I don't want to discourage asking me questions, particularly dumb ones (because those can be very important and I want to create an environment where they feel comfortable asking things), but I want to make sure they do their own due diligence first. As someone largely self taught in their domain, it can be frustrating dealing with people who don't resort to that as a first step.


If we're coworker, I'm paid to produce code, and constant questioning does kill productivity because with age I'm slower and slower to get into the zone.

Two questions are about enough to kill a morning productivity.

Have a coworker that does that amount of non work related question chit chat every chance he gets, and it's a mistery to me how he gets employed with those googleable-in-five-minutes knowledge gaps.

Meanwhile it makes the working environment a nightmare for me, becose having the brain constantly picked and drained is extremely atressful, if you also have to, you know, produce results.


C-array is just a pointer to a bunch of values

Unfortunately, that's wrong too. A C array is not a pointer. If you then Google "C array is not a pointer", you will find plenty of results telling you why.


also, I've to add this is an extremely bad question to google (not in general)

"Could you explain the difference between C-style and C++-style arrays"

to solve it with googling you need instead two searches (c array definition and implementation / c++ array definition and implementation) plus considerable brainpower to derive the difference.

what you're asking is thus not a piece of arcane knowledge, but involves a lot of thinking for the answerer.

a good question to ask would be 'where do I find a complete specification of c++ arrays?' - I'd be perfectly happy to sharing resources and even help searching, because it shows you're willing to put in the work to understand yourself instead of relying on someone else to do the differential analysis for you and spoon feed you the results


This specific question formulation suffers from too vague terminology. If you asked me, I wouldn't even be sure what "C++-style arrays" means. IMHO, the most important part of the (imprecise) answer about "pointer vs std::array" was saying "std::array". Just googling that, immediately gives several results that all talk about "decaying to a pointer".

"Because std::array doesn’t decay to a pointer when passed to a function, the size() function will work even if you call it from within a function:"

That's golden. It doesn't fully explain the C pointer/array differences, but it points out their fundamental problem.

Anyway it's not a good example of question requiring a lot of thinking. It is standard knowledge for people involved with C++, so could be a very effective thing to ask someone more experienced, except it's so basic that googling it I currently get a good SO answer on first place: https://stackoverflow.com/questions/7129717/what-does-c-styl...

I strongly disagree only people who read the fine "complete specification" have done their homework. Yes, interrupting coworkers is problematic and doesn't scale, but stackoverflow does (and IRC etc are not bad). I adopting Julia's post as my new non-hostile link to how to ask questions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: