DEV Community

Cover image for My Journey in Open-Source Library Development
Oleg Dubovoi
Oleg Dubovoi

Posted on

My Journey in Open-Source Library Development

Hello everyone! I want to share my experience of developing an open-source library, talk about the process involved, and inspire you to create your own projects.

Prehistory

In the spring, while watching one of Yegor Bugaenko's streams — I was inspired by the idea of open-source development. Yegor asserted that if you want to go beyond being an ordinary developer and become a more sought-after and unique specialist, you need to create something of your own. Whether it’s a book, a blog, a library, or even a framework, such projects allow you to stand out among many other developers, especially in today's IT market. This not only demonstrates your professionalism but also shows genuine engagement in the development of the field.

All of this made me think: how do I really stand out among other developers? Despite years of working in IT and participating in various projects, I still didn’t have anything of my own — something that could showcase my uniqueness and professionalism.

Searching for Ideas

I revisited my old pet projects on GitHub, but quickly realized that none of them were truly significant. So, I decided to start from scratch and create something new. Full of motivation and enthusiasm, I began to think about what I could write that would be in demand, at least among a small audience, and that would match my skills.

For two or three days, I analyzed ideas for my open-source project. The more I pondered, the more it seemed that everything had already been written, and that what had yet to be realized would be impossible to achieve alone. Let me say right away: this is a misleading perspective. Don’t let it destroy your potential. Yes, much has already been created, but that’s no reason to give up and abandon the idea of creating something of your own.

Now, I’ll explain why:

  • There’s always a chance to catch a trend and create a tool or service that quickly becomes popular. For example, during the COVID-19 pandemic, websites were developed that provided real-time statistics on infections and the latest news. Currently, we are witnessing a trend toward AI services, which continues to gain momentum. All it takes is to seize the moment and offer a solution that is in demand during that period.

  • It’s not necessary to be the first in a niche to conquer it. Let’s take Discord as an example: it appeared in 2015 when there were already established players like TeamSpeak, Ventrilo, Skype, and RaidCall. Yet, within just a few years, Discord became the leader in its segment. The key is not the novelty of the idea, but how effectively you address an existing problem.

The most important aspect of creating something new is to identify a real problem and offer a solution. This can be a global challenge or a small but significant issue that needs improvement. It’s crucial to understand what difficulties other developers or regular users face and how you can help them overcome these challenges.

After further reflection, I felt a desire to create something useful for the .NET community — a small library that could facilitate project development. Since my primary focus is .NET, I decided to concentrate on what I already know and do well. One idea that came to mind was to create a library for tracking input events from the keyboard and mouse.

A month before that, while working on a desktop application for Windows, I faced the task of tracking key presses on the keyboard to perform certain actions. The main nuance was that it needed to work regardless of whether our application was active. Since there were no ready-made solutions at that time, I utilized native P/Invoke calls and successfully achieved the desired result. At that moment, I didn’t consider that other developers might also face this issue and that a small library addressing this problem could be quite useful.

Yes, it’s not a library that will change anyone's life, but it’s the first step toward creating something of my own. It’s an opportunity to gain valuable experience and spend time engaging in something I am truly passionate about, which is why I decided to take action.

Development

The first step was brainstorming ideas for the functionality my library would have. I wanted its capabilities to be as broad as possible while remaining accessible and user-friendly. My goal was for the user not to have to write more than 3-5 lines of code in most scenarios.

During the brainstorming process, I came up with the idea that it would be possible not only to track input but also to control it. For example, with code, one could simulate button presses or key combinations, move the mouse cursor, disable certain keys so that the system wouldn’t respond to their presses, or even change key bindings. All these features were implemented gradually through updates.

As soon as I finalized the set of features, I enthusiastically began development. Writing the code was not particularly challenging, but I focused on its structure and cleanliness so that other developers could easily understand what was done and why. During the development process, I conducted global refactoring several times, changing the organization and names, as well as extracting parts of the code into separate classes. I paid special attention to separating platform-dependent code (as I planned to create a cross-platform solution in the future) from the library code itself. This would prevent the need to rewrite the entire codebase when moving away from P/Invoke. I also took the time to add XML comments so that users of the library could understand what each method or class does.

