Elixir Streams

I previously wrote about explicitness in Elixir. One of my favorite ways the language embraces explicitness is in its distinction between eager and lazy operations on collections. Any time you use the Enum module, you’re performing an eager operation. Your collection will be transformed/mapped/enumerated immediately. When you use the Stream module, you’re performing lazy operations. The Stream module provides many of the same operations as Enum, but when used with Stream they’re describing future computations rather than actions to be taken immediately. Conveniently, all streams also implement the Enumerable protocol, meaning they can use any of the functions within Enum. ...

June 8, 2015 · Drew Olson

Sanity Tests

It is common for test “classifications” to have a plethora of definitions. Sanity tests are no different. Wikipedia says the following on the subject: the sanity test […] determines whether it is possible and reasonable to proceed with further testing. This implies that a sanity test is some sort of “pre-test” to determine if further testing even makes sense. I, however, think of sanity testing as breaking the fourth wall of the codebase. I believe sanity testing should test assumptions about the codebase itself rather than the behavior of the code. ...

May 29, 2015 · Drew Olson