Sponsor Spotlight: CivilCode

Time for another spotlight! Today we’re talking to CivilCode!

2 Likes

Please tell us a little bit about your company

Nestled on the border of the Plateau and Mile-end in Montreal, Canada, CivilCode Inc develops tailored business applications. Nicholas Henry (@nicholasjhenry) and Hugo Frappier (@frahugo) founded the company in early 2016 to develop applications exclusively with Elixir. Before CivilCode, Nicholas and Hugo were both freelance Ruby/Rails developers.

We organize the Montreal Elixir Meetup to help grow the local community and sponsor this forum. We feel lucky that we get to use this language every day and by contributing in these ways, we hope others have the opportunity too.

How did you discover Elixir?

Nicholas discovered Elixir watching José Valim on PeepCode’s Meet Elixir published in 2013. He initially fell in love with the pattern matching constructs, the appreciation for OTP came after. Two years later, over a bowl of ramen, Nicholas discussed the language with Hugo and the idea of starting a company specializing in Elixir was born. Hugo experimented with the language and was hooked immediately. Over a period of six months, we discussed the type of company we wanted to run and the type of clients and applications we wanted to build.

Our goal is to develop software in a sustainable manner. Beyond all the modern programming practices we have adopted such as pair-programming, peer reviews, and test automation, one of the key concepts is what we call a developer block.
A developer block is:

  • a four day unit, typically Monday to Thursday, allowing Fridays for retrospectives, company or professional development.
  • a continuous unit focused on a single client. This approach reduces context switching giving more value to our clients and reducing developer stress.
  • a minimum billable unit. Tracking hours is painful. As we invoice for blocks in advance, we eliminate this source of stress, and there are no billing surprises for our clients.

What attracted you to Elixir?

Admittedly, it was our visceral reaction to pattern matching that attracted us to the language. Now that we have been developing applications over the last two years for our clients, there are three main areas we have benefited from with our adoption of Elixir.

  1. Improved developer experience: The toolchain, performance (not only in production but also testing) and quality of libraries from the core team and community are excellent.
  2. Access to community knowledge: Beyond the general support available from the community, there have been plenty of discussions and knowledge shared on software development in general. All our team members have advanced as software development professionals by adopting Elixir, from functional programming concepts to how we structure applications.
  3. New business: One of our major clients chose to work with us as they adopted Elixir because of our experience with the platform.

How did you train your developers?

We’ve found pair programming has been the best way to onboard developers. However, we’ve been fortunate that our team members have had at least some preliminary experience with Elixir.

As a conventional programming language, Elixir is a relatively simple language to learn. The language is small and very well documented. With some basic functional programming principles, such as keeping side-effects at the boundary of your application, you can be productive in a short amount of time.

When it comes to the platform’s concurrency model and OTP, there is more of an investment in training.

What kind of Elixir related projects have you worked on and how are you using Elixir generally?

We use Elixir and libraries such as Phoenix and Ecto as many would for a Web stack such as Ruby on Rails or Django. These are typically line of business applications to help automate existing manual workflows or replace existing systems.

We’ve also helped with integrating Elixir into an existing Ruby on Rails application for a large e-commerce store based in Los Angeles. Integrating Elixir enabled their team to reduce the number of servers, a clear benefit of the platform’s performance.

Were there any difficulties in transitioning to Elixir?

We were overzealous with the concurrency features in Elixir early on in our adoption which caused a few headaches in production. The platform along with OTP does solve some of the hard concurrency problems, but you need a thorough understanding of how to use these tools correctly.

When adopting Elixir, there is no shame in using Elixir as a conventional programming language following some basic functional design principles. The libraries you use such as Phoenix and Ecto leverages the concurrent programming model giving you the performance and stability benefits that drew many of us to Elixir in the first place. You can even stick with familiar programming models such as job queues, to begin with, and then replace those with OTP features later if applicable.

Other features that the platform offers such as hot upgrades should only be adopted if necessary. For many of us, we don’t have the problems where a solution like this is appropriate. Moreover, features like these are not free. You still need code to migrate existing state during a hot upgrade.

The book Adopting Elixir helps to put some of these features into perspective. This book is mandatory reading for any company starting with Elixir. A resource we certainly would have liked when we started.

Are there any architectures or methodologies in particular that you follow?

Domain-driven Design guides us in building applications, and while we haven’t adopted the extreme spectrum of CQRS and Event-Sourcing those concepts have had an impact on our approach and have influenced the architecture of our applications.

Event storming has become a pivotal discovery and design tool. Our recent experience with a new client helped them move beyond the current implementation of their workflow, to the high-level business requirements. It’s become a little addictive for us. When we have a problem, even beyond software, Event storming helps us to understand it better.

Which database systems do you use the most?

Our default choice is PostgreSQL. Ecto’s support for Postgres is first class. For the type of applications we build, we like to limit the number of external dependencies, and Postgres’ multi-faceted nature as a datastore suits us well. We’re happy to see libraries emerging like event_store and rihanna, a job queue, that enable us to utilize a single datastore.

How happy are you with your choice in using Elixir?

Extremely. We primarily use Elixir as a conventional programming language that gives us a great developer experience allowing us to deliver stable and performant applications. In those times when we need more power, a great concurrency model is at our fingertips that has helped us solve some tough problems.

Thank you for answering our questions! Is there anything else you’d like to share?

If you’re looking for a partner to develop a line of business application using Elixir we would love to hear from you.

6 Likes