This is Fundbase Nerds, written by the team behind Fundbase.

Go to Fundbase  

Automating Daily Standup

Posted by Tim Blonski on

As I’ve mentioned many times before, we live, breathe, and eat automation at Fundbase. You can find examples of this everywhere in our workflows and even in our day to day job responsibilites. This holds true not just for our developers but all members of our team; it is a deeply ingrained and integral part of our culture.

Daily standup is a given on any modern team and its benefits are well documented. However, it is at high risk for becoming stagnant and team members can lose sight of it purpose. This leads to a montonous, ineffective part of everyone’s day in which we simply go through the motions.

I have touched upon the power of Hipchat (or Slack, etc) integrations in your daily workflow, as have many other awesome engineering organizations. At this point, one might even say that chat client integrations with Github (i.e. webhooks) are almost as standard as a daily standup.

In this post, I’m going to discuss a less common type of chat client integration, but one that is arguably the most powerful integration we have at Fundbase; automated daily standup.

One of our developers is ‘On Duty’ each day of the week; on any given day, the on duty dev is in charge of running standup which starts a 10am.

Daily Standup

If you’re not familiar with chat clients, Funbot is just a Node app which we can customize with our own scripts or by adding existing npm modules.

In our custom standup script (which we hope to release as an open source npm module someday), we basically just set some listeners to move through each phase of standup:

# Description:
#   Begin Standup.
# Commands:
#   funbot begin standup - Begins automated standup

FundbaseJira = require('../lib/').FundbaseJira
FundbaseStandup = require('../lib/').FundbaseStandup
StateMachine = require('../lib/').StateMachine
SalesQuestion = require('../lib/').SalesQuestion

module.exports = (robot) ->
  robot.respond /begin\sstandup/i, (request) ->
    @robot.brain.set 'Standup-room',
    standupAdmin = request.message.user.mention_name

    standup = new FundbaseStandup()
    standup.getUsersWithTickets (developers) ->
      message = "#{developers.join(' ').replace("@#{standupAdmin}", '')}
        @JanWalkiewicz @DominikCarny @VladimirSec @RobertZaduban @JanZajac
        @SrdjanPerendija @wendell @GuyHolding @Anthony @PascalRode
        @stefan Are you ready for Standup ?"

      request.send message
      state = new StateMachine(robot)
      state.addTransition(/^next$/, new SalesQuestion(state))

Then we move through each phase of standup by treating it as a state and passing it to the state machine, which you see with:

state.addTransition(/^next$/, new SalesQuestion(state))

So now Funbot knows to move to the next state by listening for next and what state to transition to:

Daily Standup Daily Standup

And the code …

# Description:
#   Maintain state between standup questions.

HipChatApi = require('../lib/').HipChatApi

class StateMachine

  constructor: (@robot) ->

  addTransition: (regex, nextState, currentState = null) ->
    @robot.hear regex, (request) =>
      return if isnt @robot.brain.get "Standup-room"
      return if @checkStandupEnding(regex, currentState, nextState)
      @addToParkingLot(currentState.currentTask.key) if regex.toString() is '/^parking\\slot$/'
      nextState.enter request

  removeTransition: (regex)->

Following our organizational questions, we check deploy status and begin iterating over the Jira board:

Daily Standup

I’ve detailed how deploy status works in a previous post.

Daily Standup

# Description:
#   Interface with the Jira api.

class FundbaseJira extends JiraApi
  constructor: () ->
    super @_protocol, @_host, @_port, @_username, @_password, @_apiVersion, @_strictSSL

  current_sprint: (complete) ->
    devBoardQuery = "sprint=#{@_currentSprintId}"
    @searchJira "#{devBoardQuery}", { maxResults: @_maxResults, fields: opts }, (err, sprint) =>
      throw err if err
      @_cacheIssue(issue) for issue in sprint.issues
      complete sprint

Notice that each ticket displays the estimate and hours in progress; if over the estimate, the ticket turns from green to red. This is generally where a developer will say why they are behind and can ask for help.

Daily Standup

This is great because it increases specicifity and shifts the focus from the person to the task. In many forms of daily standup, the team will go around and ask each person if they are having any problems or need help, etc. We believe this is less effective then focusing very closely on the specific task and challenge at hand.

After we’ve moved through all the tickets on the board composing the different JIRA states (in testing, ready for testing, in progress, blocked, needing estimate), Funbot (gracefully) tells us standup is over:

Daily Standup

Beyond some of the obvious benefits I mentioned earlier of automating standup in this way, it also: - can be run by anybody from anywhere - keeps overall time of the meeting down - documents standup for the day so anybody can look back for reference if they were unable to attend - allows to continually iterate how we run standup and add/improve features

Our automated standup is one of the best examples of the importance of automation to the culture at Fundbase as a large portion of the company reaps the benefits on a daily basis. Not to mention how enjoyable it is to hack on Funbot until he starts to take some work off your hands. And like a dog, they say your robot begins to take on the qualities of its owners :).

Tim Blonski

Tim is a Fullstack developer at Fundbase.