Getting a default value from a Map

published on Dec 04, 2016

I ran into a interesting gotcha while using `Map.get/3`. `Map.get/3` is defined as: `get(map, key, default \\ nil)`. The default you pass in is not the default value to return if the value is nil. Instead it is what you return if the key is missing. This is an important distinction. To set a default value from a map when the value is nil just use the normal falsy trick `Map.get() || default_value`.

Dynamically accessing a field from a struct

published on Nov 29, 2016

Use Map.get/2 to access fields on a struct dynamically.

Day One - Part One

published on Jun 06, 2016 as part of the series: Advent of Code with Elixir

My Elixir implementation of the Advent of Code Day One - Part One. Helping Santa figure out which floor on an apartment building he is on.

Perpetual Learning Talk

published on Jun 04, 2016

I was asked by my good friends at Houston's Iron Yard campus to be a guest speaker. When deciding on a topic, I landed on giving a talk about how their learning will never stop. Obviously learning and teaching are subjects near and dear to my heart. Check out the slides and let me know your thoughts!

Clear a collection in Meteor

published on May 25, 2016

While working on my gaming guild website, I needed to dump my `Categories` collection and just reseed it. We are talking emptying gas cans and lighting a match style.

How to exit out of psql

published on May 24, 2016

Ever jump into psql and then suddenly forget how to exit? They don't make it easy do they? The answer: `\q`.

Virtual Brown Bag 5-24-16

published on May 24, 2016

Video and links from today's VBB. We talked about Elixir, Phoenix in production, and ended with a detailed look at Anthony's Quantum Pilot game written in ES6 with Electron for cross platform deployment.

Snap object to terrain in Unity

published on May 24, 2016

Saw a video on how to do this with Unreal Engine and wondered if there was a way to do it in Unity. The answer... Yes.

Renaming a branch in Git

published on May 23, 2016

We are all super fast keyboard wizards. Our words per minute almost surpasses our typos per minute. Almost. Here is how to fix that typo in your git branch.

Piping to an anonymous function

published on May 23, 2016 as part of the series: Essential Elixir

At some point you probably will want to use the pipe operator with an anonymous function. Here is how to do it.