Bash Your Day

For the past six months or so I’ve used a bash script to start my morning. The genesis of this idea was that I wanted to be more effective at prioritizing reviewing other peoples’ code and writing my own code. Assuming the number of hours one puts into work is fixed (because that is the only way for life to be sustainable), that means that I need to cut back on other things. The obvious things to minimize are time spent in Slack, on P2s (Automattic’s internal blogs), and time spent being distracted in the middle of the day because I can’t focus for whatever reason.

I decided to adapt the idea of reducing the number of decisions to make inspired a bit by Obama always wearing the same suit to reduce cognitive load. Rather than randomly looking at slack/p2s/email in the morning and trying to navigate how to go from one to then next, all I need to do is start a script, and it walks me methodically through everything I think I need to look at in the morning before I can really get to work coding. Eliminate having to think about what to look at and have some gentle reminders to prevent me from getting stuck doing things that aren’t really that important.

Screen Shot 2016-12-12 at 9.34.27 AM.png

The Script Basics

There are three fundamental functions in my script:
1. i_do_say(): Sends a message to the OS X notifications system and to the say command (advanced usage: speed up the rate and change the voice)
2. timed_msg(): sends a string to i_do_say(), then it waits the specified amount of time. The timer can be interrupted by hitting any key.
3. timed_confirm(): repeatedly calls i_do_say() every X seconds, prompting me to finish up and move on. There is an initial message, and then a second message that repeats indefinitely. I can type ‘d’ to add an extra 5 minutes of delay to the time.

The timed_msg() and timed_confirm() commands can be chained with && so if you cancel out of one then the following commands will be skipped. This makes it easy to have multiple messages in a group, but easily jump to the next thing when you are done. Here’s a good example:

timed_msg "Start five minutes of slack and IRC" 3 &&
timed_msg "Finish slack and IRC in two minutes" 2 &&
timed_confirm "Ready for alerts?" "Does today look like a catch up morning?" 180

I mix these commands along with some others like:

  • Opening a link in my email open https://inbox.google.com/u/0/
  • Closing slack: osascript -e 'quit app "Slack"'
  • Opening emacs: osascript -e 'activate application "emacs"'
  • Starting music: osascript -e 'tell application "iTunes"' -e 'set new_playlist to "Coding" as string' -e "play playlist new_playlist" -e "end tell"

The full repo of my scripts are in https://github.com/gibrown/bash-my-day

I have a reasonably complicated script for my morning with a couple options depending on what I am trying to work on. Some days you just know there is a lot of communication to catch up on, so the idea of quitting slack really won’t work, but my default is to get through Slack/P2s/Alerts/Planning/Meditation in about 30-40 minutes and then close Slack and start on reviewing other people’s code. Optimize for unblocking other people and getting myself to work on writing code (which typically is also about enabling someone else). The morning is also when I am the freshest, so it’s a good time to be coding. Once I get more tired in the afternoon I can get back to closing all those tabs I opened in the morning.

I also have a few other scripts:

  • Ending my day to set myself up for being successful tomorrow (close tabs!)
  • Lunch time I usually eat at my desk, good time to empty email and close tabs
  • A script to get me to close out slack again and get back to coding

Most days I find I only use the morning script. I still need to experiment more with whether the other scripts are helpful.

My Morning

You can see all of this in my morning script, but I thought I would run through my thinking:

  • 5 min: Slack and IRC: if something needs a lot of attention this is usually how I will find out. My main goal here though is to find things that need to be prioritized
  • 2 min: Look at alerts in my email: again, check for any fires
  • 5 min: open p2s, see if there are any I really need to respond to. This is my biggest weakness, ts hard to put off responding until later in the afternoon.
  • 5 min: looking at my to do list and choosing what to work on (all in org-mode in emacs)
  • 2-10 min: Meditation – recently added. it’s ramping up over the next few weeks from 2 minutes to start building the habit up to 10 minutes a day where I’d like to be. The ramp up is all scripted too: see timed_weekly_ramp(). I’ve tried fitting meditation into my day a few different ways before with not great success. I thought this may be good way to build the habit.
  • 5 min: Journal – I do a better job working on the important things if I do some amount of reflection. Recently this has been turning into a blog post which I’d like to make more often.
  • 2 min: write a standup report (2-5 lines) for my team about what I did yesterday and what I’m doing today
  • Music starts. I start reviewing code. Script prompts (repeatedly) me to close Slack. Eventually I do.
  • Move on to writing my own code. Prompt is just to write for 10 minutes. Once I get started I don’t tend to stop. Getting started in the face of distractions is usually the biggest problem.

