5 Reasons To Share Open Source Code With Bit

Jonathan Saring
Bits and Pieces
Published in
5 min readJun 5, 2018

--

SCM hosting platforms (GitHub, GitLab, BitBucket) were built to breed collaboration and code sharing around source code projects.

We live in an era where open-source becomes one of the world’s strongest innovation drive engines. Popular projects are widely used industry benchmarks, and the amount of code written grows exponentially.

The thing is, if we continue building more projects we also need to collaborate on the components and modules from which we build them. Otherwise, we’ll just spend more time reinventing the same wheels.

Bit’s component platform isn’t here to replace GitHub or any other platform. Instead, it helps you collaborate on the smaller components and modules of your projects, and to open source as many of them as you like.

1. Collaboration on components = Joint Lego Box

Through platforms like GitHub we collaborate to build projects together.

Through platforms like Bit we can collaborate on the building blocks of these projects, so that we won’t have to rewrite the same code in different projects.

Creating a Lego Box of your favorite components and modules means you can share it with others, and use these pieces to build new projects together.

With Bit you can isolate components from different repositories (no refactoring needed), share them with others, use them in any other project and discover building blocks shared by others in the community.

This collaborative process helps create more open source code, and make more of it accessible and useful.

2. Distributed hosting = Community first

Just like Git and Bit themselves are distributed, we can also distribute the way we host and collaborate on open source code. Let’s see an example.

Here’s an open source React application shared on GitHub.

Bit was used to share the components- in this case, UI components- it’s built from (zero refactoring needed). Take a look.

Now, the source code of the project is hosted on GitHub, where developers can collaborate to develop it. At the same time, every component can be discovered, used and even developed from any other project.

The code is no longer hosted solely on a single SCM platform, but is now distributed in multiple projects platforms, when every small pieces of it is available and transparent to the community.

3. Opening parts of private repos = more open source

I personally like this point a lot.

One of the main barriers to sharing open source code is the fact that much of the code we write is hosted in private projects.

Still, many of these private projects contain many components and modules which can make for great open source code community members can use.

However, open sourcing parts of a private repos is hard. Up until Bit, you had to create a new repo, refactor the existing one, move some of its code to the new repo, publish it and so on.

With Bit, you can just choose the parts of the private repo you’d like to share with the community and make them available as Bit components. No refactoring, no repo splitting and no overhead.

Every developer and organization can now share a lot more open source code without compromising their private technology or having to work too hard. More open source means more collaboration, and more innovation.

4. Discoverability = Teamwork

One of the major problems with open source code is discoverability.

RollUp’s author, Rich Harris, wrote: “Discoverability is often cited as npm’s biggest flaw. Many blog posts — scratch that, entire websites — have been created to try and mitigate the difficulty of finding what you need…

Who’s to say which useful components were written in the 80 Million projects hosted on GitHub? Without an effective way to find them, we end up writing the same code already written before.

Bit provides a discoverability portal on top of GitHub projects, that makes the smaller modules and components inside them discoverable.

Apart from making them available to find every component is also presented with features to help judge its behavior and quality, such as build & test results, auto-parsed docs and even live rendering for UI components.

Better discoverability means better collaboration, which in turn saves time and makes for better projects built in platforms like GitHub.

5. Less overhead = More code sharing

This may sound trivial, but it really isn’t.

Before Twitter, people had to work hard to share ideas on blog posts. Making it easier to share smaller building blocks and ideas breeds community sharing.

Bit makes it easier to share smaller pieces of code with the open source community. You can use it to seamlessly isolate any set of files directly from any SCM project (Javascript for now), share them with the world and let others use them in any way they like from NPM to Bit itself.

You don’t need to split repos, refactor code-lines or configure environments. Instead, you just need to decide which code to share, and point Bit to the parts you want to share. It will do the heavy lifting. Lowering barriers means more code sharing, which at the end of the day, is what open source is all about.

As of Today, about 1/4 of all code shared with Bit is open source. A lot of these building blocks are being discovered and used by other people in the community. Instead of having different people writing the same code pieces for different projects, we can collaborate and share more knowledge.

Bit itself is open-source too, so feel free to jump in and learn more.

--

--

I write code and words · Component-driven Software · Micro Frontends · Design Systems · Pizza 🍕 Building open source @ bit.dev