Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: How to ask questions?

by mstone (Deacon)
on Jun 10, 2005 at 17:55 UTC ( [id://465618]=note: print w/replies, xml ) Need Help??


in reply to How to ask questions?

Programmers constantly deal with two fundamental questions: "What?" and "How?". "What?" describes a result.. the output from some process. "How?" describes the process itself.

Start from there.

When you get answers of the "use {solution X}" variety, it's reasonably certain your question began with the word "How", and that you didn't put any constraints on the set of tools you consider acceptable for solving the problem. You've asked people to describe a process that will produce some result, and that's what they've done.

When you get questions that solve the wrong problem, it's a sign that your "What?" might not have been clear. You probably left the result itself open to interpretation, and someone interpreted the terms differently than you did.

(As an aside, "How?" and "What?" are analytical questions. They encourage people to break something down into smaller pieces. "Why?" is an abstracting question. It encourages people to wrap lots of details up in a nice, tidy summary. I once had a moment of Zen perfection when a girlfriend grumpily asked, "Why do you always feel like you have to explain things?")

To make matters more fun, the question "What?" has at least two meaningful layers of abstraction in programming. The low-level abstraction is a dataflow diagram.. What do you put into the program, and what comes out? The high-level abstraction is a use case analysis.. What problem does the user have that the program is supposed to solve?

Then there's a certain amount of "How?" just in turning the use cases into a dataflow.

I once made a fairly healthy chunk of cash consulting to a company which was having major performance issues with a database-backed program, for instance. They needed to be able to handle 100K+ hits in an 8-hour period, but the program they had bottlenecked at about 12 hits per second. They hired me to optimize their table structure, tweak SQL queries, and so on. I spent 15 minutes profiling the bottleneck, discovered that most of the bottleneck was network and database latency, and wrote a replacement storage system using flat-files that profiled 200x faster. The use-case was that they wanted to store a user's information. Their implicit "How?" was that the data should be stored in a database on a remote server, under conditions where the connection latency amortized very badly.

So, if your question doesn't have:

  1. A use-case statement (what good does the user get out of this?),
  2. Some very basic and abstract dataflow (broadly speaking, what goes in and what comes out?),
  3. Some constraints on the toolset used to solve the problem,
  4. And a rough list of performance priorities (speed trumps readability, or vice versa.. lowest possible maintenance comes first.. must offer flexibility for future growth)

then there are just too many free variables to expect the discussion to be focused.

More to the point, if you can't slot your question into one of these pigeonholes:

  • Am I asking for information about use cases in general?
  • Am I asking about basic assumptions that turn a use case into a dataflow?
  • Am I asking for ways to implement a given dataflow?
  • Am I asking how a given solution (or set of solutions) meets certain performance criteria?

then it's probably a good idea to sit back and figure out exactly what kind of question you're trying to ask.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://465618]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-03-29 10:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found