Elixir Mix

EMx 071: The Problem with Dialyzer with Chris Keathley


Listen Later

In this week’s episode of Elixir Mix the panel interviews Chris Keathley about Norm and his recent talk at ElixirConf. Chris is currently working at Bleacher Report, working mostly on backend systems. The panel starts by complimenting his presentation skills and asking him about his dislike for dialyzer.    Chris share the many problems he has with dialyzer. Dialyzer takes a lot of time and has crappy ergonomics. While it tells you a lot about an Erlang system that benefit doesn’t extend to Elixir systems. Neither doesn’t understand protocols. Mostly he feels that most type algebras don’t allow for growth, making changes and making the breaking changes. Explaining that type systems all have their costs and benefits, he feels that you don’t see the benefits of dialyzer until your system is up and running.   The panel wonders about Norm, a library written by Chris. Chris explains what it is and what its aims are. He wrote the library to solve some of the problems seen with dialyzer and other problems he was having at work. It is mostly for validating data. He wanted to be able to put checks in where ever he wanted and to make it very hard to break systems. Norm lets you describe data in your system, by taking an arbitrary predicate and making it into a spec. Chris explains how this works and how it will not make any changes until you tell it to. He shares some of the other features offered by Norm.    The sweet spot for using Norm is the next subject broached by the panel. Chirs explains that Norm fits well into the boundaries of systems, this is the most obvious place and the best place to start. The least intuitive way Chris has used Norm is to specify the options you need to pass to gen servers. He explains that it is not the most obvious use for Norm but it has been really helpful with the API.   Next, the panel asks about changesets and how that works with Norm. Chris explains that changesets are very specific while Norm allows more freedom. The biggest difference between the two is that Norm won’t do casting for you. They intentionally built Norm that way because of the way Bleacher Report uses string and atom keys.    In his talk, Chris explains the concept of design by contract. It means that for every function that you have you can specify preconditions and postconditions. Preconditions are things that have to be true prior to calling the function. Postconditions are things that have to be true after the functions been called. Right now Norm doesn’t provide preconditions and postconditions which provides a way to avoid some of the more expensive costs in production.   Chris uses Norm in all his opensource projects and in projects at work. He shares the benefits he has seen. He believes that most systems will see benefits from Norm if they have room to grow. In his experience, every time they run into something new and think they may need to expand or change Norm, they find that Norm already has everything they need. Chris asks listeners who want to help contribute to Norm to try it out and to give him feedback. Panelists
  • Mark Ericksen
  • Eric Oestrich
  • Josh Adams
Guest
  • Chris Keathley
Sponsors  
  • Sentry– use the code “devchat” for two months free on Sentry’s small plan
  • Adventures in Blockchain
  • React Round Up
  • CacheFly
Links
  • ElixirConf 2019 - Contracts for Building Reliable Systems - Chris Keathley
  • https://github.com/keathley/norm
  • EMx 040: Elixir Outlaws and Adopting Elixir with Chris Keathley
  • EMx 003: Chris Keathley
  • https://keathley.io 
  • https://twitter.com/chriskeathley?lang=en
  • https://elixiroutlaws.com/ 
  • https://en.wikipedia.org/wiki/Design_by_contract 
  • https://www.facebook.com/Elixir-Mix 
  • https://twitter.com/elixir_mix
Picks Mark Ericksen:
  • zFRAG 
Eric Oestrich:
  • War Machine 
Josh Adams:
  • "Unison: a new distributed programming language" by Paul Chiusano
  • https://github.com/unisonweb/unison 
Chris Keathley:
  • Daniels' Running Formula 
Special Guest: Chris Keathley.

Advertising Inquiries: https://redcircle.com/brands

Privacy & Opt-Out: https://redcircle.com/privacy

Become a supporter of this podcast: https://www.spreaker.com/podcast/elixir-mix--6102049/support.
...more
View all episodesView all episodes
Download on the App Store

Elixir MixBy Charles M Wood

  • 4.8
  • 4.8
  • 4.8
  • 4.8
  • 4.8

4.8

13 ratings


More shows like Elixir Mix

View all
Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

Syntax - Tasty Web Development Treats

990 Listeners

Elixir Wizards by SmartLogic LLC

Elixir Wizards

22 Listeners

Rustacean Station by Rustacean Station

Rustacean Station

62 Listeners

Thinking Elixir Podcast by ThinkingElixir.com

Thinking Elixir Podcast

32 Listeners

Beam Radio by Lars Wikman

Beam Radio

11 Listeners

Elixir Mentor by Jacob Luetzow

Elixir Mentor

2 Listeners