How to ask a good question

My coding odyssey continues and as a result I stumbled across the how to ask a good question page on Stack Overflow. It’s a site for people to ask questions of a large community of coders (I shan’t share what led me to browse the help centre of a help centre 😇).

While much of the page is understandably specific to questions about coding, reading it gave me several thoughts for some universal guidance for good questions.

Pretend you’re talking to a busy colleague and have to sum up your entire question in one sentence: what details can you include that will help someone identify and solve your problem? Include any error messages, key APIs, or unusual circumstances that make your question different from similar questions already on the site…

• If you’re having trouble summarizing the problem, write the title last – sometimes writing the rest of the question first can make it easier to describe the problem.

So often people come with a simple question or problem that they have buried in so much story/minutiae as to make it boring/unintelligible. But if you really want to find an answer, and quickly, it’s probably best to approach it like click bait.

What are the details that will hook me into your question? Can you summarise as to confirm I even know the answer?

The busy colleague is a good device. When I first started as a journalist my producer told me something similar – I should pitch ideas to him as if he was a stranger in a pub who would leave or find me boring if given a long preamble.

Then:

In the body of your question, start by expanding on the summary you put in the title. Explain how you encountered the problem you’re trying to solve, and any difficulties that have prevented you from solving it yourself. The first paragraph in your question is the second thing most readers will see, so make it as engaging and informative as possible.

Help others reproduce the problem

Not all questions benefit from including code. But if your problem is with code you’ve written, you should include some. But don’t just copy in your entire program! Not only is this likely to get you in trouble if you’re posting your employer’s code, it likely includes a lot of irrelevant details that readers will need to ignore when trying to reproduce the problem. Here are some guidelines:

Include just enough code to allow others to reproduce the problem. For help with this, read How to create a Minimal, Complete, and Verifiable example.

Good questions contain context and are rarely just one question (more reason press conferences and panels are bad).

When I’m really trying to pick someone’s brain or find an answer I often break questions down into their component parts. If it’s code we need to establish we’re all using the same version. This applies to basically everything.

Questions can go awry when we’re each making assumptions about intentions, definitions, steps etc. So if you’re trying to find something out it’s often best to start small, at first principles.

You can then walk through the problem with the person, just as the respondents on Stack will try and replicate problems. Sometimes you may discover you’re asking the wrong question. Are the assumptions baked into the question the real answer?

Obviously this only works in a medium where you can go back and forth.

Lastly there needs to be some amount of good faith. This is why I like anonymous questions delivered by a moderator at events, and why short interviews make little sense. Is the question a genuine attempt at knowledge or is it trying to convey something else?

As usual my emphasis.

Never look at trees the same

When you know that trees experience pain and have memories and that tree parents live together with their children, then you can no longer just chop them down and disrupt their lives with large machines.

I cannot remember a book that has affected me as much as the hidden life of trees.  Written by a German forester Peter Wohlleben, it contains stories of pain, opportunity, luck, loss, sharing, community, interdependence and equality. A tree is not just a tree, it seems.

Unfortunately, there is some controversy, and I am not capable of separating fact from anthropomorphic embellishment. Are trees really somewhat “conscious” (my word) of, and looking out for, their “children”? I don’t know.

But given reasoning, Wohlleben’s firsthand experience, and the numerous studies he cites, there must be a grain of truth to the notion that plants are more than I had imagined. That my tendency to rip up leaves as I walk along is not a victimless crime. That the “pain” compounds through generations.

Probably what struck me most were the descriptions of community, of interdependence. Passing on nutrients, creating shelter for one another. Partly because it requires the least blind belief – of course trees are better off together than alone. But also because it provides examples for the rest of us.

 

Scientists in the Harz mountains in Germany have discovered that this really is a case of interdependence, and most individual trees of the same species growing in the same stand are connected to each other through their root systems. It appears that nutrient exchange and helping neighbors in times of need is the rule, and this leads to the conclusion that forests are superorganisms with interconnections much like ant colonies.

I don’t want to stretch this analogy too far, but of course this could describe us, with a few tweaks. That it doesn’t is a choice. Would trees be the same if given a choice?

A tree is not a forest. On its own, a tree cannot establish a consistent local climate. It is at the mercy of wind and weather. But together, many trees create an ecosystem that moderates extremes of heat and cold, stores a great deal of water, and generates a great deal of humidity. And in this protected environment, trees can live to be very old…

…To get to this point, the community must remain intact no matter what. If every tree were looking out only for itself, then quite a few of them would never reach old age. Regular fatalities would result in many large gaps in the tree canopy, which would make it easier for storms to get inside the forest and uproot more trees. The heat of summer would reach the forest floor and dry it out. Every tree would suffer…

Every tree, therefore, is valuable to the community and worth keeping aroundfor as long as possible. And that is why even sick individuals are supported and nourished until they recover.

(My emphasis)