Slack Format Messages With Markup

Posted on  by admin

Without a doubt, Slack is one of these apps that turned into a favorite tool for many companies worldwide. In the first year after its launch, the number of Slack’s daily users has surpassed 500 000 and more than 60 000 teams are using it worldwide.

To disable the Slack real-time editor a.k.a the parser that hides the Markdown markup, activate the option: Preferences Advanced Format messages with markup. See the image below: From now on, all Markdown symbols will remain on the screen and the WYSIWYG buttons will also disappear. The ‘Add To Slack’ action allows you to push messages about a form save or submission to Slack. JavaScript widget - 30 examples found. These are the top rated real world JavaScript examples of jQuery.widget extracted from open source projects. You can rate examples to help us improve the.

Why? Because Slack brings agility to many teams and everyone loves it. But what does it do to our productivity? Does it always go up, as many would claim, or does it sometimes plummet? I started asking myself this question when I joined Kanbanize – a company working on one of the leading Kanban tools on the market.

It must have been my second or third day at the company when I used Slack to request something from a colleague. I guess I’ve asked for clarification or something of that sort.

I was quite surprised when, instead of providing the clarification I needed, the colleague asked me to submit my clarification request as a comment on a card that we were tracking on the team Kanban board. A bit later, I realized that requesting work over Slack was not accepted well at Kanbanize and that triggered my curiosity to learn more about the root cause.

The Talk With the CEO

As it was the CEO who had asked everyone not to request work over Slack, I decided to just go ahead and ask him about his motives. I thought he wanted to track everything in Kanbanize because he was the CEO and wanted to lead by example. However, what he said was a bit different:

“Slack is a great tool for given contexts and a lousy one for others. If you need to distribute information across different channels and get people’s attention fast, Slack is your best friend. However, if you want to optimize your team for productivity and flow (meaning that you need to produce as much of X as possible), then using Slack might be a terrible idea. The problem is that nobody gets the difference.”

I happened to be one of those who “didn’t get it”, so I searched for more information on the topic. Reading through a bunch of Slack user reviews, it became evident that our CEO could be right.

Samuel Hulick from UserOnboard, shares:

“With you (Slack) in my life, I’ve received exponentially more messages than I ever have before. And while it’s been awesome to have such a connection with you, it has been absolutely brutal on my productivity.”

The founder and CEO of AGORA.co Elsa Sze says:

“Slack is like a jungle!…it’s synchronous nature has made the content virtually impossible to consume in an asynchronous way.”

Samuel and Elsa are just two of the many people who expressed their frustration with Slack. This comes as an alert that it is being misused in various contexts, that it was never meant to fit in, and this makes a lot of people miserable.

Lean and Kanban Save the Day (the Science Behind Optimal Communication)

Joining the Kanbanize team has been a challenge. During my initial company training, I had to learn a lot about Lean and Kanban, before they let me do some real work. Not an easy task, but quite rewarding. Looking through my “new Kanban eyes”, I started to understand why Slack alone was not sufficient for optimal team collaboration. There are three main areas, where it falls short.

Too Much Work in Progress

Slack is really easy to use. This tempts colleagues to request small tasks of each other because it happens much faster. However, after a while, these small tasks turn into a long tail of work in progress. This is how team members start to overload themselves with tons of work, which can (and will) have a negative impact on their productivity.

As a practical implementation of the Lean principles, the Kanban method is very sensible when it comes to work in progress. A main practice of the Kanban method states that work in progress should be limited in order to avoid multi-tasking and long cycle times. Unfortunately, this is a place where Slack cracks, because we cannot limit the amount of work that’s being requested from us over IM.

Context Switching

Most people like getting messages. After all, we are human and as such, we are social creatures. However, as humans, we also have limited brain power, which doesn’t allow us to concentrate instantly. Studies show that achieving flow (a state of maximum concentration) sometimes takes as much as forty minutes.

