BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage Articles How Behaviour-Driven Development Helps Those with Sleep Disorders Contribute Effectively

How Behaviour-Driven Development Helps Those with Sleep Disorders Contribute Effectively

Key Takeaways

  • Invisible illnesses, including sleep disorders, are more prevalent in the workplace than most people realise
  • Techniques like sketchnoting, and candour with one’s team can help those with sleep disorders to facilitate their own productivity 
  • Teams that are open and accepting of those with sleep disorders benefit in their planning accuracy and quality practice from diverse viewpoints 
  • Measures that teams can take to facilitate those with sleep disorders can benefit everyone on the team
  • An open and welcoming team culture plays a large part in helping team members overcome challenges

When I was a young software engineer, fresh out of college, I was willing and eager to be an active, contributing member of my software team. There was only one problem; I had a sleep disorder, which would not be diagnosed for another nine years. The diagnosis made sense of a lot of my personal experiences in the industry, as I learned to negotiate a new way of working within software development, test and automation. Along with my own personal journey came new information about sleep disorders in general, and how software teams can help those of us with such challenges to be active contributors in their development lifecycle. In so doing, the teams benefit from their input, from a diversity of viewpoints in analysing requirements and the software being developed, and in laying the foundation of acceptance for other challenged team members in the future.  

What are sleep disorders?

Sleep disorders are conditions that affect sleep quality, timing, or duration and impact a person’s ability to properly function while they are awake. Some examples of sleep disorders include:

  • Insomnia - a failure to achieve sleep
  • Delayed Sleep Phase Disorder - where sleep onset happens later and later every day
  • Obstructive Sleep Apnoea - where your airway is blocked during sleep
  • Restless Leg Syndrome - involuntary leg movement while sleeping
  • Narcolepsy - a generalised instability in switching between sleep and wakefulness
  • Idiopathic Hypersomnia - similar to Narcolepsy, but with factors that are still poorly understood

It’s worth remembering as well that all of these diagnoses are fuzzy and often overlap. 

For myself, for example, my diagnosis is somewhere between Idiopathic Hypersomnia and Narcolepsy. That means I get Excessive Daytime Sleepiness (EDS), Sleep Drunkenness, rapid REM onset, transient cognitive deficits and some other disturbances. In my case, I became aware I had an issue after my son was born.

We had the usual sleeplessness for a while, and when he started sleeping through the night, I didn’t recover. Then we broke down what my actual sleep experience was and had been for years, moving from subjective to objective understanding. It was a series of questions and answers: 

Me: Y’know when you wake up in the morning, fall back asleep and dream the entire day in five minutes?

Others: No… No…

Me: Y’know when you have entire detailed conversations in the morning and you can’t remember having had them an hour later?

Others: No… No…

… and so on. I went back through my history - remembering when I was 17, coming home from school at 5pm and napping, every single day. Remembering sleeping in lectures that fascinated me when I was in college. Remembering, in fact, waking up while speaking to the lecturer, not aware of what I’d said. Remembering my first job out of college, how hard it seemed to think and remember things. 

With a good primary care medical practitioner and a sleep specialist, and after a thorough sleep study, it all started to fall into place. I started on medication, which really helped my day-to-day experience - though it will likely never feel the way it does for normal sleepers. I’ll never wake up refreshed. I may still have symptoms on a bad day. I even have some strange additional sleep symptoms since starting medication, such as sleep paralysis, and sleep attacks. I’m happy to live with these rare occurrences though, if it means I have a somewhat normal circadian rhythm. 

On a day-to-day basis, my life looks mostly normal, and I should make it clear that my sleep disorder is not as severe as others’. I may experience some attention or cognitive deficits around midday or late afternoon, depending on a lot of factors. If I feel that coming on, I might dedicate some of my lunch break to having a nap. Aside from this Excessive Daytime Sleepiness, the next biggest issue for me is transient cognitive deficit.

Cognitive Deficit

Cognitive Deficit describes an inability to retain detail or parse them effectively and draw conclusions. The memory issues can manifest in a few ways. Short term memory is probably the most commonly affected - when suffering from EDS especially, it can be hard for the information to "go in", or rather for it to "stay in". 

In other circumstances we may retain something for several hours, even days, and then spontaneously lose the memory of it. It can be very hard to evaluate what is a firm memory and what is not. Many of us use backup methods for keeping track of important details. Note-taking is somewhat of an art-form among sleepy heads. I used to use pen and paper for this, and always had a notepad with me for calls and meetings. With the advent of the pandemic, I started experimenting with digital methods. Lately I use OneNote for work notes, and Google Keep for personal notes. Both can be used on mobile devices, and so the capability for taking notes, and for having that information on hand, travels with you. The one trade-off from hand-written notes is that it can be more difficult to connect data diagrammatically - as someone who conceptualises in a very visual manner, it was very useful to be able to draw my notes as well as using script. As such, I’ve invested in an eReader device that has a pen interface, which allows me to draw as well as type notes into the apps mentioned. It’s still early days for that, so I’ll see how that pans out. 

For me, focusing on multi-sensory learning helps to improve my retention of important information - this is where drawing relationships spatially, as well as just jotting bullet points helps to lodge that data more securely in my head. This practice is commonly referred to as "sketchnoting"; there are many very beautiful examples online, but I just focus on whatever is necessary to capture my own understanding. I also recommend "re-noting" notes - take the notes that you took in the moment and condense them further, reading them aloud as you do so. I’ve even heard of people singing their notes to themselves.  

Amytangg, CC BY-SA 4.0, via Wikimedia Commons                     

