Inspiration
Imagine you are with a friend working on a joint project, programming, and you want to help them debugging on a difficult part of the code. There is no form to, easly, help them. They can send you their actual code (through git or similar) or see in their laptop the code. In this type of moments, some type of rapid code sharing would be ideal, and live code collaboration a necessity.
That’s why we have created our project, to make live code sharing, a which contains a protocol with only coding productivity in mind, and a focus to be as universal and editor agnostic as possible. Also, we did implemented this protocol into two editors we use, NeoVim and Visual Studio Code.
What it does
Our project it’s, at it’s core, shares code between machines. The main purpose of it’s to make live sharing of code easier, and not presencial live colaboration possible.
How we built it
We divided the project into the following parts:
- Networking: A P2P network is deployed between the machines. It’s multibackend, as there is two modes (HyperSwarm wrapped into Python, and a Python P2P network built by us).
- Protocol: The method of resolving conflicts between machines, as multiple users could work on the same file. This is fully written in Python.
- Extensions: The NeoVim extension is built with Lua and the Visual Studio Code is done with TypeScript.
Challenges we ran into
Yes. All of them.
On a more serious note:
- The networking: Making P2P connections work is difficult and creating the network did give us problems. We did manage to create ours and also implement HyperSwarm working successfully.
- The protocol: Firstly we thought of implementing Paxos Algorithm, an algorithm that one member of the group knew a little bit, to make our conflict resolving work, but after so many times we realized that Paxos isn’t the algorithm that we needed, and such we created our own protocol, similar to Paxos but not the same.
- The integration hell: We firstly did it almost all modular, but after some debugging we started to feel as makeing all piece fit perfectly would not be possible with that modularization. We still did manage to make the extensions as separated as possible of the main program.
- Tempus fugit: We didn’t had plenty of time, that leed us to bad code and sleep deprivation. Sleep deprivation leeded us into worse code and also to don’t remember what did we implement. We did implement some things several times couse of that. We had several ideas to make it better, but because of time we didn’t manage to finish them.
The project
The project is divided into several repositories:
- Protocol: The main thing. The program that manages the sharing of files.
- Vscode-extension: The extension that implements the protocol into Visual Studio Code.
- Nvim-extension: The extension that implements the protocol into NeoVim.
Accomplishments that we're proud of
Manage to not go crazy with this project.
Okay, no more jokes. First of all, we did manage to create a useful (at least to us) project. With this very little time we did manage to code so much of what we wanted to do. It’s surely not completed, but we created it. We didn’t knew many technologies that we used to create all the project, but we used it and we are very proud of it.
We are very proud of having a lot of idees, brainstorming, working. We are very proud that, at the end of the hackathon we could use our project to work on it.
What we learned
We learned several things, for exemple that we like to think protocols and implementing them, and that integration hell is really a hell. We lernt about the existence of pears (the technology, not the fruit, we already knew about the fruit) and how to use them.
What's next for Universal live code sharing
We will still continue it to support it after the hackathon, as we think it’s a very useful think to use. We have several ideas to continue makeing better our project and doing it more useful.
Log in or sign up for Devpost to join the conversation.