Five years ago I released the initial version of my first open source library. Today it has more than 11,000 stars and 2,600 forks on GitHub. Time to take a step back and look at the journey.
Early in 2014 I was working on a project aiming to connect local venues and its customers. My task was to build two Android apps: one for the customers and one for the venues. The main view of customer app was a timeline of special offers posted by connected venues, each row had the venues' profile image on the left and the details about the offer on the right. My client provided me with the designs and – you might have guessed it by now – he expected the profile images to be clipped to a circle. That's where it all began.
While using circular profile images is pretty common nowadays, it was quite new back then. As probably every developer would, I started looking for existing libraries to do the job and also did some research on how the cropping actually works. The two resources that finally pointed me in the right direction were a blog post by Romain Guy (who worked on Android graphics at Google at that time) and a library to created images with rounded corners by Vince Mi which was based on the techniques described by Romain. Unfortunately that library didn't support cropping images to a circle at that time so I decided to create my own implementation.
There were three requirements I wanted fulfilled by my implementation: first, it should crop an image to a circle (obviously), second, it should be compatible with Picasso (which I was using at that time) and third, it should be as simple as possible, i.e. it should be a drop-in replacement for a regular ImageView. The initial version ended up being just shy of 200 lines of code.
During the time I was working on it, the idea to publish the result as an open source library grew on me. I was using open source libraries in all my projects and it made things so much easier. With the rise of circular profile images I felt that what I built could also make the life of other developers easier. It also seemed like a great opportunity to learn. So after finishing the code I started looking into the process and requirements for publishing it.
First task on the list was deciding on a name. While naming things is one of the two hard problem in computer science, it was quite easy in this case. The first thing that comes to mind for an image view that crops the image into a circle? "CircleImageView", done. The second task was a lot harder: publishing it on Maven Central. It got a lot easier these days but back then I had to claim my namespace on OSSRH, include helpers to upload artifacts using Gradle and setup the signing process.
On Monday, 20.01.2014 it all call came together: I released v1.0.0 of CircleImageView.
Sounds straightforward so far? Well, I left out an important detail: I was afraid. While I already had some public repositories on GitHub, I never published anything with the intent for it to spread. I was afraid that people won't like it. I was afraid that my code wasn't good enough. It took quite some convincing myself that what I built was actually worth publishing. I eventually did and looking back now, it absolutely was.
After publishing the code on GitHub and the compiled artifact on Maven Central, I needed to get word out about this new library so I went over to the Android development community on Google Plus and posted a short info and a link to the GitHub repository (unfortunately the post doesn't exist anymore as I deleted my Google Plus account a while ago). I got some comments on the post with one of them catching my attention: Android Weekly said that they wanted to feature my library in the upcoming issue of their newsletter (#86), which was due about a week later. I was stoked – that much exposure wasn't what I would've expected within just a couple of days.
With the release of the Android Weekly issue featuring CircleImageView, more and more people started using it and the first couple of issues popped up and were posted on GitHub. I released v1.0.1 only four days after the initial release and v1.1.0 about two weeks later with some more tweaks and fixes. The library was stable and people liked it. I was relieved. What started then was basically product management: with new issues and feature requests coming in, I had to decide what I wanted CircleImageView to be, i.e. which features it should have and which it shouldn't for the sake of simplicity. While it wasn't always easy, e.g. when declining a well-prepared pull request, discussing features, solving issue and interacting with the community on GitHub was fun most of the time (and still is).
I released a couple more versions in the following three years, but most of the changes and additions were minor – the general idea never changed. It still is a drop-in replacement with a very limited API. Based on the number of stars on GitHub, the number of "users" grew constantly and in June of last year it reached 10,000, something I would never have expected when I started it.
In the last two years development slowed down considerably and I didn't do a very good job maintaining the library, especially responding to new issues – work took its toll. The popular demand for AndroidX support convinced me to release a new version two weeks ago after more that a year of inactivity, but I'm not sure where it goes from here. I've been contemplating to deprecate CircleImageView for a while since the ecosystem changed a lot and Google now recommends Glide to load images (which already offers an easy way for circular transformations). But shutting down the whole thing is a hard decision to make, even (or especially) after five years. I'm not quite there yet.
While I'm not sure about the future of it, my takeaway from this journey is clear: getting over my initial fear and putting CircleImageView out there was so much worth it. Maintaining it was and is fun and rewarding and there's heaps of opportunities to learn something new. Would definitely recommend!