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.


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.

Finding joy in mathematics

I have always regretted losing touch with maths during high school. Part of this is undoubtedly my fault. I wasn’t a great, or really even that interested in being, a student until midway through university. But there’s also something a bit broken in how we approach maths. Both in school and life generally.

I’m talking about maths as a purely abstract phenomena. A series of formulas and steps, divorced from how they relate to the real world. Where multiplication is a table to be memorised and trigonometry takes place purely within a textbook.

This kind of mathematics not only strips away a lot of the beauty and joy, but relegates the subject to one only grasped by those who excel in a particular system. It turns maths into something like an ecclesiastical language, almost scary to the unindoctrinated.

This is a shame, really, as Lara Alcock writes in Mathematics Rebooted:

“…mathematical thinking is not magical. It is often thought of that way in our culture, where it is common to have a demanding career or to run a happy and successful household, yet to say, ‘Oh, I am terrible at maths.’ I hear this a lot, and every time it is clear to me that it cannot really be true: this person is obviously a capable thinker. ”

To some extent abstraction is necessary in schools as currently constituted. Students must be judged against something objective, and must be taught at scale. But does this really require so much concentration on the doctrine, to the detriment of the art?

Why is maths largely rote, rather than logic? Abstract rather than practical?

“Your mathematical knowledge might be rusty and full of holes, but people who can function well in our complicated world must be good general thinkers, and mathematics is just general thinking about abstract concepts.”

When you read about the likes of Newton and Galileo, maths jumps out as a tool for problem solving and creativity. In The Triumph of Numbers, I. Bernard Cohen explores how numbers and maths have evolved over time, and describes a plethora of interesting applications.

Including the algebra of morality:

“[Francis Hutcheson] used this algebraic relationship to translate several commonsense notions about morality into mathematical language. The first is that if two people have the same natural ability to do good (A), the one who produces more public good (M) is more benevolent (B). Conversely, if two people produce the same amount of public good, the one with more ability is less benevolent (since it was in that person’s ability to do more). The plus/minus sign in the equation allowed Hutcheson to factor in self-interest.”

“…he concluded from his algebra that “in equal Numbers, the Virtue is as the Quantity of the Happiness, or natural Good.” That is, he taught that “Virtue is in a compound Ratio of the Quantity of Good, and Number of Enjoyers.” This led him to the important conclusion that “that Action is best, which accomplishes the greatest Happiness for the greatest Numbers.” Here is a precursor, by more than 50 years, to Jeremy Bentham’s (1748–1832) utilitarian philosophy of “the greatest happiness for the greatest number.”

This is a maths of reasoning and personal application. He wasn’t trying to calculate the change from a $20 or the tensile strength of a beam.

Similarly, in The Calculus Story, David Acheson produces probably the best explanation of how to calculate the area of a circle, by imagining a polygon with more and more sides (I think I finally understand pi r squared).

As you might be able to tell, I’ve been reading a fair amount of maths books recently, and the thing that strikes me is how differently mathematicians approach the subject than how I was taught in school.

Mathematicians work through subjects largely by reasoning and logic, not necessarily ever more complicated formulae. They also emphasise the problem solving nature of maths, often tasking you to think about a problem and come up with your own generally applicable rule.

Putting this into practice, I have also been studying maths using Brilliant.Org, which has a similar philosophy:

“In school, people are often trained to apply formulas to rote problems. But this traditional approach prevents deeper understanding of concepts, reduces independent critical thinking, and cultivates few useful skills…The capacity to think critically separates the great from the good. We can grow this capacity by trying — and often failing — to solve diverse, concrete problems.”

I have only finished one module on Brilliant and I’m not sure how it will work as a method for the masses. But I will report back in a couple of months.

In the mean time, I’ll leave you with Lara Alcock again, whose book I really recommend:

“School mathematics tends to come in horizontal slices: children learn basic ideas about several topics, then, the next year, they learn slightly more advanced ideas about those topics, and so on. This is entirely sensible. But it means that the vertical links are not very salient, which is important because mathematics can be seen as a highly interconnected network in which more sophisticated ideas build upon more basic ones. So this book’s approach is to focus explicitly on the vertical links. Each chapter starts with an idea that is bang in the middle of school mathematics—primary school mathematics in many cases—then takes a tour upward through related concepts, arriving eventually at ideas that people encounter in more advanced study”