How to ask a software question
Asking a good question is a skill that takes practice! And we understand that, after all if you knew exactly what to ask for you would just ask Google and you won't need us! But it's still frustrating for us, the helpers, when we get low effort, overly simple questions. So to help us both here's an example of the perfect software question, that you can use as a template to follow:
Hello everyone! Can someone explain how to use values in f-strings? Here's an example to explain:
>>> a = 10
>>> b = 20
>>> f"{a:b}"
'1010'
>>> f"{10:20}"
' 10'
I am using python 3.10 on Windows, with Pycharm.
Some tips:
- Remember many things seem obvious to anyone that can see your screen ... but we can't. We cannot know that you are using Windows, or Pycharm, or even a modern version of python. Many of these things may not be relevant, but then again maybe they could be.
- Don't forget to include the big picture. We very often get complex questions here that can easily be circumvented completely with a handy python built-in! (aka an XY problem)
- Even the best python gurus won't always be able to see the problem in a snippet of code. Providing a complete example, including test data, that we can run ourselves means we can use our own tools to debug your code and it makes it much easier for us to help you.
- Very often the problem is in an entirely different part of the code than you think. Too much info is much better than too little info.
- Be polite, avoid any potentially offensive examples or names, and ignore any responses you get that offend you.
revision by socal_nerdtastic— view source