Elixir, Reading Dynamo Streams and Layoffs

I was working remotely for Weedmaps up until recently writing Elixir with a group of really great coworkers. Unfortunately, Weedmaps laid off 25% of its workforce and I was let go, along with some other really great productive people - if you need devs, qa, project managers please ask me. I know a bunch that I really enjoyed working with. I figured while I search for a new position I’d use some of the time to blog a bit about Elixir. This will be a bit rambling since I’m writing in-between phone calls and interviews.

Read More

Elixir, Ecto, Subqueries, GROUP BY

Since I’m very familiar with SQL, if I have to do something a bit more complicated with Ecto I start with the SQL and then work towards figuring out how to translate it to Ecto. It’s good to keep in mind that if the going gets too rough with the translation you are always left with the “out” of just executing raw SQL. You can map the result set into a schema and from the perspective of a programmer using the API it looks just the same.

Read More

Elixir, AWS, Parsing Describe DB Instances

This is code that I wrote to parse the ex_aws_rds describe_db_instances call. There is no parser in this module currently so parsing the XML is left as an exercise for anyone using this. Since I had to use the library in order to get RDS instance lists I figured I’d post what I used in case someone else wants to convert the XML to something easier to manipulate in Elixir.

Read More

Elixir/Phoenix - shared templates

In using server-side rendering for Phoenix web apps there are two approaches that I’ve used for dealing with removing duplication from templates that need to render the same information. The first is within a single view and the other is across views.

Read More

Elixir/Ecto - update_all with join

When I first began using Ecto it was only to directly issue SQL since the PostgreSQL database that I was working on was so far outside the norm (tables stored in different schemas, different naming conventions on primary keys, character fields being used to store foreign keys that pointed at multiple tables). The second project that I worked on was a database that I controlled so I got to use the more general features of the Ecto query language. The way queries are constructed is - for the most part - easy to grasp but there are definitely some cases that are harder to understand and that could benefit from more examples. The Ecto update_all is one of those.

Read More