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 US 2018 – You Can Never Debug the Code You Run, But You Can View the Code the Debugger is Running – Luke Imhoff (@KronicDeth) ...
New
axelson
ElixirConf 2017 - Working with legacy databases in Ecto - @geo Often when starting an Elixir or Phoenix proj...
New
Lawrence_elixir
@keathley - Senior Engineer Bleacher Report and Elixir Outlaws presenter Talk: Building Resilient Systems with Stacking Talk in three w...
New
New
AstonJ
Just starting to go up - did you attend? Have any faves? Here are the keynotes:
New
AstonJ
#Day 1 ElixirConf 2017 - Day 1 Keynote - Justin Schneck (Discussion thread) ElixirConf 2017 - My Journey from Go to Elixir - Veronica L...
New
CodeSync
Introducing Phoenix Sync - James Arthur | ElixirConf EU 2025 | ElixirConf EU 2025 Comments welcome! View the <span class...
New
axelson
by @jon At PagerDuty, we run our systems across many geographic regions to ensure we’re always available, even when you might not be. E...
New
ElixirConf
ElixirConf: ElixirConf 2023 - German Velasco - Using DDD concepts to create better Phoenix Contexts Comments welcome! View the <span cla...
New
axelson
Okay, posting this day’s talk by @boydm: ElixirConf 2017 - Elixir Native UI - Boyd Multerer I will be show...
New

Other popular topics Top

chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
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
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement