We all know that fuzzy feeling when you grab that coffee on Friday night and turn on the screen, knowing you have nothing better to do but to invest the next 4 hours building your awesome GitHub project.

That feeling doesn’t always tingle on Monday morning though, does it? Well, It might be more up to us than we think.

Here are 5 things we can learn from the way we collaborate and work on our open source projects, which we can bring into our every day’s work.

1. Collaboration without politics

“ The big thing about distributed source control is that it makes one of the main issues with SCM’s go away — the politics around “who can make changes.” — Linus Torvalds

Every developer can probably point to a moment in time when their bright or far-seeing idea was discarded simply because, well, people are people.

The beautiful idea that through effective distribution anyone can commit any idea or change to any project is one of the finest examples of collaboration in human history, not being limited by geography, nationality or rank.

Pull-requests in the wild

Here’s where it gets more tricky: Git is amazing for collaborating together on a single project.

But, what happens when we need to collaborate and share code between different projects?

When it comes to collaboration within an organization, things tend to get even more complicated.

Usually, shared code comes in the form of packages and shared libraries, which in turn are bound and coupled to specific people and repos.

Let’s say you need to use a small package or a part of a shared library which exists in your organization, and is maintained by the infra-team, but you also need to make a small change to that library of package to fit a new project.

Your common option is to make a PR to the repo from which that package or library was published, and wait a few weeks with fingers crossed.

When the change you need is too context-specific, it makes no sense to update the whole package or library, and the only option would be to create a new repo and publish a new package. This workflow is limiting and discouraging.

This idea is one of the very reasons why Bit was created to improve and distribute the workflow around sharing code between projects as a team.

With Bit, components of code can be shared directly from any repo and developed from any other repo, while changes can be synced between them. This workflow works for anything from UI components to Node modules and even GraphQL API components.

2. A better degree of abstraction

My new project brings mobile metrics for your basketball through GPS, you’re welcome to use it

One of the best things about building a GitHub project is that it’s often born out of an idea which comes from a very real every day’s life experience.

However, when you want to turn this idea into a new project, you also need to generalize it just enough so that it will be useful to other people.

While over-generalization should generally be avoided, thinking in modularity and reusability is also the key to better code sharing.

When you write code which is meant to be shared, you keep in mind two key questions: “will it solve my problem?” and “will other will benefit from using it?” When the answer to both is positive, you’re on the right path.

Here’s a quote I like by Google’s Addy Osmani.

“ If you’re building components to be shared with the community or even just your team, ask yourself if features in your API will be used by 90% of users. If so, it’s likely pretty core functionality and should stay. If a feature it going to be used by the 10%, it should probably be a separate component or module. Avoid code bloat. “ — Addy Osmani

Bit’s distributed workflow also helps you change and evolve shared code from any project, so it can be easily modified to fit different use cases while changes can be easily synced across your codebase with universal control.

3. Discoverability is worth the effort