Login
A chronicle of the thoughts, learning experiences, ideas and actions of a tech junkie, .NET, JS and Mobile dev, aspiring entrepreneur, devout Christian and travel enthusiast.
My Open Source story (thus far)
About 2 years ago, I took a hiatus from writing .NET code to focus on NodeJS as I needed it for work. I worked with Express, and MongoDB and over the course of working and learning I developed a fondness for some tools and libraries as they just made my life easy and saved me time. Fast forward a few months and I am back to writing dot net code again (though it is dot net core now) I realise that quite a number of those libraries have no dot net equivalent and that is what set me down this trip.
The first library from the JavaScript world that I missed was shortid. It is a simple package that generates unique strings from seven to fourteen characters long and those can be used for just about anything. I used them as my _id
fields in my mongo collections instead of the mongoid
format that MongoDB assigns by default. It helped make them human-readable at least for me. I got back to writing web apps with ASP.NET Core and was itching for a way to generate short ids that I could use to uniquely identify objects in my database and use in a URL as well. When I discussed this with other dot net devs their response was to use Guid
's and while that would have met my requirement for uniqueness, I just didn't like seeing a Guid
in my URI. My grand solution was to write a dot net analogue called (you won't believe the amount of creativity this took) shortid. Writing it and posting the source code online allowed for me to gain valuable feedback and insights about handling thread safety and memory management when dealing with a lot of strings.
The second library I realized I missed was dotenv which is a library that helps load environment variables from .env
files. When I started working with ASP.NET Core, I tried handling configuration data using the baked in appsettings.json
files but those had the glaring limitation of having you place potentially sensitive information in plain text. .env
files allow for the files to just reside locally and not be checked into source control. I looked around and did not see any library that allowed for that to be done on ASP.NET Core and so ... (you guessed it) I wrote one. I called it dotenv.net. I made a few changes to the way the dot net port works to make sure it familiar to the target audience. Building this and having it open source helped me learn how to handle ideas from other developers in the form of issues or pull requests, know when a change recommended is in line with the goals and spirit of the project.
Recently, I really wanted to see a summary if the details of the calls my ASP.NET Core Web API was receiving and I realised the dot net ecosystem doesn't have something like morgan
which exists for NodeJS. I set out to write a port called Logly
which is out and on nuget. Writing a piece on that as well, that should be out in a few days.
The purpose for writing all of this and telling these stories is to encourage someone somewhere to do something. Do not feel like you cannot. If you identify an issue or a need in your environment, step up and take responsibility and this goes for more than just programming,
Cheers people,
Till the next one.
Comments