Last week I also added a few options such as explicitly having catch up mornings when I have been away from work for a few days. Rather than pushing me into coding, those focus on getting me to clean out my inbox, and respond to p2s. Some days it is better to just admit to myself that I need to focus on communication rather than coding.

Results

So what impact did this have? Well, thanks to using Rescuetime to track my time over the past five years I have some pretty good data on that. I have my time broken into 5 categories: Most Productive (coding and code review), Productive (Slack, P2s, email), Neutral (mostly random websites), Distracting (Twitter), and Most Distracting (HackerNews, Talking Points Memo, other sites I refresh too often).

By comparing the past 6 months to the 6 months before that I can more or less see how much having these scripts impacted the percentage of time I spend in each of these categories:

  • Most Productive: up 27.7% (more coding and code review!)
  • Productive: down 14% (yay, less Slack!) Went from being 48% of my time down to 41%.
  • Neutral: down 22.6% (a lot fewer random sites!)
  • Distracting: down 13%
  • Most Distracting: down 9%

These metrics aren’t perfect, since what I work on varies over time. When I’m working on lots of hiring there is a lot more time spent on communication for instance. Its a little hard to correct for variations, but I’ve tried to look at the data for some shorter periods also and I get similar results.

I’m pretty convinced that using a script to push me through the morning both makes me feel more productive, and it does have a big impact on how I spend my time.

Openness, Supportiveness, and Leadership

In the Fall of 2015 I took the Emerging Leaders Program at the University of Denver. I really enjoyed the class. Gave me a great framework and space for thinking about how to improve my ability to lead a team. Below is my final essay for the class. The goal of the essay was to review yourself and create a plan for how you want to become the leader you want to be. Since openness is a key part of what I want to do better, what better way to practice than by publishing it to the 100+ people that visit my blog each day. 

What Leadership Aspects I Value

A number of the values of great leadership resonated really strongly with me. I especially get convinced by evidence, so the When Teams Work Best readings felt very compelling (still on my list to read the whole book). The most effective teams practice being open, supportive, action oriented, and having positive personal styles (the venerated “no jerks” policy). Of these four aspects, openness and supportiveness are the characteristic most prevalent in the most successful teams.

I work at a completely distributed company where most folks work from home all over the globe. Openness and supportiveness are values that are very strongly encouraged (intentionally) at Automattic, and I believe are an important part of our culture. When you are distributed and growing you need ways to communicate asynchronously, both across time zones, but also to new employees who will join you next year. Email is terrible at this, so we rarely use it. Our primary form of communication, p2s, are all open by default; our financials are open within the company; all of the metrics we track are open.

And of all the places I have worked I have never seen a similar level of support for for giving folks autonomy and trying to enable each other. Basics like our systems team defaulting to yes when someone has an idea are a stark difference to many other places. That doesn’t mean debate doesn’t occur, but unlike many places the default never seems like a ‘no’.

I have been working in this open, supportive environment every day for over four years now, and yet I feel like I am terrible at being open and supportive. Some of this is certainly the general self doubt we all carry around with us. I’m ok at it, but for working at an open source company it’s striking how little I’ve contributed to open source projects. My blog is the best example of my contributions to Elasticsearch in the open, and the openness I’ve expressed there has been incredibly rewarding when I make time for it. But wow do I find it hard. When I look around at other Automatticians and how fluidly they seem to practice openness, I don’t come anywhere close.

Looking back at the 10-12 managers I have had in my life, I also realize that the best of them were both really open and really supportive. Those two or three jump out immediately to me, and the rest fade into the background noise of a 15 year career. And yes, one of the top three managers I have worked with is my current team lead. That’s what makes now such a great opportunity to learn.

Reviewing Where I Am At

About 6 months ago I expanded my role on the Data Team to try and help fill some of the gaps that have been developing as the team has expanded to 20 people and our team lead has expanded his role within the company. In some areas I feel like I’ve been fairly successful, others have been less so. The role was announced under the title “parity bit”, as a witty reference to the simplest form of error checking data. In some respects the role has also been about being a co-lead, or more accurately, a backup lead for the team. Like most things at Automattic, the role is continuing to evolve. I think it is becoming more of a mixture between a product/project manager where I try and facilitate organizing specific projects and initiatives rather than being a catch-all for everything. Not a dramatic shift, but it feels like it has more focus than a generic “backup” lead.

From these short six months I feel like openness and supportiveness are the things I most need to work on. They are probably aspects that always need to be worked on, but they don’t come naturally to me, and that is probably because I haven’t practiced them enough. Both of them seem tightly bound to a leader’s Emotional Intelligence (self awareness, self management, social awareness, and relationship management) which has been found to be up to 90% of effectively leading a team. Taking an emotional intelligence test during the class I ranked average to moderately high for self awareness and self management. For both social awareness and relationship management I was average. So I have some things to work on across the Emotional Intelligence (EQ) spectrum.

