Going by AlloyCI’s introduction post, you would think that the idea to write a CI coordinator came pretty naturally for me, but it actually took me quite some time to find the perfect idea for a new project.
Since the main purpose of starting this new project was to cement my newly acquired Elixir knowledge, I could have chosen something simpler, or even just gone along with the tutorial projects found in all language learning books. Something like a blog management system, a GitHub issue API client, a very simple CMS, etc. But I knew that if I went that route, I would stop adding features to the project as soon as I was done with the book. I did not want that to happen.
I really think that a longer lived, more useful project, will have a more positive effect, than a one-off tutorial project, specially if you try to make something other people might find useful. But here’s the catch: Coming up with something other people might find useful is really hard!
A good starting point is finding a problem that you might have that isn’t quite solved by current offerings. Chances are that more than one person out there has the same problem as you. Now, I’m not going to lie, it is going to take you a lot of time to come up with something usable, but that is part of the fun!
I took me around 3 months until the CI coordinator idea creeped into my head. Before that I thought about re-implementing the omniauth-saml
Ruby library in Elixir, but that idea quickly died when I realized that SAML support is almost non-existing in Erlang, let alone Elixir, at least nothing that can compare with ruby-saml
and it’s power. Once that idea died, I continued with the re-implementing something idea for a while. I eventually gave up when I noticed that every idea I had to re-implement something, already had a corresponding Elixir project. In hindsight this might not have been the best idea. Even if there is already a library out there, you can always learn a lot by re-implementing it. Your own particular views and opinions can lead you to a better implementation of an existing solution. At the very least you will learn a lot.
The idea to create the CI coordinator came to me, as many ideas often do, while I was in the shower. Clearing your mind and not thinking about a problem is often the best way to find a solution, I have experienced this multiple times in my life. Once the idea “presented itself”, I knew it had great potential. By re-implementing the GitLab CI API in Elixir I would be decoupling its system and liberating the GitLab Runner, making it compatible with other SCM systems. It would give new possibilities to an already great, but locked down project (the CI Runner). The last part was what really got me excited to get started. I could leverage an existing project to build something new, and simplify some of my approach, which would give me a head start, and make it possible to release an Alpha version quicker.
The next day I got started with the basic project layout and did not go to bed until 4 am of the next day 😬
And that is the squick story about how I got started with AlloyCI. Part 2 of the Dev Diary will be about project structure for a new Phoenix project, and the transition between 1.2 and 1.3 that AlloyCI went through before its public release.