After completing the first version of the library, I uploaded it to NuGet (the package management system for the .NET platform, similar to npm or pip). I wanted to receive some feedback to understand whether anyone was interested in this project and which direction I should take next. Before promoting my library, I decided to create a README file in the GitHub repository, including information about the library's goals and a brief guide on how to use it.

README

The First Users

I decided to search for my first users on Reddit. After finding several suitable communities, I wrote a brief post titled "Open Source C# Library for Handling Keyboard/Mouse Events in Windows UI Apps" It was a bit stressful, and honestly, I didn't expect any significant results. However, surprisingly, it paid off. One of the posts received about 14,000 views and approximately 30 comments with positive feedback. It was an incredible feeling that I wish everyone could experience: the realization that the time spent on the project was not in vain. Although I didn't create something groundbreaking, I understood that there are people who find it genuinely useful and who are willing to support my efforts.

Reddit-statistics

After gathering all the feedback, I decided to continue the development and stay in touch with the most interested users who left comments. I actively communicated with them and listened to their requests for functionality they would like to see. Over the next month, I released several small updates and then refocused on attracting users.

On GitHub, there is a special type of repository called "awesome" — these are collections of links and resources compiled on specific topics, for example, awesome-dotnet. My goal was to promote my library in each of these repositories. Although this was not an easy task — a library with 10-15 stars on GitHub does not attract much interest — I still managed to get into several of them. This significantly increased user traffic and drew attention to my project.

Awesome-repos

Community Contribution to the Development

During the further development, I encountered many small tasks for which I sometimes lacked the desire and energy to complete. So, I decided to take advantage of one of the benefits of open-source development — attracting enthusiasts who were willing to help with these tasks. To do this, I turned to the Up-for-Grabs service, which provides a list of open-source repositories with active issues for those who want to contribute. After adding my repository and creating several issues, I immediately received requests for assistance.

Up-for-Grabs

After my library was downloaded more than a thousand times, I decided to actively work on the documentation. Since the first update, the functionality of the library had significantly increased, and the examples in the README file were no longer sufficient. Of all the possible options, I chose the simplest and most accessible: I created a separate Markdown file and detailed all the classes offered by the library. I also decided to write a small guide for advanced users who want to make full use of the library's capabilities. To my surprise, a guy who specializes in writing technical documentation reached out to me and offered his help. He assisted me in properly structuring the material and accurately describing all the details. With his help, we quickly completed this task.

Documentation-issue

Open-source development is a great opportunity to meet and expand your network with other programmers. So far, nine people from different countries have contributed to the library, including the United States, Australia, Argentina, Canada, Germany, Poland, and others. They have assisted in writing functionality, unit tests, and documentation. Moreover, it has been a wonderful exchange of experience and enjoyable communication. Perhaps with some of the contributors, we can start a new project together.

Contributors

Despite having a job and other commitments, I want to continue development and release a full version with the features that I believe should be included in the library. My future plans include making it cross-platform and decoupling it from specific UI frameworks.

Conclusion

In conclusion, I would like to summarize everything I've said. Never be afraid to try something new and don't stand still. If you truly love programming and want to grow as a developer, strive to create something of your own — whether it’s a small library or a service. You never know where it might lead. Throughout the development of this library, I found joy not only in programming but also in meeting people and making new connections. I plan to continue engaging in open-source development, not only by advancing my own projects but also by contributing to community libraries — this is also a great experience.

For those who want to start engaging in open-source development, I recommend this guide!

If you enjoyed this post, I would be grateful if you could support the library with a star on GitHub!

Top comments (2)

Collapse
 
__7d370320 profile image
Владимир Бринцов

Really great story! You have inspired me to also contribute or to develop open source project

Collapse
 
empiree profile image
Oleg Dubovoi

I would sincerely appreciate every comment, especially if you share your experiences in open-source development!