There are other types of operational information that don’t require separate notes to be made, as they arrive to us digitally - these include email, Slack messages, etc. These methods come with their own means of storage and re-reference, however I sometimes find that I need to make temporary copies for more immediate reference. It’s like the difference between cache memory and main memory on a computer; keep immediate knowledge brief but readily accessible, and then dig deeper for context. On Slack, I do this by sharing a link to a message or thread to myself. With email, I use category-based search folders, and then tag the required email using my "Memo" category. 

Sleep Disorders and Work

As you might imagine, most jobs involve having timely access to some kind of operational information. If someone is unable to store or call that information to mind, it can seriously impair their effectiveness. 

If it’s noticed, it may be interpreted by colleagues in a variety of ways, some of them negative. Even if it’s not noticed, it can lead to considerable anxiety on the part of the sufferer - "Will I remember what I need to remember?", or even worse, "Will I be found out?" This last fear is especially common among those who, for whatever reason, have not felt able to share their condition with their manager or teammates. It can also lead to crippling Imposter Syndrome - a sufferer may doubt their ability to do the job for which they were hired. 

I want to stress that the answer to this is almost always "Yes, you can do the job!" Memory issues are transient, and can be managed - for example with the methods described above - and employers generally hire based on experience, attitude and aptitude, not some ability to perform feats of memory.

Additionally, the team benefits from having people of diverse backgrounds and lived experiences contributing to the software that they build. Imagine having someone on your team who - because of their sleep disorder - is keenly aware of the attention drop-off pitfalls that UI developers often inadvertently build into software, and can help steer the team clear of them. Imagine a developer or tester who - because of their sleep disorder - is extremely motivated to ensure that the code is legible and easily understandable for future re-use. These are just two examples, but research [1] has shown that diverse teams operate better and plan with more accuracy than teams with narrower ranges of backgrounds and experience. 

How Behaviour-Driven Development Can Help

Some of the issues that I have encountered with my sleep disorder have affected my memory, my focus, and my wakefulness in professional settings. Key practices within a Behaviour-Driven Development based workflow can help me to sidestep these particular issues - Behaviour-Driven Development is an approach to software development that was devised to address drawbacks that had become apparent in more traditional methods of developing software. The main issue being communication – how do we ensure that everyone in our organisation is working on the same page and has the same understanding of what we need to  develop and how?

The Three Practices of Behaviour Driven Development are Discovery, Formulation and Automation

The core practices are:

  • Discovery - where we try to learn whatever we can about the next change that will be implemented
  • Formulation - where we build our single source of truth by writing concise scenarios that describe the desired behaviour of our software using domain terminology, and 
  • Automation - where we tie those scenarios to automated routines that perform the repetitive tasks for us

A common way of conducting this discovery is using example mapping - a way of categorising ideas on "cards" (real or virtual) and ordering them for better understanding. Starting with the story card, we then create a set of rule cards, and then for each rule, we create one or more example cards. Questions that arise and that can’t be answered by those in attendance are written on question cards for follow up later. 

Example Mapping involves the expression of ideas on "cards" so that they can impart meaning to the issue at hand. 

With this knowledge, we go to formulation, where we write a set of scenarios in plain language that describe our software’s desired behaviour. This becomes our single source of truth, defined using our own business language, to which everyone refers back.

Gherkin syntax allows us to express & automate desired behaviour of software using plain language

So, for me, engaging in discovery - especially when using example mapping - renders the tasks at hand in a clear, easily understood manner, which helps when I’m having an episode of "brain fog". Having clear and concise descriptions of functionality in a single source of truth helps when I’m unable to recall what was discussed; I can refer back to the Features. Automation helps when performing repetitive tasks precisely the same each time would be complicated due to some transient cognitive deficits. 

Teams that follow BDD based workflows also tend to engage in other practices, such as mobbing, and having these active/passive collaborative sessions where the other parties are actively engaged in helping you understand can aid understanding and retention of information. I have been in situations in the past where I would have struggled with the complexity of some upcoming change, and what may have taken days and several long email threads was effectively explained in-person within twenty minutes. There also tends to be a culture of openness in these teams, of meeting team members where they are and helping them to contribute to the best of their ability, which necessarily improves engagement and mental health within the team. The open discussion activities within teams that follow BDD practices take the Agile concept of democratic teams and runs with it, making it a cornerstone of day-to-day work. 

Lessons Learned

I’ve learned that, for me, it’s a benefit to be up front about my needs, to make it clear that while I have challenges, I still want to work with the team towards common goals and contribute. A good team will respond positively, and understand that diversity of experience among team members all contributes toward good software. In theory, if a team responds negatively - well then we’re not a good match, which is also valuable information; it has, in the past, given me the impetus to look elsewhere for a team that may value my contribution.  

Advice to Teams

The following is some advice I would give to teams accepting new members into their ranks. This is obviously geared towards those who suffer from sleep disorders, but they can benefit the onboarding of any team member, whether they have sleep disorders, invisible illnesses, mental health challenges or none of these.

Be open. Be generous. Never take it personally if someone drifts off to sleep during a meeting. Ask: how can I/we help you to contribute to the level you would like? Understand that their input is heartfelt, even if they seem tired or distracted. And above all, make it clear that if anyone has persistent challenges in their life - whether it’s sleep disorders, chronic health issues, mental health issues - that the team can be flexible around them, and there’s no reason for anyone to be excluded. 

References

1. Rock, D. Grant, H. Why Diverse Teams are Smarter. Harvard Business Review Accessed Dec 14, 2022

About the Author

Rate this Article

Adoption
Style

BT