You must have been there. The deadline is close, there’s a lot of work to be done, you try hard to concentrate on a real nasty problem. It’s minute 39, you’re almost there! Then someone IMs you “Hi, do you have a sec?”. BAM, 39 minutes gone. If that happens more than once a day, you are most likely going to work on the nasty problem at home after everyone is asleep. Not to mention how irritated people can be if colleagues constantly distract them from their main task.

Pull vs. Push

One of the lean principles says that we should establish a PULL system that only produces what our customers want. For example, many automobile manufacturers only build cars if there’s an actual order from a customer and if there’s enough free capacity in the factory.

Let’s compare this to our Slack scenario. You are at minute 39, almost there to achieve flow. Would you say you have the capacity to get a new order? Well, unless you somehow can work on two things at the same time, you can’t take the new order without canceling the current one. However, the sender of the message doesn’t really care about your capacity and clicks on “SEND”. Most of the time, this results in someone being interrupted, which is a form of waste in the Lean world.

So, What Do We Do About It?

The solution that I have in mind is best described as a “Publish – Subscribe Pattern”.

In software architecture, publish–subscribe is a messaging pattern where senders of messages, called publishers, do not program the messages to be sent directly to specific receivers, called subscribers, but instead characterize published messages into classes without knowledge of which subscribers, if any, there may be. Similarly, subscribers express interest in one or more classes and only receive messages that are of interest, without knowledge of which publishers, if any, there are.

If you are not into programming, you may think of Pub – Sub as a Job Board. If you need somebody to mow your lawn, you don’t usually go around asking people whether they want to do it. You post a job (publisher) and the people who are interested will give you a call (subscribers).

Combine Slack with Kanban for Optimal Team Communication

I believe that the key to efficient and effective team communication is implementing the Pub – Sub pattern, where a Kanban board is the central location that we visualize and subscribe to and Slack is an auxiliary tool that enables real-time collaboration, when necessary.

* Why visual boards are so important?
As Dr. Thoralf Sundt said once “If I can see it, I can fix it.”

Many teams already use Kanban boards to visualize their work. We just need to take it to the next level by following a couple of simple rules:

  • All team members regularly update the status of their tasks by moving the corresponding cards to the right column.
  • When someone needs help or cannot proceed with a given task, they mark the corresponding Kanban card with a blocker.
  • If a team member works on something, it has to be represented by a Kanban card on the team Kanban board. At Kanbanize we say: “If it’s not on the Kanban board, it doesn’t exist”.
  • Use Slack or other direct forms of communication when:
    • You are about to miss a deadline and you urgently need help
    • You need to discuss a complex subject and face-to-face is not an option
    • You want to make sure that a given message is seen by a given person or group of people

The Benefits of Using Slack with Kanban

First, if we have all tasks represented by Kanban cards on our board, there’s no need to ask questions such as “What are you working on?”, “Do you have any issues?”, “What’s the status of X?” and so on. The information is published to the Kanban board and everyone who’s interested goes there and check it. There is no need to say that this eliminates a lot of the redundant communication from our process.

Second, if we only use Slack for important, time-sensitive matters, we dramatically reduce the number of instant messages we get, which in turn reduces the number of involuntary interruptions. Moreover, if we only use IM for this purpose, people will know that if someone sends a message over Slack, then it’s important.

These are just a few simple rules that everyone can follow, but it is amazing what they can do for you. Try running your teams like that for a week and you will see for yourself that Slack will feel great again.

What Is the Bottom Line?

Slack is a great tool, but it has to be used for what it was made – instant communication. It sure brings flexibility to project teams, but at the same time, it can harm efficiency and productivity.

Teams need to realize that Slack is not a project management tool. When it comes to project management, there are much more suitable solutions such as Kanban and Kanban boards in particular, which can eliminate the loss of information, create a smooth workflow and reveal the full capacity of a team.

And just for the record, we talk a lot about Slack, because we at Kanbanize have been using it for almost two years now. However, the article is generally true for Skype, Teams and virtually any other real-time messaging service.

