Hackdayz #18: Mr. Moody

Reading Time: 6 minutes

The Team

Shady Eltobgy (Senior Software Engineer)
Jeremy Haas (Co-Founder & VP Engineering)
Timo Köhler (IT Consultant)

Why we create our own Mr. Moody

Mr. Moody was implemented 👨‍💻, while attending our first offsite event Hackdayz18 at the Oberwaid in St. Gallen. Check out the video if you missed it! The idea was born in a short brainstorming session. Primarly we wanted to implement a Slackbot, because we already are Slack users for years now 💬. We really like to “slack” and love/use several bots already. Of course we also have to deal with new technologies, that might be used for future projects. Besides that, the idea of customizing our own application according to fit our needs is a plus ➕.

Discussing, coding, writing, thinking…. Snapshot of #Hackdayz18

Mr. Moody is based on the niko-niko calendar which is a simple practice to track the team mood, conventional used on a board with stickers  or written on paper. It allows every team member to track his mood at the end of a work day.  The Japanese word “niko” means “smile”; following a common pattern of word doubling in Japanese, “niko-niko” has a meaning closer to “smiley”. This calendar is an information radiator and can be seen as an opportunity to be used on a regular basis (e.g. in retrospectives or dailies) for reflection, adaption and improvements.

Used as a slackbot, Mr. Moody will remind you via direct message to tell your mood and ask you if you would like to add a comment on that. The personal mood calendar and also the accumulated team  mood is shown on a dashboard so the team can use it itself e.g. in dailies or retrospectives or team leads & managers can see how it is goig in the team(s) and see if there is action required.

Mr. Moody is a great complement to other metrics and will help the team identify impediments.

Sometimes we are happy….
…sometimes we are sad!

Technologies we used 🛠

Ngrok – https://ngrok.com/

A very cool, lightweight tool that creates a secure tunnel on your local machine along with a public URL you can use for browsing your local site. When ngrok is running, it listens on the same port that you’re local web server is running on and proxies external requests to your local machine.

Heroku – https://www.heroku.com

Heroku is a cloud platform as a service. That means you do not have to worry about infrastructure. You just focus on your application!

Botkit – https://botkit.ai/

Building Blocks for Building Bots. One of the good advantages to select botkit, is the ability to start a conversation using bot.startConversation() with a specific user using their user ID or channel ID. Very easy to use!

How does it work? 🤔

Botkit is designed to ease the process of designing and running useful, creative bots that live inside messaging platforms. Bots are applications that can send and receive messages, and in many cases, appear alongside their human counterparts as users.

A best effort is made to generate a slackbot where a cronjob ⏱ should be run everyday at 03:00 pm. This job will do the following:

  1. We get from slack the list of all users.
  2. Iterate through the list of users. Afterwards, each user should get the massage, asking about his mood, which is like a variety between different options (e.g. very good, good, normal, bad)
  3. An interaction is done with each user, by asking each user if he/she wants to add a comment.
  4. At the end of each week, another cronjob is run to send all data, and feedback to a certain user or group of users.

An example of how Mr. Moody is interacting

Wanna try it out? 💻

Yes! The code is open source and everything else (technical setup process) is described in the README.MD

https://gitlab.com/47northlabs/public/mr-moody

Mr. Moody Logo

Some other issues and questions ⚠️

The implementation of Mr. Moody is not totally completed. Some points need to be covered in the future. Some of them are as follows:

  • Storing the given rating from each user in a database, where later at the end of each week, a weekly report is generated.
  • When asking slack for giving us a list of all users, where we iterate through each user to interact, the given list is not only for uses, but also for slackbots, and old users. This causes a problem when we try interact with each user, and results in exceptions. A filtering criteria should be done to filter only the current users from unused users, deleted users, or slackbots.
  • ِA cronjob for generating a report and sending it on the admin, is not done in the moment. However, we need to see how the report should be generated, what type of diagrams should the report contain, etc.
  • How do we handle Vacations/Holidays and avoid spamming employees while they are sipping Pina Colada at the beach?
  • How do we handle external Slack users which maybe should not get a Mr. Moody message?

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *