In my previous post Generating static data with Elixir comprehensions I showed how you can use comprehensions to generate static data in your Elixir application. That static data was stored as a Map in a module attribute and accessible with a function that returns the Map itself.
When building your application, you probably know how the static data will be accessed. Elixir has various ways of accessing data in a List, Keyword, or Map, and there are big differences in performance based on the size of tha data set.
A common requirement in software is to have a static data resource in your application or library. These are typically resources that changes so infrequently that releasing a new version for a data change is fine. Of course you can build these data by hand, but this is error-prone and makes rebuilding the static data more labour intensive. These problems are exacerbated by larger data sets. As good lazy (i.e. efficient) developers we can use code to solve these problems.
When I start a new project or get setup to contribute to an existing one, the first thing on my mind is: show me the Dockerfile.
Why? One of the main purposes of Docker is packaging an application with its dependencies into a portable image that can be run on most any host, thus simplifying deployments. Yet when it comes to development of these applications, Docker is often not part of the picture.