Visual Studio Live Share and containment

vs live share

We have been going through something rather special for the past few days. Fortunately, our domain makes the ability to telecommute rather easy and there are plenty of tools available to help us. Although the tool is not new, I wanted to recall the usefulness of Visual Studio Live Share in the current context where confinement is mandatory.

Another communication tool?

Microsoft Teams. Skype. Slack. Hangout. Discord. Facebook Messenger. Even a phone call! All of the tools that we have access to, to facilitate our communications when we have to stay at home. We can even easily share our screen with one or more people to collaborate on the same thing. While communication becomes for many companies a critical point for the sustainability of the activities, it seems that we already have all it takes to do it, right? Why would we need to add Visual Studio Live Share to all of this? I will try to explain to you why we should push the use of this tool more than ever, even more in the current context.

What is Visual Studio Live Share?

A little explanation is needed for those who do not know the service. The first version was published in early 2018, with very limited access and only on acceptance in the program. Since then, several versions have passed and we are now with a mature product that is automatically included with Visual Studio 2019 and available as an extension with Visual Studio Code. Essentially, Live Share allows us to have multiple people collaborate on a single project in real time. Beyond file editing, collaboration spans a shared environment and even allows audio calls to centralize the tools used.

Some use cases

Reference available here: https://pragprog.com/book/tpp20/the-pragmatic-programmer-20th-anniversary-edition

The rubber duck

Sometimes, just explaining our problem to someone helps us find the solution. Explain it to a rubber duck too, according to a story brought in the book The Pragmatic Programmer. By using Live Share to do this, we have the ability to easily follow someone in the session. We can even send a notification to all employees asking them to focus on us, so they can easily find us.

The debugging

With standard screen sharing, it's not always easy to have 2 people trying to solve a problem. When we want to see the state of a variable, our colleague has already taken a step forward and the variable has changed. What are we doing now? We start all over again, which is not necessarily optimal. With Live Share, we cannot prevent our colleague from moving forward, but we can at least independently follow the variables that we want without having to wait for him / her to inspect it.

Shared server

Again, in collaboration via screen sharing, the honor of interacting with the app rests solely with the person in control. Live Share allows server sharing, so all employees have access to the web application directly from their browser. The whole thing works thanks to a redirection of a specific port towards the server of the host.

The pair Programming

The pair programming is a very widespread and used concept. Two programmers work on the same computer, with one writing code and the other observing and correcting as needed. With the ability to collaborate in editing with Live Share, we have the ability to take that to the next level. With good peer-to-peer communication, we end up with two programmers who can move the code forward at the same time. Whether in the same file or on different classes, the possibilities are endless.

Where I particularly like the collaborative side of Live Share is when we bring this collaboration to Test-Driven Development (TDD). It all starts with one person writing the tests, not seeing what the other person is doing. As soon as we have red (code that does not compile or test that fails), our employee takes over. For his part, the other person codes the classes and functions according to the tester's need to pass the tests. This exercise is interesting because it leads us to do TDD, which is an excellent practice (which I love and recommend!). But beyond that, it gets people to communicate well, and that's what brings me to the conclusion of this article.

Why now more than ever?

We are currently experiencing something exceptional with containment and the pandemic. Even though many are used to telecommuting, doing it 100% of the time is a big change. Communication is more crucial than ever. As much for the smooth running of our projects, as for our mental health and relationships with our peers. In my opinion, Live Share can help you with all these aspects, both from a human and productive point of view. Does Live Share have this utility for you too? Do not hesitate to leave us your point of view in the comments!

Stay home. Use Live Share.
Bruno

Author: Bruno

By day, I am a developer, team leader and co-host of the Bracket Show. By evening, I am a husband and the father of two wonderful children. The time I have left after all of this I spend trying to get moving, playing and writing video game reviews, as well as preparing material for the Bracket Show recordings and for this blog. Through it all, I am also passionate about music and microbreweries.