4

May we ask about HOW something works (for an explanation to understand the code) - even if the code compiles successfully?

I know generalising is forbidden as questions should be on-point / on topic but whilst learning from the ground up there does come circumstances where one just does not understand how a piece of code works.

On 'How do I ask a good question' the following is said:

Introduce the problem before you post any code...Explain how you encountered the problem you're trying to solve

The word: Problem is mentioned 14 times on that page alone (excluding the one in the example), so even if our code is not proving a problem is it permissable to ask for help on how some code works?

Many thanks

6
  • 1
    Depends, if it seems like is a whole code block or a method I'd say no. If it was a specific part of code I'd consider it to be okay
    – George
    Jul 27, 2017 at 14:38
  • 4
    You can ask questions like this, but you need to be very careful, as they often end up being too broad. If you cannot provide any context to narrow down the scope of your question, or you have no background knowledge in the area, then you will probably not be able to ask this in a reasonable way.
    – Cody Gray Mod
    Jul 27, 2017 at 14:39
  • @CodyGray I see, so... we must have a generally good idea about what is going on, even if we do not understand it all. In a beginners circumstance (like mine) this is a hinderance.We are unable to Google how something is done the way it is done. What would you suggest?
    – davvv
    Jul 27, 2017 at 14:41
  • 2
    I would suggest that beginners buy a book or find some other type of tutorial. Stack Overflow questions only work for specific, narrowly-defined subjects. We cannot teach programming languages or other broad skills here.
    – Cody Gray Mod
    Jul 27, 2017 at 14:42
  • 5
    Most of these questions come down to a lack of research...the answers alomost always can be found by looking elsewhere.
    – Paulie_D
    Jul 27, 2017 at 14:43
  • 3
    'one just does not understand how a piece of code works' - well, that is one good reason for stepping through with a debugger, noting values at each step. Jul 27, 2017 at 14:55

0

Browse other questions tagged .