Andrew Fontaine

Mostly code

I’ve been a GitLab member for 3 years now, but became a GitLab staff member in January 2019. It’s be a whirlwind year so far. Working for a hot startup moving at this pace has been the biggest change I’ve had to experience since moving to Ontario. It’s been exciting and wonderful, but that’s tangential to what this is about. At GitLab, I work on the release team, and a big area I focus on is FEATURE FLAGS!

Feature Flags… what

Feature flags, if you haven’t had the opportunity, can be a big part of continuous delivery. Martin Fowler loves them, and GitHub Actions featured them.

Read more.

While working on a phoenix application, I found the need to hang onto some state between API calls. It wasn’t quite enough state, and losing the state wasn’t exactly a huge loss, so I decided to use Elixir’s Agent.

To ensure my state was easy to retrieve, I needed to name my Agent after something I’d easily have. As this is a Twilio application, the phone number being called should do nicely.

Read more.

While working on a Phoenix app with an API, I felt I was missing out on the great templating engine offered by Phoenix. Fortunately, the next part of the application involved writing TwiML, an XML-based DSL built for programming Twilio.

Taking the example from their docs, the following response would respond with “Hello, world!” over the phone!

Read more.

After recently using elixir and phoenix to recreate the API for an old side project, I wanted to use Ecto’s embedded schemas, a schema that is not persisted to an underlying table, to validate the JSON coming into an API endpoint and get a workable domain object for the call before transforming it into the model persisted for the DB.

We’ll look at how I set up the sign-up and sign-in endpoints using the embeded schemas to validate the incoming JSON.

Read more.

This is part 3 of our series. You can find part 1 here and part 2 here.

This post’s topic is unit testing. We’ll be using Mocha, Chai, and Sinon.JS. Everything will be run with Karma on PhantomJS, so we will be able to run this easily on a CI server such as Travis or Jenkins.

Read more.
Older Newer