How to Ask for Help on Slack

Slack is pretty big these days and companies as well as software projects are using it as their primary communications or instant messaging platform of choice. After having used Slack for several years now and contributing to all sorts of teams out there, I've noticed a pattern of good and bad behavior. So, as a follow-up to my post on how to ask for help on technical forums, I wanted to do the same thing but for platforms like Slack. Only this time, I thought I would break them down into Dos and Don'ts and keep it simple.

If you were sent to this article by myself or someone else, it's more than likely you're a violator of one or more of the rules in the Don'ts category. Please read them all carefully.

Dos

  1. Explain what type of help you need thoroughly.

    • WHY? Just like in the forums article, whenever you're asking for help from others, you need to be good about providing enough information. Remember, most humans cannot read minds, so what may be obvious to you isn't to others who have the knowledge to help you. And also, if you consider yourself to be a novice in the subject you're asking for help, explain what your goals are rather than how you think you can get there.
  2. Use threads for subsequent messages following the same subject. This goes for you as a poster and you as a responder.

    • WHY? Threads keep things tidy and organized, and in channels with tens of thousands of people (or more), they're essential to keep who is talking to who separated. Threads also allow you to follow and unfollow them giving you better control over the conversations in which you participate.
  3. Use code blocks and snippets for large pieces of code and log/terminal output, respectively.

    • WHY? Code blocks (begin a message with three back tick characters (`)) and snippets help keep messages readable and from blowing up the channel with hundreds of lines of things others don't care to see. They also provide nice features like syntax highlighting which translates to you getting better help faster.
  4. Be nice, be open-minded, and be thankful.

    • WHY? It's simple. They make people want to help you now and again. Also, keep in mind the things I listed in B3 over on the forums counterpart article. You're asking for help, which is charity, from those who are largely strangers. Act the same way as if you were asking them for money instead.

Don'ts

  1. Never, and I mean NEVER call "@channel" or "@here" in public channels.

    • WHY? These commands alert either all members in the channel or those who are currently online, respectively. There's nothing more obnoxious than someone disturbing everyone to get their question answered. Unless you literally own the channel, do not ever do this. And unless you want to know the quickest way for everyone else to hate your guts and want to not help you, I repeat, do not use these commands.
  2. Don't paste logs or code without formatting.

    • WHY? See #3 in the Dos section. When you don't use formatting, extensive output bloats your message to the point where it's difficult for others to read and it blows up the channel. Learn how to use the available tools in Slack to format your message appropriately.
  3. Don't direct message (DM) someone asking for help.

    • WHY? Channels exist for a reason: they provide organization for common subjects and allow communities to form around them. When you DM someone, you make it so that any help you receive cannot be shared by others who come behind you. So unless you're friendly with that specific person (i.e., they're not a total stranger), don't do this.
  4. Don't take pictures of your monitor with your phone.

    • WHY? Every single OS in use today has built-in (read: free) screenshot tools available in addition to the hundreds of third-party ones available. There's nothing more absurd than you taking a literal photograph of your filthy monitor at a skewed angle showing terminal output. Either learn how to properly use those screenshot tools or copy-and-paste text into either a block or a snippet. And from a functional level, screenshots or photos cannot be searched using Slack's search feature. This means project maintainers and contributors--or just regular users--who might be using key words found in your text output will be unable to locate your post and potentially benefit from community answers. Additionally, screenshots and photos take up a considerable amount of space. For free tiers (most technology workspaces), this means earlier messages are deleted to accommodate space for your content.

Appendix A: Examples of Bad Posts

Here you can find some examples of bad Slack posts as well as an understanding of why they are bad and what a good version of each may look like.

Why is this bad?

  • No details given whatsoever.
  • No error message.
  • No versions of any tools.
  • Poor grammar and no punctuation.

How could this be rewritten?

"Hi, I am trying to deploy a Kubernetes YAML manifest shown below using Jenkins version 2.13 in the following configuration and seeing the message "kubectl not found" as shown in the log trace provided below. Can anyone suggest how I could troubleshoot why this is happening?"

Why is this bad?

  • No details given whatsoever.
  • No error message.
  • No versions of any tools.
  • Attempts to (incorrectly) notify the entire channel.
  • Poor grammar and no punctuation.

How could this be rewritten?

"Hi, I'm using kubeadm to install a Kubernetes cluster on version 1.27 with nodes on CentOS 8.1. After successfully completing the bootstrapping process in which I used the command shown below, I've noticed that kubelet cannot start and throws the following messages as shown in the logs also provided below. I have already performed these troubleshooting steps to attempt to identify the issue. Can anyone suggest how I could continue troubleshooting the cause of this failure?"

Appendix B: How to format code

When using Slack to write about code, which includes showing things like the contents of structured files like JSON and YAML or logs, it is important to use the available tools to make it readable. If you make it difficult for others to help you, which starts with just reading what you provided, you're unlikely to get good help. Using Slack's code blocks and text snippets features help make your code readable and convenient for others to read what you wrote, and this in turn increases the changes you will be helped.

Using Code Blocks

A code block is a way to show structured code using a monospaced font and in a preformatted block. It looks like the below screenshot.

The code block is the rectangular window that begins with selector. Do you see how this not only offsets what was written before but also shows the indentations in the YAML snippet? Making this delineation and preserving the structure are very important when displaying code and should always be done. Fortunately, it's very easy to do with these steps.

  1. Put the cursor in a Slack message where you want to begin a code block.
  2. Type three backtick characters. That's the character ` if you didn't know.
  3. When the third character is typed and it converts them into a rectangular box, paste in the code you wish to show. The formatting of the copied contents will be preserved.
  4. Send the message.

Using Text Snippets

Aside from code blocks, the second useful way Slack provides to display code is in a text snippet. A text snippet is useful in that it is able to display much larger contents of preformatted code, for example with lengthy log messages. Text snippets are also nice in that they start as collapsed blocks rather than full-sized ones as with code blocks.

See the Slack article here on how to insert a text snippet.