Stanislav Bozhkov (a.k.a @StanBright) is a Bulgarian software engineer, based in Sydney, Australia. Like me, Stan describes himself as a "polymath" - non-stop tinkerer, passionate about building things that improve other people's lives. In the late-2000s, he was one of the early adopters of Ruby on Rails in Bulgaria, eventually building svejo.net with his roommate - a local version of digg.com, one of the most popular Internet communities at the time. For a small Internet market like Bulgaria, Svejo was an absolute hit, and an inspiration for other to-be-entrepreneurs, like myself.
Several years later, Stan's passion for building things took him to other end of the world (literally). Since 2017, he has been actively working on Ruby on Rails and Elixir projects in the Sydney area. In the middle of 2019, Stan decided to quit his job and devote all of his time on his side projects - SaaSHub and LibHunt. His latest work - Alertcamp, has been built entirely in Elixir, and will be the focus of our conversation.
What brought you to Elixir?
Stan: "This is a difficult question, and I can't say that there's a definitive answer. In general, I've been monitoring the development of the Elixir community for several years now. In fact, I invested about 6-12 months back in 2016-2017. I guess it was the hype of the Ruby community around Elixir and the "promise" of solving Ruby and Rails' shortcomings in an easy and efficient manner. Moreover, I was into ruby for about 15 years and yearning something new, different and modern. Elixir was kind of a natural and "easy" choice - the syntax, community and culture are very similar to Ruby's in many ways.
What is more, apart of the resemblance to Ruby and Rails, Elixir running on the BEAM is so different. Which is good. That opens the door of solving different types of problems. Problems that could be much more difficult to solve with a different language.
So, yeah, I guess that's what brought me to Elixir - it was easy and approachable to start with, a great community and promising an alternative platform that allows you to solve different types of problems. The fact that it is functional was enticing too."
Tell us a bit about Alertcamp. Why did you choose Elixir for it?
Stan: "I had been looking for an opportunity to apply my Elixir knowledge and enthusiasm to a real-world problem for quite some time. While working on SaaSHub and LibHunt, it occurred to me that I could provide better lists of software alternatives if I knew all the products people are mentioning on Reddit, Hacker News, and Dev.to. There are so many posts where people are suggesting alternatives to products or libraries. Having that data would be a great vector of improving the quality of both my products. I thought that this would require processing a lot of data and that Elixir was a suitable tool to solve that problem.
I realized that if I built such a tool, I could package it as a separate product and integrate it separately with SaaSHub and LibHunt. The idea is "simple" - all products and libraries from my primary projects get synchronized through an API with Alertcamp. Then, whenever some of the subscribed keywords get mentioned on one of the monitored platforms, the mention gets reported back through webhooks. In the end, I know which products or libraries are mentioned in the same post and can use that as a vector to build objective and current lists of alternatives.
I've implemented a custom version of the "Aho-Corasick algorithm" so the number of monitored keywords doesn't matter. It could be 100 or 2,000,000, and it will take a similar amount of time to know if a keyword (product name, URL, or library) has been mentioned in a post or a comment. To put it in perspective, Alertcamp is "real-time" monitoring everything posted on Reddit and Hacker News on a cheap $5/month VPS. And the machine is usually loaded between 1% and 15%. I can't imagine achieving that with Ruby and Rails."
Coming from Ruby, what did you find most challenging in Elixir?
Stan: "Being functional and immutable takes some time to get used to. That was a bit challenging in the beginning. Then, Ecto as a data-mapping layer is great, but it just cannot beat to the convenience of ActiveRecord. At the end of the day, you get used to that and realize that it may not be as convenient, but it could be much more efficient.
Macros could be a bit challenging, too. But, as it usually happens - everything's difficult until it isn't. Once you get into Elixir, you realize how simple and well thought out a language it is. I'm using macros now to build some of the ActiveRecord conveniences I've been missing.
I prefer having full control over my machines and don't like being locked into platforms like Heroku or Gigalixir. Setting up fully automated deployment and provisioning processes required some time and effort too. It somehow felt more involved than deploying a Rails app. Or maybe I'm biased due to my experience with Rails. ¯\(ツ)/¯"
What would you like to share with people new to Elixir and Erlang?
Stan: "It's a great language with huge potential. It is very delightful to work with, and the tooling and ecosystem are steadily growing and developing the right direction. I might be wrong, of course, but I think that Elixir is an excellent and future-proof choice. The BEAM + OTP is like a separate operating system that your app gains full and easy control over. It will open the door to solving an alternative type of problem, and even if you don't use it professionally, I believe it makes you a better developer. Again, it's a pleasure to work with. What is more, given that CPUs are scaling in the number of cores nowadays, that makes Elixir and Erlang even more appealing. Furthermore, the next version of Erlang will include a JIT compiler that will improve the performance of most Elixir/Erlang software tremendously - for 'free'."