Tips to successfully build your open-source projects #1. Don’t rush features, Code quality matters

Publishing some code publicly is what scares many people from contributing to open-source.

That’s a legitimate fear: you don’t want to share code that other people could use to judge you because they do not agree with your design decisions or coding style. Maybe some of your projects are quite old and do not reflect your coding skills anymore.

But that’s actually the strength of open-source: everyone can see your code!

From my personal experience, most people won’t care about your code and will not look at it: they are just looking for some tools solving their problem, meaning that most people just quickly skim through the README of your project to see if it matches their needs.

Eventually, some of the people who checked your README will consider using your tool within their own project. If they plan to use it in production, they may spend some time to evaluate if your library is correctly maintained and safe to depend on. To do so, they may randomly open a few files to quickly estimate the code quality. In that kind of case, they will usually not spend time to actually read your code and understand it: what they will be looking for are documentation, overall code structure, and tests.

But there will be a few folks who will spend some time going through your code. These people can be some of your users debugging an issue with your project or attempting to add a new feature. And sometimes, some others are reading your code to learn from it, or to get inspiration for their own project.

Some people really read and try to understand your code! That kind of message makes you happy for the whole week!

So, yes, everyone can see your code. Most people won’t look at it, but some will. And as scary as it is, this is a very important and positive point: yes, you will need to pay extra attention to what you commit, but that’s what will enable you to learn!

For your open-source projects, you are not working for a company: you don’t have deadlines except the ones you defined, and you can fully control what you will work on.

Here are a few questions you should take the time to think through if you want to build a solid open-source project:

  • Constraints & Scopes: What are the constraints and scopes of your project? For example, your project could be cross-platform or should have high performance.
  • Personal Growth: What do you want to learn with this project? It does not necessarily need to be technical.
  • Technical Specifications: How are you going to design and implement each part of the project? What are the common best practices to complete each task? What are the pros and cons?
  • Experimentations: What are some processes, coding styles, design patterns, … that you frequently use without checking for alternatives? You can take the opportunity of this new project to check for new approaches and expand your knowledge.

This will take some time, but it will help you define the scope of your project and better understand what you want to do with this project (both in terms of deliverable and personal growth).

This is also how you are going to learn the most about some technical aspects. You may know how to develop most of the features for that project. But are you developing them in the right way? Are there better ways out there? Are there new things you can experiment?

One another advantage of taking the time to think is that it should help to increase your code quality. You may take better design decisions, and you may be more inclined to thoroughly test and document your code since you spent a lot of time designing it. All of this will increase the confidence you have in your project and in your code, such that you will be more confident in open-sourcing your code.

Sure, there might still be better ways to do the same project. Maybe some people will argue that you could have done it differently. But that’s not the point: if you spent enough time, you should have increased your knowledge, delivered a stronger project, and built stronger confidence!

Don’t rush for features. Take advantage of open source to spend time learning, build great projects, and be proud of it.

Originally published at https://cylix.github.io on September 9th, 2017.

Passionate about programming since middle school. French living in San Diego, California. Senior SRE at PagerDuty.