GitHub is trying to refresh an old favorite. With its new ‘Teletype’ feature, it’s aiming to bring collaborative code into the mainstream.
If you search online for Teletype, you’ll likely find a ton of results about the original device and its manufacturer. Both were turn-of-the-20th-century creations, with Teletype serving as a crude forerunner of what eventually became Slack, Twitter, and modern email. (Teletype’s Model 15 was a mainstay in World War 2, serving as a primary form of long-range military communication.)
GitHub’s own Teletype is a far more advanced platform, technologically speaking: It’s an additive feature inside the company’s Atom editor. Once installed, a ‘portal’ opens up where you can invite coworkers to code with you.
Your portal has a ‘secret ID’ that GitHub says you can share in any chat application (such as Slack or HipChat), which populates a ‘join’ button automatically. Once others have joined your session, a new tab pops up in their Atom workspace that allows them to both view and edit the contents of your editor.
Each contributor’s cursor is uniquely color-coded, and GitHub is using WebRTC for the back-and-forth communication. All told, it’s a lot like the collaboration features inside Google Docs. For the person sharing a portal, code stays local to their disk, but Github says: “As you switch between files, the contents of your current active editor are transmitted to collaborators so they can follow along, but otherwise your workflow will be unchanged.”
Collaboration is also tricky. From GitHub:
To ensure responsive editing, each collaborator maintains their own replica of each document, applying local edits immediately before transmitting them to other collaborators. In the face of concurrency, edits end up being applied in a different order on each replica, but when the dust settles, all replicas need to have the same contents.
That last bit may be why Teletype is tagged as a beta product. It’s a soft admission that latency is a thing, and a broken connection could mean edits don’t populate. GitHub handles the handshake for connecting servers, but the actual data flows over encrypted peer-to-peer connections.
Teletype is also offered as an API named
teletype-client. “It should be possible to integrate
teletype-client into any web-based application or even package it in an Electron-based server to talk to it from native editors,” says Github. “Supporting inter-operation between different text editors is definitely part of our long term vision.”
“Collaborating remotely with another programmer shouldn’t be such a hassle,” senior GitHub engineer Jason Rudolph tells Dice. “To solve this issue, we created Teletype for Atom to bring real-time collaborative editing directly into your editor, so programmers can start coding together in a matter of seconds. Programmers can now write alongside of each other all while retaining their own unique editor themes and configurations. GitHub was founded on the idea of social coding years ago, and now we’re bringing that directly to your text editor.”
We’ll hold off judgement for now. One glaring issue is versioning, and how that resolves with collaboration. If a rogue engineer makes changes to a codebase, and those changes push, can you revert to a version without one person’s edits? Similarly, if several people are working on a project together, do changes reflect who made them, or are all changes simply merged to the master file?
There are definitely upsides: Teletype seems well suited for those times when you’d like someone to peek at your code to solve an issue, and it may prove a faster method when it comes time to have code reviewed. For those kinds of interactions alone, Teletype may just make itself a handy addition to Atom and other IDEs.