You Can Only Control Yourself

There is not a perfect mapping or path for which EQ aspects to work on to cultivate an open and supportive environment, but for the short term (six months) I have decided to focus on a few specific behaviors. My own behaviors are the only thing I can control, so that’s what I need to work on:

  1. More regular journaling. I think best when I put words on paper and need to form a coherent thought. I’ve re-picked up my intermittent journal that I started back in March of 2004. Let’s see if I can make it a habit. I should probably practice more openness here, and post some of these on my blog too.
  2. Practice Reframing Problems (at least partly through journaling). This was the first item brought up in class, and it jives with a number of other things I have read. In the book Your Brain at Work (discussing brain biology and understanding how you and others react) reappraisal was one of the key methods for controlling your emotions and reframing feels like a similar methodology. Run into a problem or an emotional response, and reconsider it from a different perspective. Find a different benefit or a different way to interpret the event. Or just recognize and treat it as a normal emotion to have. I also want to practice reframing problems so that they are inspiring and sensible for others.
  3. Practice Openness and Supportiveness. This is really broad, but a few ideas really resonated:
    • Post more often. Automattic has embraced chatting through Slack at the expense of p2s. It has mostly been good, but our per capita p2 posting and commenting rate have dropped significantly. So has mine. I think it makes it harder for future Automatticians (and current ones) to stay up to date. Posting takes time, I should volunteer to do so more often, and through that help to clarify project and role clarity.
    • Ask questions rather than providing solutions. I’m terrible at this, I always want to be the one to provide solutions when really helping others to find solutions, enabling them, is far more effective in the long term. It is also more supportive. And yet despite knowing this I catch myself failing at this almost every day.
    • Bring up the uncomfortable issues. We are all smart, we all know there are lingering issues. Be the one to ask about them rather than letting them fester.
  4. Improve my listening. I had a fairly low score on the listening survey I did. 11 points out of a possible 25. So I’m picking a few specific things that I rated myself low on to work on:
    • Don’t think about what I am going to say while someone is speaking.
    • Intentionally learn something from every person I meet.
    • Don’t assume I know what the speaker is going to say before they say it.
    • Be comfortable with allowing silence, allow people to think and react.
  5. Manage my own energy. Again this was a topic that also came from the Your Brain at Work book, and is something I’ve tried working on in the past. Despite not being a muscle, the brain burns 15-20% of your calories every day. Certain times of day my brain is at its most effective. I should intentionally choose to do things that take more mental energy at those times. Control distractions and interruptions, and recognize at any one moment what i can mentally handle working on. Running… meditation… journaling… these are all tools that I know work for me and I should use them more judiciously.

This feels a bit like too many things to really focus on. Choosing is hard and I should consider paring it down, but feels helpful to write them out. I would also really like to have some metrics to track how well I am doing at these, but I don’t think I can come up with them for everything. Ultimately I think everything is about changing habits (The Power of Habit – another great book), so here is how I am approaching these:

  1. For journaling I have already added that into my regular habits three times a week (I use a great little app called Balanced to remind me of habits I am trying to form).
  2. Reframing is tied to my journaling where I am trying to regularly pick an event from the day before to reframe. I added an automatic prompt every time I open my journal that is: “Event from yesterday to reframe: “.
  3. I can easily track posting more. We have good metrics of how many posts and comments I make internally. On average since I started I have been posting 20 times a month and commenting 100 times a month. But while I am commenting at a faster rate in 2015 than prior years, I think my posting rate has fallen to 12 or 13 per month.
  4. Listening seems hard to have a metric or habit for. The best I have come up with is going off of Julian Treasure’s five methods for listening better. I think of them, practicing silence as a part of meditation is the one habit that would be worth trying first.
  5. Which brings us to managing energy where I am positive that meditation is something that I need to build a stronger habit around. My current goal in Balanced is to meditate twice a week, and it’s great when I really make it happen. One related habit that I have been pretty good at building over the past few months is to have a minimum morning exercise routine based off of the Royal Canadian Air Forces’ 5BX 12 minute exercise program. Having something that is short and minimal every day is a much easier habit to maintain.

Looking back at the five major areas of improvements I’ve suggested for myself feels fairly daunting and maybe too large of a thing to focus on. Maybe even unrealistic. At the same time, the individual habits that I think get me there don’t feel that onerous. Like everything, it will require some more iterations and more experimentation.