 I decided to list my spare room on Airbnb, and it wasn't a long before a woman named Alex booked him, and I received a message from her before she arrived. She said, I think I want to move to London. I've never been to the UK before, but I'm looking for something different. I said, and then she said, will you help me please? If you have any time to show me around London, tell me what it's like living and working there, I'd really appreciate it. Sure, I said. So before she arrived, I tied it up the flat, and I put together a little welcome pack for her. So it had a tourist book, a tube map, and I made a little sheet of tips and tricks for getting around London. Like, don't smile at anyone in public, and always carry an umbrella, even if it looks sunny. On the day she arrived, I went to go and pick her up from the airport, and when we arrived home, I gave her a tour of the house and the welcome pack. She seemed to really like that. And when she'd rested for a bit, I gave her a quick tour of our area. And over the next couple of days, we went to a mixture of popular tourist attractions and also some quirks around the city that were my favourites. And at the end of this day, I took her for a meal, and I got to ask her about what her first impressions of London were like. And it was very interesting for me because I'd been born in London and lived there all of my life, and it was fascinating to get this different perspective. And in the end, she decided to come and live in London. So, go me, yay. Story number two. It's like rails is my city and I've lived here all of my life, said Theo to me one day. So Theo's my business partner. We run a company called Ignition Works, and at the moment we're working on a system that helps organisations better document and act on their processes. And we were pairing, and I was struggling to pick up this concept that was easy for him, and I was getting frustrated and anxious that he was disappointed in me. And these words actually made me feel better and put my struggle in perspective. I felt like I was a welcome visitor in his hometown of Ruby on Rails, and I was hoping to make this place my home too, and I had a friendly local by my side. So I started to think about how could I make the most of this and what could Theo do to help me. And thinking of these questions made me think of the time that Alex came to stay with me. We both wanted her stay to be as pleasant and enjoyable as possible, and this is where code hospitality comes from. So I think that by setting the scene of a host receiving a guest and exploring the ways that we can be effective in those roles, that can help us to think about how we should treat and respect new teammates, onboard people efficiently, and work with people on our code bases so that we're all having fun and being productive. And so I hope that you'll leave this talk with a new way to approach problem solving, particularly when it comes to coding and developing new features, and a new way to approach communication, particularly when it comes to giving and receiving feedback. And the gist is that with code hospitality we can improve collaboration and long-term learning across software teams everywhere. Code hospitality, the guide. So who is this guide for? We first have to check that everyone in this room, this is relevant to you. So we're going to do a little exercise, and you're going to see some statements on the screen, and if they relate to you, then raise your hand and keep it raised. And if the second one relates to you, then raise your second hand. And if more than two relate to you, then somehow indicate that, but you cannot shout out, so it's going to be fun. So you've recently started a new job. You have a new team member. You've recently rotated onto a new team. You've recently typed Rails new or started a new project. You're on a project using an unfamiliar language. Maybe you're a manager or a team lead, so you've got people looking to you for direction. You regularly collaborate with other people. You want your team to be productive? You want your team to be happy? Great, I think we've got everyone, so everyone's in the right place, fantastic. Okay, let's get that introduction. So I want you to think of the last time that you had a guest. And what did you do, if anything, to make their stay pleasant? I remember the last time you were a guest. Maybe some of you were staying with people in New York City. Did you enjoy it? So when we think about things like this, we all have clear ideas of what tends to make a good host or a good guest. So we're thinking about being a good host. You might clean up before your guest arrives. You might make sure they're suitably comfortable. You might make them some food. When you think about being a good guest, maybe you'll take a gift for your host or you'll offer to help around the house or tidy up after yourself. And this all boils down to hospitality, referring to the relationship between a guest and a host. And at the centre of it is this idea of showing respect for your guest, providing for their needs and treating them as equals. And so when we think about hospitality and how that relates in our society and culture, it seems to be quite ingrained and we know the stuff that we're meant to do. And we actually play the role of hosting guests every day, and yet we don't do such a good job of it. And I think that is because we don't quite connect the dots and the similarities between house hospitality and code hospitality. And so we sometimes forget ourselves and take those around us for granted. But work is the same. Because in the office I think we ask ourselves the same question as to when we have someone staying in our house. And that's how can we better collaborate when everyone involved is likely to be feeling vulnerable and uncertain. And so we have vulnerability because as a guest you might feel vulnerable going into an unfamiliar place and you're not quite sure how you're going to be received. And vice versa, as a host you have someone coming into an environment that you're used to and you don't know how that's going to play out. And that breeds uncertainty because no one quite knows what's going to happen. And so it's time to get back on track. So the first thing is setting the tone. So this is important because it's the foundation from which we then progress. And as I mentioned previously at the moment I don't think we're quite in the right frame of mind. So how can we do better? Mindset. So when I talk about guests and hosts that's not the same as a junior versus a senior. Rather it's more about familiarity and this can be across a range of domains. It could be with code but it could also be with the company or the team that you're working on. And when you're thinking about approaching problems with people it's important to realise that these roles can be fluid on one team. So I've worked with someone some months ago where they were really experienced iOS developer. I'd never done iOS before and so I was their guest in that sense. But this person had never done testing before and I'd done a lot of testing. And so I was their host in that sense. And so it's more about a frame of mind to a useful thinking framework when you're approaching problems. And so next thing, cleaning. When you're receiving somebody, do you ever tidy up beforehand? And when you're going to somebody else's house how do you feel if you turn up and it's a mess? What about code bases? So it's the same, just like a house it's good to keep it presentable as you go along because guests can be unexpected. But even if you never have a guest, if you're working on a code base by yourself and it's messy then you've got a lot of upfront complexity that you have to deal with and that adds to your cognitive load. And so working on more complex problems becomes more tasking. So try and keep your code base in a state ready to receive unexpected guests. And what does clean mean? Everyone cleans up in different ways. And so some of the things that Theo and I like to ask ourselves are have we named things consistently so it's clear what's going on or is our code very readable or not. And so you have to do what you can in that sense. OK, so now you're in the right mindset and you've cleaned up as best as you can. When your guest arrives, how do you show them around? So I sent this tweet out some time ago and I asked, do you give tools of your code base and if so, where do you start? And I had quite a few people say that they started with their tests. And one woman said, for example, she works at an insurance company and they start with the main insurance policy object and then branch off to all the objects that link to that one. This word came up a couple of times. Diagram. So I had a couple of people who discussed how they found that the most effective way to show people around their code bases was through a series of diagrams and telling a story. And that was so that they could give context to the current state of their code base rather than just go through a list of objects. So what might make up a component of such a story? So you might have your code object, so the objects in your code base, what methods they have and how they link to one another. But there's also the wider business concepts. So some months ago, Theo and I, we worked on a project which had a really big nutrition component and we did a lot of reading and research around different diets and how that affected different body types. And that helped to inform how we split up different responsibilities in the objects that we were coding. So if you can think about the wider business concepts that you work with and how that maps to the code objects that you have and stream that narrative from them, then that provides a very visual and compelling story for new people coming onto your code base to understand the decisions that you and your teammates have made and why the code base is currently in the state that it is. But what type of guest is coming? Will you be there to show them around? So in code hospitality, we have a special version of guest. An open source guest. So these are people who come into your house when you're not around. And so how do you show them around? So have you ever gone to stay in someone's house and they're not there? Maybe it's like an Airbnb thing. You tend to find some form of letter or guide or some form of instructions. So if you were to go and stay at my friend Pete's house, you would find these are one of many guides that you'd find and this one is how you would feed his dogs because they will be there. And so maybe we're thinking about something like a readme. So readme's are great for consolidation when you are there and you've been showing someone around and someone can go in their own time to sort of mull on all the things that you've told them. But they're sort of essential when you're not there because how does someone know how to get started or what to do? But what kind of things do we typically see in a readme? So looking at the template readme from Rails at the moment, you have things like the Ruby version or system dependencies or how to set up the database and run the tests. And these are all great for getting people set up but it doesn't really help you decide how you then progress and how you start delivering features. So what more could we do? And I did some exploring around different readme's and I found this section in the Active Record Readme and it talks about how Active Record is an implementation of object relational mapping and it describes a bit about what that means, links to some blog posts and then gives some high-level bullet points on what that approach means for how the bit of code is being developed. And so someone turning up to Active Record can get a sense of what the whole project's about without needing a maintainer there and if they need a bit more information they have some guidelines for where then to go. And so what if we started thinking more about helping, particularly on open source projects, having readme's that were more hospitable in this sense? So here's an example from the Cold Hospitality Guide app and what does it consist of? So you've got your installation, usage, contribution but there's also things like history. So again, going back to that storytelling thing, how did the code base get to where it is now? Approaches, what are the patterns that you use? What reading material is there and it could be blog posts that you are external or that you and your team have written? And also this idea of a walk-through. So how can you get this idea of a guided walk-through in a code base? And so maybe it's this idea that you say, hey, here's one feature that we had, here is the spec that was written to deliver that feature and here's how we wrote that code to get there. So however you do it, it's really important to tell new teammates the story of your code base. So you need to set the scene, explain the history and engage them. Okay, now you've given the tour. It's now about putting striking balance in the atmosphere. So what do I mean by that and how do you do it? So in thinking about balance, I think that you're choosing between fish or fishing. So what do I mean by this? So I was chatting with a colleague a few months ago and he said, you know the phrase, give someone a fish and you feed them for a day. Teach them to fish and you feed them for a lifetime. Well what if that person is starving? Will you ever get a chance to teach them if you don't give them some fish first? And he got me thinking about needing to strike the balance between fish and fishing. And when we're talking about code bases and having new team members, it's this idea of how can you give them a helping hand and hold their hand and walk them through things but also make themselves sufficient so that they can get on with development without you necessarily being there. So I think when someone first comes onto your team or joins your code base it's really important to give them a lot of fish first. So be super generous with your time and attention. And so you want your guests to be as self-sufficient as quickly as possible but you first need to show them that this is a safe space to ask questions, make requests and make mistakes. So how might you go about doing that? Well for some things to think about are is there something within your team or the thing you're working on that you know a lot about that someone else doesn't? Perhaps you can offer to do a lunch and learn session with that person or give them more detailed overview. And you may think it's obvious but it's really important to always make it clear that your new guest can ask you anything at any time. And for the guests it's really important to always ask questions whether that's about something you've seen or a term you've heard that you're not sure about, you should feel safe to ask any question that's on your mind. And then you might have a way that you're giving your tour or showing things but it's also important to ask your guest is there anything that you haven't seen yet and that could be anything from some certain test in the code base to where the bathrooms are, you don't know what it is until you ask and guests shouldn't be afraid as well to say thanks for the store or whatever but I'd like to see this or I'd like to see that. So I was really lucky because my first development job was at Pivotal and at Pivotal they pair all the time so you always have someone to talk to and to ask questions but it's been really upsetting to hear of the number of stories from other newer developers that I know where they'll be in an office and they will want to ask a more experienced developer a question but they're worried about the fact that they might be bothering them because that person looks like they're focusing on their own work or they've already asked it once or twice and can I ask again or will they think I'm stupid and so most of the time that person would be fine if you ask them but it's really hard to tell and so it's very important particularly when you have people who are new in the environment to be aware of the impression that you're giving off and to help give clues so for example you might be putting on your headphones because you just want to listen to some music but you could make it clear to your new guest that I'm actually interuptible I'm just listening to some music and so feel free to grab me any time and if you're not interuptible then say that, say hey I need an hour or two to focus in on something but perhaps in the meantime maybe note down any questions that you have and we can get to them later so this is all about demonstrating that you want your new teammates to feel at home as soon as possible so remember when I picked up Alex from the airport that was me going out of my way a little bit just to make her feel relaxed and to set the whole trip off to a good start so now you've set the tone it's now about delivering value so this is about now that we're coding we want to get productive and start delivering features that's what we're here for and so have a question for those of you who use rails or maybe if you don't use rails you can think of work or tools that you use regularly at work but if I asked you to think and draw a map of rails right now without too much thinking what do you think you'd draw, what do you think would come out would it look something like this or maybe this so notice how all of those maps looked quite different and they were all drawn by people who've been developing in rails for many years and the key point that I want to get across by showing you those diagrams is that when we're thinking about programming and working on frameworks that we're familiar with it's not about whether you understand rails or whatever framework you're using but how you understand it and why you've come to see it that way because this is what helps us to determine which starting point you're going from when you start to tackle problems with people so think of the next feature coming up in the project that you're working on the next maybe user story that you're going to pick up and where are you going to start with that chances are if you're quite familiar with the codebase you'll have a clear idea of where you're going to go but what if you had someone sitting next to you who'd never worked on your codebase before where are they going to be starting from so let's assume that the next story is as a user I want to get inside the Tower of London so for those who don't know, Tower of London is a historic castle by the Rither Terms in London and so you're sitting down at your computer and what you see is this nice aerial view of the Tower of London and you're starting to think about how are we going to get in and you've got someone sitting next to you working with you and what you don't realise is that they're seeing this and so they're also sitting there being like okay we're going to get inside the Tower of London maybe just need to walk a few steps forward so the thing here is that if you're both looking at these things the proposed solutions are going to be very different even though you both understand what the problem is and so your problem solving is going to be difficult it's going to be painful take longer than it needs to because you're talking from different perspectives so how do you work out when you're working with people that you might be seeing such very different views and it reminds me of this time that when Alex was with me so we have in the UK we have a large supermarket train called Tesco and Alex had gone to the shops I was at home and she called me to say that she was outside the Tesco and she didn't know how to get home so I said oh that's easy go right and go left and then you'll be on our street she said okay and she called me back a few minutes later to say yeah I'm still not home so I said okay don't worry go back to the Tesco and I'll come pick you up of course when I got to the Tesco she wasn't there because I should have asked her which Tesco she was talking about but I didn't because I just assumed that she went to the one that I always went to and so it's the same thing when coding we need to work out where each of us is standing so that we can move closer together what might this look like in practice so some weeks ago Theo and I were working on a problem and we written the test and now we needed to implement implement the code implement the code and we were just having this conversation and it wasn't progressing anywhere and we were sort of talking about the same things but not and so Theo said well why don't you draw how you understand the problem and so I did and I drew this and just by drawing this it was clear where my confusion stemmed from I wasn't clear about which messages were being sent where or the order of which things were going to happen and so we had enough further discussion and we decided that a role activity diagram might be more suitable and so together we drew one of those and as soon as we drew that everything became so much clearer the solution to the problem seemed very easy and we were able to finish off that feature quite quickly and so when you're working on your pairing with people or collaborating with people it's really important to assume that you and your teammate are both lost even if you're the one that's more familiar and you know or think you've got the right answer it's really helpful to say it's not about right, it's not about wrong we're just in different places and now we need to work out where each of us is standing and then get close together and this is where scribbling down diagrams can really help you to do that and these are just back of the tissue paper quick scribbles just to get that sense of where you're standing and so when you're working together questions are going to crop up and it's very interesting particularly when you're talking about someone who's more familiar in a space to someone who's less familiar about the way you choose to deal with those questions so another example from when Alex was with me one day she came to me and said hey I need to get to the pharmacy and I didn't have time to take her there and so I said oh it's right next to the restaurant that we went to the other night and then she said but I don't remember how to get to that restaurant and that's when I realised that just by walking Alex to the restaurant in back she didn't have to engage with that whole process so she didn't really remember where we went and even if she had remembered bits and pieces of it it might be too much for her to take it all in and so this time I decided to sit down with her with a map and say here's where the home is and here's that restaurant that we went to yesterday and here's the route we took and also map out some other ways that we might have taken to get to that restaurant and then I said well here's the pharmacy, here's the closest pharmacy so based on the information I've given you how do you think you want to get to the pharmacy and this is a really powerful way to troubleshoot with someone and to ask someone questions because they want some extra information because you can check that you've been understood based on the information you've given but also as someone who's more familiar in an environment you're going to end up exploring new answers that you didn't even consider and so how might this work when we're talking about software development so when you're sitting down with someone to develop a new feature it's really interesting to be able to say rather than say oh this is how we always do it let's just do it this way well here are some ways that we've approached it in the past and here is how another person may approach it for example what are the pros and cons of each of these ways because one of the things that it's really important to keep in mind particularly if you're a more experienced person working with someone who isn't so experienced is that it can be very hard for the person who is not so experienced to work out when something is just the right way to do it based on not falling into trouble later on or when something is just your habit or something that you prefer doing and there might actually be many other valid approaches that you can take and then you should ask the question like which way shall we go and have that discussion together and so that way both the host and the guest are brought into the decision making process and both are providing value so it's really important to move the conversation away from implementation detail to the border concepts because like I said the decision making process and it means that those who are more experienced don't just get into old habits or it's just stuck into the things that they're used to doing and they'll be opened up to potentially better approaches that they didn't even consider so after you've worked on something you need a way of assessing how it's gone and so this is important because things don't always go to plan and so you need a way to smooth these things out and improve them for next time current issue with this feedback is hard and also sometimes it's not clear where feelings lay in the workplace so I first gave this talk at a conference in May of this year and during the Q&A I had a guy ask the question which essentially amounted to the comment you spoke about feelings a lot seemed strange for a work environment and I was like because I was like oh I clearly didn't get my point across well and so I went away and I thought about why he would say something like that and it made me think that it stems from this idea that we're all quite logical, rational people and we need to focus on that at work to make sure that we're productive and if we're talking about feelings that can be distracting but the thing is we're obviously not 100% impartial and things do get in the way whether that's in the workplace or in your personal lives and you need a framework to be able to talk about that in the workplace because that can help us to understand how we can then empathise with ourselves and also with other people and then deal with them so we can continue staying productive so how can we make these sort of discussions easier so remember the time when I had dinner with Alex it was a way that she was in a relaxed setting and she could tell me exactly what she thought about London without feeling any pressure so how many people in this room have regularly scheduled retros yeah so lots of people have times where they get together their team to reflect on the past week and think about their processes and what they should change and improve but I'm not talking about team retros I'm talking about one-on-one retros which I just don't think we do enough of these days so I want us to be having more retros where you have a discussion with someone that you've either paired with or collaborated with that day so how do you have such a conversation so first and foremost you need to talk about your feelings but these are feelings that are focused and referenced back to particular observations so something in particular happened and you're going to say how that made you feel and then you're going to tie that back to an underlying need so this is a need that you have that has caused this feeling and typically if it's a negative feeling then it's a need that's not been met and if it's a positive feeling then it's a need that has been met and then based off of that you make a request and the point of this is that you don't want to pass any judgment on the person that you're talking with you're creating a no judgment say-soon and the idea is that you're drawing attention to the ways that your needs are being met or not being met so what are some examples if you're working with someone in a coding situation you hog the keyboard so we don't really this is quite difficult to say and it's not very productive so how about something like I feel disappointed because I was hoping to say what I've learned on writing aspect tests would it be possible for me to drive more next time we write tests and so the need here maybe I need to get better at writing tests then there's yeah it was great that's easy to say but what does it mean how about I'm feeling pleased because when I explained things to you you would stop typing and turn your body towards me so I had confidence that you were hearing everything I said it'd be great if you continued to do that I'll try and do the same and so the need here may be I need to know I'm being heard and a useful format to kick off such a conversation is what should we keep doing and what should we change so when giving and receiving feedback focus on expressing your feelings based on observation and need and not on passing judgments on the actions of others so let's say that we follow these recommendations what does code hospitality mean for us we often hear that it's important to empathise but it's hard to grasp what that means and know where to start and I think that having something like code hospitality gives us a useful mindset for thinking about how your colleagues may be feeling as you work with them because we've all had experiences of going into environments where others are more familiar particularly in other people's homes and we can use that to relate to workplace scenarios and we all do good work but I think that with the ideas behind code hospitality we can keep doing great work because we won't take the people around us for granted we'll continually show them respect and we can also get past problems that typically tend to hold teams up and focus on delivering value free from tensions and insecurity so that's the end but no guide is complete without frequently asked questions so I know that the first question you're all dying to ask is where can I buy a copy of the code hospitality guide well don't worry it's free and you can find it at this address where can I find out more about communicating with my colleagues effectively so I really recommend this book Nonviolent Communications by Marshall B. Rosenberg we're often taught that the way to communicate is by making judgments or demands and this is basically a way of finding harmony with the way we communicate based on feelings, needs and requests like I discussed earlier if you want to find out more about running a community here's a really good blog post from Pivotal which is all about how you can sit with your pair and compose an email together and through that process work out what you need to change what you need to do better hashtag code hospitality for discussing more of these ideas or giving your own ideas big shout out to these people who are absolutely amazing in helping me write this talk I want to leave with one quick final thought of all of this is being vulnerable and it's very important that we we can do this in our workplace because it allows us to discover what our true needs are and when we know this we can help communicate that better with other people be more empathetic with other people and help others around us to like troubleshoot our problems and so the ultimate aim is to allow yourself to be vulnerable in front of other people and make a safe space so that other people can be vulnerable in front of you and I hope that you will join me in trying to find ways that we can realistically do this in our workplaces so how was your stay? thank you if you can give some suggestions for organisations that aren't currently like making this a core priority to shift to making that a core priority yeah so this is the question oh there's a mic so you guys have one I'm used to not having a mic string question so for organisations that don't have it as a core priority I think it's important for for someone like who knows of these ideas and is aware of them and wants to help getting their teams to do it I think it's useful to start on a one on one basis so do those retros with someone and say hey can we have a chat about how that's gone I think the book the Normavallic Communication book is a really good way to get people in your organisation thinking about some of these ideas and so I mean once at Pivotal we did a book club one time so it's the kind of thing where if you have a way that you can get together a group of colleagues and have a little book club and read some of the chapters and discuss them that's the way that you start getting the ideas in your organisation so it's about trying to make discussions on a one on one basis or on a small team basis so that people start thinking about these kinds of ideas I guess do you have suggestions for how to like how do you balance between writing more code and introducing people to code like creating those walkthroughs like how do you create a process where that happens automatically sort of like testing it's sort of like a technical debt for introducing new members to the team as a new code is created so do you have like a process around how to manage that so you're saying how do you find the balance between needing to keep developing and onboarding new people so I actually think the most effective way is to pair more because that way if you're always working with someone you are always delivering features but you're having an ongoing conversation so I found my time at Pivotal extremely extremely valuable as a going straight from a boot camp into that environment because I felt productive from day one we were delivering features I was working on their cloud field and found your team then and this was if I was alone on this I'd feel very out of my depth so I was with someone and I could ask the questions as we were developing as we were running tests and so if you've got someone that you're working with who's open to helping you out and is you know patient and is keen to answer your questions then I think if you can get more pairing happening in your work environment then that will naturally form part of the process and you'll maintain productivity as well Awesome let's have another round of applause for Nadia