# How to ask scripting questions - efficiently

I read many of the scripting related questions / comments / edits. Some comments and edits are predictable and a lot of them fall in these categories

• trying to get more info
• trying to reduce the question to one topic at a time where possible.
• trying to understand the desired end-result (to allow focus on a solution rather than fixing OP's code).
• fixing code indentation / pep8
• asking for Minimal Viable Product code snippets, to allow us to see how far they are in their understanding of the problem. Makes plugging in solution code easier.
• asking for full error messages, telling about debugging with terminal open.
• ... i probably missed many

Is it realistic to expect all comments / edits to be avoidable? I don't know, but why not at least attempt to streamline it. I'm optimistic that we can do this much better. Some of this is covered in this question/answer, but i'd like to see if we can compile a list of "pro-tips" for people asking questions about

1. add-on development
2. general bpy scripting
3. problems using / installing existing add-ons (with errors, code stuff ..not conceptual usage)

StackExchange continuously evolves and new ways of pre-empting weak questions will emerge (maybe show this list for the first 5 questions by one user tagged as bpy, script, python.)

I'm looking for pro-tips from you, kind of like the zen of python : short points which make a path of least resistance bordering on philosophy.

In no particular order or phrasing (non exhaustive).

• Don't worry we don't expect you to be proficient at Python or Blender.
• Familiarity with Python is a bonus and get to know how a feature behaves from the UI before trying to script it.
• TextEditor > Python > Templates > is a great place for short Blender Python (bpy) snippets (UI, mesh operations, icons).
• yes use the search feature for a few minutes, usually feeding 3 or 4 keywords returns some interesting results.
• start Blender from a terminal to catch errors that don't get reported into the info header.
• if you get Errors generally the first or the last line of the error will return search results, but if you can't make sense of it. Paste the full text of the Error as an Image or as Text into your question to get faster answers.
• If you have code describe its desired outcome first
• then show the code, but do show it.
• sometimes your code can be replaced by simpler code, that's another reason to describe your end goal.
• if it's a lot of code please take the time to figure out the shortest possible code snippet you can provide that still allows us to run it and see the undesired outcome for ourselves. Even if this seems a lot of work, most likely you will learn a lot from the process and possibly solve your own question before asking it.
• if there are multiple problems, split your question into separate questions. We don't care how many unique questions you ask, but we do care about keeping the information modular and applicable to narrow topics
• Narrow questions allow the title to be more descriptive and easier for searchers to find answers and up-vote your question.
• if you paste code make sure it's indented correctly in your question and uses 4 spaces and not tabs
• if your code snippet relies on a .blend with certain conditions (animation, keyframes, example objects) please link to one so we can load it and load the code and hit run.
• Thanks for this. Since python is our largest tag, we're looking to have a post/discussion soon about revamping the scope of this. This will be a good reference. Jan 14 '16 at 17:36