01-Sep-2016 by Allison McMillan

Read Time: Approx. 3 minutes

Abstractions: Code Hospitality

Nadia Odunayo{:target="_blank"} talk on Code Hospitality{:target="_blank"} was really fantastic. I had heard good things about this talk from when she gave it at RailsConf so I was looking forward to seeing it in person and it’s a really great metaphor for learning to code. She started by talking about being a guest or being a host. A host is receiving a guest, they need to learn approaches to problem solving and communication. When we don’t have good on boarding and aren’t effectively walking through code with peers, we’re being bad guests and hosts at work. She has a quote from her friend who said “it’s like rails is my city and I’ve lived here my whole life.” It’s a great way to think about working with newcomers. You’ve been in this city a while, you know the neighborhoods, restaurants, etc. but someone who is brand new doesn’t know that critical information and it’ll take them a little while to learn it. We should talk about how we can better collaborate when lots of people might feel vulnerable (as being new to a codebase or even being the experienced person on a codebase often makes us feel).

There are a few random points from this talk that really struck a cord with me. First, guest/host is NOT junior/senior. In the same way that sometimes you’re a guest in someone’s home and sometimes someone is hosting you, it works the same way with code. Regardless of experience, sometimes the person with less years of developer experience might have more experience with a specific codebase, in which case, they are the host, and vice versa. Second, I’m a BIG proponent of “don’t touch my keyboard” when pairing because I don’t learn as effectively. This is often really difficult for people and I understand why but nadia’s talk gave a great example. She spoke about a guest she had who she took to dinner a few blocks away one evening. She led the way and her guest just followed. A few days later, they were discussing a meeting place and she said to her guest “just meet me at the restaurant we ate at the other night.” Her guest then asked for directions and she didn’t understand, they had just been there the other night. Here’s the key, the guest wasn’t paying much attention and even if she was she had only been there once! If she had led or even chosen what restaurant they were going to, she would have likely been able to find her way there again, or at least gotten halfway there. This is SO similar to what I think about when I tell people not to touch my keyboard.

Some suggestions for being a good host include having your codebase in a state ready to receive guests by naming things well and having objects with clear responsibilities. Orientations also help. You can do this by providing diagrams (maps) or visual cues (turn left at the big monument), and documentation like a travel guide or readme file.

Nadia provides a template for code hospitality here{:target="_blank"}. It walks through things you might want to document at your company about an app like the history, approaches, reading material, and a walk through. You want to tell teammates the story of the codebase while still creating a safe space for questions, failures, etc. Make sure you’re demonstrating to new teammates that they should feel at home and help make them comfortable.

Finally, she talked about ways in which teams could communicate using this example. For example, realizing that there might be many directional ways one could get to a specific location. You want to have retros and give effective feedback that offers a solution. So instead of saying “it was great” about a pairing session, you could say “I felt like I was being heard when you stopped typing and explained that concept to me. I really enjoyed that.”

Code hospitality enables us to empathize. In closing she said, only when we treat our colleagues as guests can we thrive.

Ready to chat?

Join my mailing list

* indicates required

Set up a free call

phone icon