axelson

axelson

Scenic Core Team

11) ElixirConf 2017 - Its Better Unstated - TJ Stankus

ElixirConf 2017 - Its Better Unstated - @tjstankus

This is a story about transitioning an obsession with object-oriented software design to an obsession with functional software design. It’s about experimentation, learning, and play. It’s about what happens when you let go of sacred cows you’ve hung onto for nearly 20 years and insist on wiping the slate clean.

The story is told through a code kata. It starts with a Ruby example, the result of a rigorous application of OO principles. It’s thoroughly decomposed, free of conditionals, and contains small objects representing domain concepts, including state. The solution is all about state and it’s lovely, if a little overwrought.

But could I implement the same kata in Elixir entirely without state? It turns out that leveraging functional approaches and Elixir features like pattern matching, robust list processing, and guard clauses, a conditional-free solution emerged with an 85% reduction in lines of code.

This talked is aimed squarely at the developer thinking about or just starting to transition from an OO mindset to a functional one. I’ve had several jaw-dropping moments along my learning path and I hope to share my experiences and enthusiasm with others.

Audience: Beginner

All talks are available in the Elixir Conf 2017 Talks List or via the elixirconf2017 tag

Most Liked

tjstankus

tjstankus

Guilty as charged. :slight_smile: It’s hard not to talk shop and teach with her as much as I do and not be strongly influenced by her ideas and presentation style.

JEG2

JEG2

Author of Designing Elixir Systems with OTP

I completely understand that. Sandi is terrific. I keep hoping she’ll try Elixir someday! :slight_smile:

JEG2

JEG2

Author of Designing Elixir Systems with OTP

I could definitely tell that this talk was done by someone who has taught with Sandi Metz. It sounded like her at times.

Where Next?

Popular in Talks Top

axelson
ElixirConf 2017 - Embedded Elixir for Monitoring the Built Environment - Christopher Coté At CRT Labs (Natio...
New
axelson
ElixirConf US 2018 – Take Your Time – Ben Marx (@bgmarx) OTP20 officially introduced dirty schedulers. In t...
New
New
JuanjoA
Hi, I don’t know if I have the post in the right place. I put here in case you might be interested, I am not the author, I just found it...
New
axelson
ElixirConf 2017 - Elixir Power Tracing - Gabi Zuniga Tracing is a technique for tracking events during a pro...
New
New
axelson
Consistent, Distributed Elixir - @keathley Elixir and Erlang provide powerful mechanisms for building systems that are alw...
New
axelson
ElixirConf 2017 - Managing Tables With Elixir and OTP - Robert Beene We’ve all waited for a table at a resta...
New
TwistingTwists
I am in middle of watching this. I have to stop every minute and think over what Chris just said. The amount of info he sends over that ...
New
rodrigues
Day 1 Keynote about Lumen - An alternative BEAM implementation, designed for WebAssembly by @rcm765 @KronicDeth @bitwalker...
New

Other popular topics Top

mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement