 Hello everybody and welcome to another installment of the Visual Studio Remote Office Hours. I'm your host, Mads Christensen. And last week we talked to Scott Hanselman about some tips and tricks for working from home about like personal attitude toward it, some ways to set up our office, maybe some equipment that might be useful and so on. And I've learned a lot so I moved from my kitchen where I did the recording last week now to the garage so I've set up a little sort of recording studio out here where I can also do a little bit of work but it will be good for video conferencing. I went out and I bought this, it's a microphone, $55. And then also above the screen, a little bit behind my laptop screen here, there is a daylight lamp. So Scott Hanselman had like one of those ring lights I think is the technical term for sort of the video recording lighting lamps. Mine is sort of a daylight one. We live here up in the north up in Seattle and so it gets a little dark in the winter so we happen to have one of those daylight simulating lamps that I can hang off of my pegboard in my garage by my workbench here and that gives me that extra lighting so that I can have a better quality recording. So I learned a lot from that conversation with Scott Hanselman last week and let me know what you think, you know. Got some basketball going over here. I got some paper up here to like take care of the light coming in so that it wouldn't interfere with the white balance settings on the camera. I think I'm going to go and find a better camera to use instead of just the laptop one but that would be for next week or whenever I can go out and acquire one of those. So today we are talking about live share and there's a specific reason why I was very interested in talking about live share and why it's one of the first shows in this series and that's because now when we are working from home we miss that sort of collaborative nature a little bit that we had in the office where you just talk to people about like hey can you look at this code or you have a question about like hey how did you do this thing where you made, you know, this function do whatever and live share is one way to kind of get some of that back but it also like fundamentally fits into a workflow whether you use like a Git workflow or maybe you don't even use source control but you have some sort of code review situation, whatever it might be live share is going to be very helpful when we're working from home and we're sort of distributed team, none of us sit next to each other physically and so that's why I want to talk about that and the guest that I have in the studio is none other than Jonathan Carter, Mr. Live Share himself he is the program manager for live share and other things as well such as IntelliCode and other things and so but I think live share was what really kicked things off in the collaborative space in this wave of collaborative features that Visual Studio have got and so let's talk about how Visual Studio through live share can help us while we're quarantined at home and before we begin I'm actually recording this after the fact because we had a little technical difficulty such that the very beginning of the show wasn't recorded and so we're going to jump from me talking here straight into the middle of a conversation and that's going to be a little bit odd but we did go back and I made sure that we did cover all the items that we talked about that didn't make it in so we circled back and got all that flushed out so all the content is there so I hope you really enjoy it, it was very fun to do and Jonathan is a great, great presenter so enjoy it and evaluating and adopting those options takes time and what we've kind of seen is that there's a class of people that have been interested in checking out live share but maybe didn't have an immediate need for it or they were still trying to roll it out across the team because live share works best when the whole team is using it much like really any collaboration tool and so it's been very satisfying to be in a position where we had kind of a service that was able to accommodate folks having a sudden need to reassess hey how could we begin to work in a world now where we're all remote for teams that maybe were not before and so yeah we've seen a lot of teams that maybe didn't even do pair programming before but are now starting to do it because they're realizing that they want to explore with ways to keep cohesion amongst themselves or encourage more collaboration that might have otherwise happened organically in the office a lot of code reviews happening over live share now that a lot of teams are doing all of their interviews remotely live share also happens to be quite applicable for technical interviews especially if the interview process itself is kind of fundamentally a collaboration session between two developers and so yeah it's been very like I mentioned satisfying to kind of work with a much larger influx of developers who are using it continuing to see the vast use cases that people are doing getting more feedback and we've been trying to kind of up our release cadence as well to kind of like get bug fixes or release kind of really high-private feedback quicker because of the heightened value and need that it brings kind of right now so that's very cool so I think we've had some actually some technical problems I was like following Twitter and a lot of people had a difficulty connecting I just heard that they are able to connect now so I think we probably just had a few people on and a lot of people couldn't connect but they should be able to connect now so that's okay at first you were talking about technical difficulties with live share I was like okay that's fine no no it's all good so yeah hopefully we'll see people come into the live stream here now they're able to I guess one thing that is kind of interesting about live share is the now that we have this connection that connects to let's just say two computers it could be a Mac running VS code connected to a Windows machine running Visual Studio IDE and they can now share the session between them and be productive and all that sort of stuff and when working from home I found that one of the things that I miss when I'm like writing code is that I can talk to others like hey how did you do that or I have an issue with this particular thing things that normally would take like 30 seconds it would just lean back and yell to the person sitting behind me like how did you do that again I remember you doing something like this what was that so with live share now that we have the ability to not just share the screen but we can do more now right we can also we can also chat there's some audio there's a communication channel built in is that right that is true yeah in fact live share right now in Visual Studio we have the notion of insider's channel much like Visual Studio itself has and so if you opt into that then one of the capabilities is integrated voice chat and when we first released live share we were quite opinionated about not replacing or trying to become kind of the uber collaboration solution for developers particularly because people already use teams, Slack, Discord right a million of these different things but what we found over time is much like you said if really what you're looking to do is collaborate with someone on code then there is really no way to not have communication be a part of that experience as well and so even though you could use a separate tool like teams or Slack to talk on the side of the live share session there is we found a ton of value in being able to use a single tool and a single kind of URL to say hey Madge join into this and so behind the scenes what's kind of cool is that live shares audio chat is actually using the same infrastructure that teams uses and so we were able to collaborate two collaboration tools were able to collaborate to add a better collaboration experience to a collaboration tool and so and because of the fact that it's built on that shared infrastructure then in Visual Studio like you said you can be hosting a live share session and start up a audio call I could then join that from Visual Studio code on Linux and I can join not only the same real time coding and debugging session but also the same audio call even though neither of us had to install or sign into any additional services in order to support that like we literally just got the link from you joined and now my editor is entirely connected to yours with with chat and everything sounds like magic like there's something here that doesn't sound right this is like I don't know what type of tech you got there but there's like okay let's say I'm on Windows in Visual Studio writing Windows forms at desktop app right old school like .NET framework 4.5 WinForms app and I'm now connected and I now share a live share session with you on VS Code on Linux and you mentioned debug. Debug requires that I run the app. There's no way that you on a Linux box can run my Windows Forms desktop so how would that work? Well yeah I'm glad you brought that up because another benefit of us collaborating with the teams team on the rich capabilities they already have is that in addition to us having integrated audio in Visual Studio and Visual Studio code we also have integrated what we call app casting and so what happens is that if you're in that WinForms application in Visual Studio when you hit F5 within a live share session we detect that you launched a desktop window and we automatically app cast that window to all guests and so even though I might be in VS Code on Linux where I could not run a WinForms application I would then automatically see a window pop up on my screen that is that WinForms app and not just see it but I could interact with it and even further I could set a break point in the code click a button and if that button triggered the handler that that break point was set in we would then both be paused at the break point and could step in and spec watches on the exact same debugging session and like you said it is quite magical but in many ways the simplicity of live share is just that when you look at IDEs and editors and kind of decompose them into a series of primitives so to speak there's much more that's shared between them that is not OS or tool specific that allows live share to understand the concept of a debugging session which has one or more break points which can be currently paused or not if you are paused there's a stack right there is a series of locals there is the notion of stepping the debugger forward and so those concepts live share understands at a kind of editor or OS agnostic level and then can translate them between not only one or more parties but also people in different tools and so that's how you're debugging in Visual Studio I'm in Visual Studio Code and it looks and feels totally natural because live shares handling the translation between those common concepts or state or gestures and so the case of the screen sharing is we kind of introduced another primitive into the editor or the IDE could be collaborated on in a way that is cross platform which in this case is sharing the pixels of the window to all participants that way one of the benefits of that is that if you're working on that windforms app and you need my help you don't know whether I'm going to join your session from Windows and VS code on Linux and so what's really important for you is that I can help you regardless what context that I'm in and so that's kind of one of the big responsibilities that live share tries to help uphold is make sure that all participants in a session can get the same context regardless what their client or OS is So can you also from the Linux interact with that app that comes up there so the window that's actually getting popped up is an electron app and as you might imagine it simply has hooks in place that are looking for mouse keyboard gestures and then proxying those back to the host and so when you click a button on the Linux guest side it's saying oh you know mouse click on this pixel position which gets routed back to the host that gesture gets played and then the effects of that gesture gets rendered back as a pixel update to the guest and so there is an element that's kind of funny about that right where as I mentioned before live share we're trying to share context not screen and so you know some people's first reaction is well then why would you be supporting sharing pixels in the case of an appcast but the reality is that we can only kind of deconstruct the state of certain things and share it so like I mentioned with debugging you can actually represent a debugging session as well as the actions you can take on it in a very editor agnostic or screen agnostic way like breakpoints, locals, watches whereas if you're debugging a WinForms app there's no way for us to turn the UI of that application into some UI agnostic state that we can just proxy back and forth and so what the guest has to do is it is like you're interacting with a little window specific screen share that is fully interactable which is pretty cool. Okay so when I said it was magic now I think it's really magic. So you're basically bridging the gap between OSs and clients and all this sort of stuff which is phenomenal and the whole app sharing is that's just crazy that you can interact from other OSs. That's well done sir. So when like for things that people do when they're in the office like let's say a code review right we a lot of times we sit together to do a code review together we have you know it's so in my team that's very typical that we do that that's just part of our workflow that we sit together to go through things. Now in this new world that's not really possible so live share comes in there how do you see like the code review specifically changing and how live share kind of helps with that? Yeah I mean you know one thing we didn't touch on specifically but you know live share is obviously very focused on real time synchronous collaboration and really what we've seen is that it can represent a nice complement to existing asynchronous collaboration workflows teams already have and with code reviews in particular we've seen two kind of common things. One is either let's say you've completed a task or you know a user story or a bug and you're about to prepare to send a pull request to kind of socialize that change with the whole team but you'd like to get kind of a quick sanity check or you want to get you know a second pair of eyes on it before you do that just to kind of see if you can't spot any you know common pieces of advice and so we see a lot of folks that use live share for that which we kind of call the desk check or an informal code review and so I might say hey Mads can you join in my session and so one of the things that's pretty cool about live share is it supports the ability for you and I to either focus on the same thing or focus on independent things and so for example when you join a live share session at first you're following the hosts cursor and so in terms of code reviews we could start up a live share session invite you into it we could have an audio call as well and I could walk you through kind of the narrative of the change I made and have a really rich kind of guided code review conversation but we're both in our own personalized environment right and so you could be in VS Code I could be in Visual Studio and as I'm scrolling through and saying yeah this is where I changed this part and then I scroll down to the bottom and I refactored this code you're following along with me and so you're able to see and interact but where this gets really interesting is let's say you have a question about the code that I'm showing you you can start to do subtle things to interact with it so you hover over a method name and you see the IntelliSense for that because you're not just passively watching me explain my code you actually are able to interact with this code as if it's local as if it's live or maybe you see that I refactored a method and you want to know oh does that change break any callers of that method you just right click and say find all references and you can immediately start to answer questions to get you comfortable with knowing that the change I made is really good and so we've seen that workflow can work really well then let's say you say yeah this looks great I send out a pull request but I can kind of mention already kind of work with MADS this PR is more for kind of the broader team the other scenario that we've seen is we all know that it can sometimes be possible that you send out a pull request and it kind of just sits there for a while and everybody I don't know anybody that enjoys a pull request that is not getting merged right it's like every second that a PR is not merged you know something terrible happens in the world right and so what we've seen is that LiveShare can kind of represent a way to not accelerate but if you have a PR that's out and you're thinking that the code itself is not like you want to help foster a conversation about the change that can help make it easier for people to understand it then what we've seen is people can then do a LiveShare session about the PR change and then help walk reviewers through what they did similar to what I just mentioned in kind of the informal code review and then that makes it actually easier for people to kind of say oh I understand what you're doing and so that actually we've seen in some cases can help accelerate the velocity of getting PRs merged in which then is just goodness for not only the team but also the product and so that's generally kind of what we've seen and that those use cases are some of the more common that we see with LiveShare because as you mentioned particularly for remote teams you're kind of just doing virtually what you would do otherwise in person where you might sit down next to somebody and say hey Mads can you please just come review this PR with me let me walk you through it or we see some people that even print off code and they will look at it and kind of trace you know okay you did this you did this and so you know we're quite passionate about helping to enable the kind of natural interactions that people want to do but do it in a way where you don't have to be physically co-located in order to do it. So it sounds like whether I have like a Git workflow like commits and pull requests and that sort of stuff or you know some people have a different workflow where they might just do a load review and then they commit together from the developer's machine it seems like LiveShare is going to be helpful for like all those workflows like it can scale up to sort of the most complex pull requests with bots integration all sorts of stuff like it will help you along the way no matter where you are in your company in your workflow. That is exactly right yeah we kind of like as a goal we want LiveShare to be a compliment to the existing workflow that your team already has. We don't want you to have to change anything about the way you work in order to improve collaboration and so we see teams where they do all trunk based development and by trunk based you know we just mean that they don't create branches they just push commit straight to master and to some people that sounds like chaos but for many teams it works wonderful and in a way that they get around potential merge conflicts or that they address keeping the knowledge sufficiently transferred across the team is they do code reviews in real time or they do pair programming such that the right people knew about the changes before it was actually pushed into master or if you want to use branches and then do kind of code reviews before you send out a PR or you want to use PRs or you really anywhere in between LiveShare can actually work well and actually even more than that you don't even need the project you're working on to be version controlled at all. Now you probably should do that but like what we also see a lot of is let's say you're at a hackathon we see a lot of people using LiveShare for bootstrapping a new project and then working together as a group even before they've created let's say a GitHub repo and pushed anything yet and so LiveShare really has not much opinion in terms of how are you persisting the code long term and then how are you asynchronously collaborating by means of Git it really kind of wants to be the real time layer on top of files that are stored and managed however your team decides is the best thing for them. Cool one thing I just that just dawned on me is you know if someone starts a LiveShare session and someone else joins and that someone else has a different set of extensions or different set of settings that will work in a LiveShare session let's say it's a linter for LiveShare. So the host themselves say hey can you please look at this before I commit the or send the PR now the guest comes in with a different set of linters in the extensions and they will now see squiggles right they will actually see my linter on my side says that there's something here that you could improve on and that the original host had no idea because they didn't have the same extensions and typically like in a junior or mentor role or whatever there might be like just things that the new junior or whatever developer doesn't know like doesn't know that there are some cool settings that enable something or some extensions that allow for something and and now this you know the code reviewer comes in and is able to find things that otherwise wouldn't have been found or would have been found at the actual code review to accept the PR and then there would have been a lot of work for the junior to do right and so there is that sort of that was my thinking is that actually true? It is actually true and so you know I think the example you just mentioned we find there to be a lot of value you could then also ask oh well if the guest that joins has an additional linter does that linting results get bi-directionally shared back with the hosts so that everybody sees kind of the intersection of insights that all parties get through extensions and we don't currently do that right and so really there's there's kind of two key things that LiveShare tries to uphold today one is all of the extensions and the support tooling support that the host has the guest receives that and then the second is that any additional extensions or settings or personalizations that the guest have they continue to receive those on top of what the host has in order to prevent it from feeling foreign right because like let's say you have an extension that you're so used to using and you just suddenly didn't have it because you're collaborating you would notice it and then down the road you could imagine that we then somehow compose all of the extensions and all the parties that the LiveShare session have so that everybody has the same exact thing we have not done that yet because as you might imagine it's challenging to get right from a experience perspective because for us to know that like well maybe I don't want to see your linters that you've got because it's something that is total noise to me and so there's an element of kind of stepping into what we share by default in order to make things you know immediately productive visually ergonomic for you but not kind of noisy or distracting for me and so. Yeah that makes sense also I could imagine that just extensions alone especially for Visual Studio maybe to a lesser degree Visual Studio Code but Visual Studio at least like installing an extension you have to kind of restart and there's a lot of requirements for extensions to kind of come live. Yeah exactly Okay so earlier you mentioned something that I found quite interesting you said that you could have a one to one like a guest can join a host but you also said that up to 30 guests can join the host now that to me sounds sort of like a classroom or brown bag sessions let's say at work we you know for lunch we can call for a meeting to the team say hey come bring your lunch I'm going to show you something and now in this day and age where that means that we all sit separately at home we can actually maybe join instead of a video stream a more interactive flow here or sort of a classroom type thing is that something you are looking at or have heard from other people that they find interesting or yeah yeah totally I think as we talked about the code review scenario and we kind of hinted at the magic moment of that where you're using live share is the fact that you as the reviewer aren't just following along with me but you're actually able to also interact with the code yourself right hovering over a method doing a find all references if you needed to edit something to show me you could find is that there are all these forms of collaboration that benefit from increased interactivity right and so as you mentioned brown bags is a scenario that we didn't necessarily start out to try to solve but what we found organically is that people started using live share for doing brown bags because it would allow me to walk the team through a change or you know I want to help onboard everyone to this new area of the application so that we can all work on it together versus you know having single ownership and instead of me just projecting code onto a screen the fact that folks are able to be in the code base with me from their environment and interact as needed we found that it actually can help increase engagement and so then you say okay cool a brown bag with a team that's really not that different than a classroom lecture where now you maybe have a group of students listening to a course and once again instead of just kind of looking at a projector or staring at code they're able to follow along but also interact and participate on an as needed basis and so we see this happen in classrooms where you know the teacher can maybe say hey Mads what would you do with the code here on line 12 and all of a sudden you go and you can start typing and everyone in this session is able to see it and those subtle opportunities for everyone who's collaborating to not feel like just a passive observer we've found goes a long way in making the experience more enjoyable and so in some ways when we talk about live share it's a little altruistic but we talk about like we don't want to just boost productivity and you know efficiency and velocity and symmetry and all these other buzz terms but also like how can we make collaboration just feel better and make it more enjoyable for you so that you're more likely to want to do it and as a result the team and the product is going to just benefit and so that's a very long winded explanation to your question of yes we see that happen and the reason that we've seen it is that even in cases where you have three to five maybe up to 20 people there's still a ton of value in being able to kind of collaborate like that and so besides brown bags and classrooms like lectures we also see some folks do what's called mob programming which if folks haven't heard that term before is basically pair programming with more than two people and then there's another thing called swarming which is basically like a temporary mob programming your pair programming with multiple sounds like that sounds like a potential war zone or something like that yeah you know what's funny with live share when we first design live share there was a couple of critical design points that were contentious that so for example if I started debugging session in a live share session and there's you and there me 10 other people any of us can step the debugger forward if we want there is no needing to request permission to do that and the reason that we did that is because we kind of had this hypothesis that in most cases teams already had kind of an interaction or a social understanding amongst themselves to control the chaos and we wanted the tool to allow you to naturally perform those interactions that you would otherwise do over time we have found that there was value in us giving the host more control to control the chaos but surprisingly a lot of teams that have culturally embraced doing mob programming generally what happens is each person in the session has a role during some period of time and so it isn't just a bunch of developers smashing on the keyboard which would likely have some interesting side effects you know you might have someone who's hey Mads you go implement the unit tests for the feature I'm going to go create and then someone else is going to say we're working on a web application and you see this where you go do the CSS I'll go do the JavaScript and then there's four of us that are divided and conquering and able to collaborate in a way that you actually could not with screen sharing because with screen sharing even if you have multiple cursors you're still focusing on the exact same thing whereas with live share you can actually work on fully independent files for locations in a file even though the changes that you're all making are being synchronized amongst the group Wow yeah so that's interesting so that means that I can have a feature that my whole team we're working on the same project in Visual Studio we're working on independent things and we may not even use git we don't share the source code the source code only exists on the host machine and then afterwards we can like do the code review and see if everyone is happy and then just commit and there's no other artifacts on the guest's machines from that project at all they don't even need to have the runtime components to let's say .NET Core 3.1 like they don't actually need to have that in order to edit CSS for one person then another one does C sharp or whatever is that is that correct that is totally correct in fact some of the demos that I love to do is like you know you're on a mac doing like Rust development and you've got 15 extensions so your editors tricked out you invite me into a live share session and I'm getting IntelliSense and debugging and using your terminal and stepping through as if I've installed everything needed for that to work but I haven't had to do anything because you as the live share host you're powering all of the tooling and runtime environment for all participants in the session which is kind of a big part of what makes the flexibility of live share possible. Yeah I mean it does sound very magical I'd say I would like to just say something to the audience because we have six minutes left here if you have any questions now would be the right time there's a Q&A panel you might be able to see that and so feel free to ask any questions to Jonathan about visual studio live share or visual studio in general or working from home or whatever you might feel like asking okay so I guess I can start with a question then here Q&A time. When a guest or multiple guests connect to a host does that happen through a server or is that direct peer to peer my computer my internet connection straight to yours how does that connection work? That is a good question so by default when a guest joins a live share session we attempt to connect them via a peer to peer connection so directly and the reasons for that are because it's obviously faster and we want to optimize the kind of network latency as much as we possibly can. That said as we all know the internet is a very complex beast complete with firewalls and network translators and caches and so if there is not if it's not possible for us to connect two participants together directly we then spin up a cloud relay that is then used to proxy communication between those two participants and but even in the latter case I mentioned earlier that we have a end-to-end encrypted SSH connection this is very important this is a common question we get that same end-to-end encrypted channel is leveraged in either case whether live share is able to use a direct connection peer to peer or it has to use the relay because we cannot create a connection and that's beneficial because then none of your code or any of the communication that you do with your peers is ever visible to anything on the internet never stored on any server it is all 100% immoral and secure to you and your peers so that's good to know so we got a question here from Jonas he asks do you find yourself more productive working from home everything Jonathan I would say yes and no I mean I personally and this is my own just behavior but I am a very social person and so I find that if I'm in a team room with people there is a high likelihood that I like to engage in conversation ad hoc a lot and so certainly working from home suppresses some of that natural behavior and so you know that said I have not been working from home before and so my kids who are now out of school have not really gotten used to knowing that dad is working and so that's that they offset maybe some of the productivity that I gain in other ways and so it's probably you know some days are more productive than others but so far so good I need to get more tips from Mads and Scott Hanselman to keep my productivity boosts going yeah I will make sure to mention the link here when we finish here I want to be respectful of your time Jonathan and we got like two minutes left I just want to have two questions to end this with one is like to use LiveShare do I need an Azure subscription how do you bill me like how much does this cost that's what I would like to know and the other one is how do I get that I would like to know if you have any ideas preview release of LiveShare to get that audio support yeah so LiveShare is 100% free and so you do not need anything other than a Microsoft or GitHub identity and so if you install Visual Studio 2019 or the LiveShare extension for VS Code the reason for that is because in any collaboration experience there's obviously a ton of value in people knowing that you are in fact who you say you are and so I wouldn't want to be collaborating with somebody who claims to be Mads but it's actually some Bitcoin miner trying to use my machine to do that but there is no need for Azure and there is no billing at all what was your second question Mads I'm sorry I got lost in tangent there for a second yes so if you go to tools options and you look for the LiveShare section there is a setting called feature set that by default is set to stable you just toggle it to insiders and we actually have a link that can maybe paste into the chat or whatever would be the best way to persist this which is aka.ms-vsls-insiders and that has not only instructions on how to enable insiders but also at any given point what features are available in the insiders channel very cool very cool well thank you so much Jonathan it is exactly 10 o'clock we are now an hour later this was very helpful I learned a lot LiveShare is kind of demystified for me now so thank you so much for helping me out with that we now have a YouTube playlist where we put all these shows and so you can find them all there this is the second show we're doing in the visual studio office hours series but if you go to aka.ms-vs office hours you will be able to find them in the future so next week we're going to do this again and we're going to do this Thursday so instead of Friday we're going to do it Thursday but still the same time 9am in the morning here pacific time so same time but Thursday and we're going to talk about some really cool benefits that you probably didn't know that you had with your visual studio subscription and how to take advantage of it and I think it's kind of highly interesting and so we're going to talk to Katie about that next week so but for now thank you so much for joining everybody live or for you who has watched on demand on YouTube until next week thank you thank you