Related Posts

  1. Kanban Charts Part I: Cumulative Flow Diagram
  2. Scaling Kanban: Building Organizations for Long-Term Survival
  3. Optimizing Efficiency? Forget Multitasking!
  4. 6 Reasons You May Fail with Kanban Implementation
czas czytania:6 min
  • Technologies

Code review is an important part of development process. Various teams use different styles from “over the shoulder” to the ones based on tools like Gerrit. However, more and more Git servers (like GitLab) give merge request functionality, which makes incorporating code review process easier.

Regardless of used approach two things are still hard i.e. review process itself and reminding others that there is code to review. Automated reminding is main subject of this post. We’re going to use a popular and powerful messaging app – Slack and GitLab to create a code-review bot that can list all merge requests and assign people to review them.

Slack integration

Slack is a popular messaging app for teams, which is very developer-friendly. By exposing API and various integration points it is possible to adapt its behaviour to needs of a team. Integrations with other systems such as GitHub, Jenkins or TeamCity are available in app directory. If our needs cannot be satisfied by what is already available, we can write our own app.

Slack allows to:

How To Format Messages In Slack

  • Send message via incoming webhooks
  • Add slash commands (messages with special meaning like /remind or /giphy)
  • Interact with Slack using Web API
  • Write custom client using Real Time Messaging

For needs of our bot we will use incoming webhooks.

Incoming webhooks

Incoming webhooks allow sending messages to configured channel (or user) on Slack. It is achieved by making simple HTTP POST request. Creating incoming webhook integration starts by adding one to Slack domain

Slack Format Messages With Markup Function

We can configure recipient of a message and set custom icon for out bot. What is the most interesting for us is Webhook URL which defines endpoint where we should send messages.
After configuring integration, let’s create a very simple application that will send message to Slack:

After running this program we’ll receive a message on channel configured before:

Now, let’s add some more mentions and links to the message:

Any user can be mentioned in a message by including user name prepended with @ and adding parameter link_names to request. Adding links is simpler; it’s enough to just place URL in a message or, if different title is required, use format <URL title>.

After getting familiar with basics, we can make our bot make something useful and integrate it with GitLab.

GitLab integration

How

GitLab is a project management system built around Git. Feature that we need is called merge requests. Each merge request can be awarded with emoji like thumbsup or +1. For simplicity, let’s assume that we use only thumbs up and thumbs down to mark merge request as good or bad. Also, following best practice, each merge request must be reviewed by two developers.

Slack Format Messages With Markup Tool

Listing merge requests

Fortunately for us, GitLab exposes HTTP API that gives access to all required information. Moreover, there is .NET library, called NGitLab, which covers a part of API and allows to quite easily add support for the rest of it. Let’s start by listing all merge requests and sending it via Slack.

Now, running this program will result in a nice list of all opened merge requests.

Award Emoji

Next thing to do is to get current awards for all merge requests. Unfortunately, NGitLab doesn’t cover that area of API and we need to do it ourselves. Luckily for us, it is pretty straightforward and based on API class that hides all hard work:

Using that classes we can access award emojis for any merge request. Using that and a list of developers in teams (for example, read from config file) we can assign people to each merge request. For simplicity we’ll do it randomly. After implementing that and a small refactoring, we get fully functional code-review bot which relieves us from deciding who should do each code review.

Summary

We’ve built a simple application that uses Slack and GitLab to automate part of code-review process. Setting it up as repeated job in Task Scheduler will further automate that process. However, the whole solution can be made a bit better by implementing smarter algorithm that assigns people to merge requests.
Our team have been using similar solution for a few months and there is visible difference. Selecting people by mentioning them make them feel obligated to do review and there is no “someone else will do it” syndrome or postponing it forever.

References

Slack Format Messages With Markup Button

  • Incoming Webhooks, Slack API,
  • GitLab API,
  • Full code of sample application.

Microservices with minimum overhead using ASP.NET Web API and Azure – part 1 – Architecture

Slack format messages with markup function

Retention Policy in SharePoint 2013

Slack Format Messages With Markup Key

Introduction to Claims-Based Authentication and Authorization in .NET