Building an Elixir Web App

Over the past few months I’ve been building a small internal application at work. I’ve been using Elixir, Ecto and Phoenix and it’s been an absolute blast. I thought it would be useful to put together a “lessons learned” blog post about the techniques I’ve found helpful using these tools to build a database-backed web app. This post is not intended as an introducion to any of the these tools. I assume some knowledge of Elixir, Ecto and Phoenix. ...

January 19, 2015 · Drew Olson

Good Software Developers

I’m approaching 8 years as a professional software developer. I’ve written a lot of code, worked on a few teams and helped build a team from 4 developers to ~60. Now, more than ever, I find myself thinking about what it means to be a good software developer. Not good as in “good is the enemy of great”, but good as in “I want to work with this person again”. I think there are three characteristics that make someone good in this industry. ...

November 1, 2014 · Drew Olson

Node Streams for APIs

Node streams are a fantastic abstraction for evented programming. They’re also notoriously hard to implement. In this post, I’d like to walk through implementing a streams2 Readable stream to wrap an API. The API Suppose we have a web service that returns a list of customers. There might be a large number of customers, so this service paginates the results and expects us to provide a page number when requesting data. A sample request to the API might look something like the line below. ...

January 4, 2014 · Drew Olson

Understanding gen_server with Elixir and Ruby

Recently, I’ve been spending some time working in Erlang and Elixir. I had tried to break into Erlang in the past but I was always stymied by the steep learning curve of OTP. gen_server in particular always seemed like black magic to me. However, after attending an Erlang workshop at Lambda Jam this year it finally clicked for me. After I finally “got it” I had another realization: it isn’t that complicated, but there aren’t very many good explanations. In this post I’m going to attempt to explain gen_server using Elixir and Ruby code and some simple diagrams. ...

October 25, 2013 · Drew Olson

Clojure core.async and Go: A Code Comparison

Last week, Rich Hickey announced Clojure core.async in a blog post. As mentioned in the post, the new core.async library has a lot in common with Go. In this post, I’ll compare the fundamental building blocks of concurrency in core.async and Go with code examples. Note: Clojure core.async provides two sets of operations on channels. The blocking operations are for use with native threads and the non-blocking operations are for use with go blocks. In this post, I’ll be focusing on the non-blocking operations used with go blocks but I’ll briefly mention the blocking versions. ...

July 4, 2013 · Drew Olson