Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Greener Gras

The Greener Gras

Should a Ruby developer migrate into Elixir territory? I gave this talk at https://rubyconference.by 2020.

Stefan Wintermeyer

July 19, 2020

More Decks by Stefan Wintermeyer

Other Decks in Programming


  1. THE GREENER GRASS Stefan Wintermeyer - @wintermeyer

  2. Ruby or Elixir? Spoiler alert: It’s not a technical decision.

    The 5 most active programming languages on GitHub: JavaScript, Python, Java, Rust, PHP
  3. http://www.website.com My First Commercial Webpage (1997) https://web.archive.org/web/19970413021718/http://www.swreisedienst.de/

  4. http://www.website.com My First Online Shop (1997) http://www.website.com https://web.archive.org/web/19970413021718/http://www.swreisedienst.de/ https://web.archive.org/web/19970413021718/http://www.swreisedienst.de/

  5. My First Online Shop was written in Delphi (1997) http://www.website.com

  6. Programming Languages I’ve Used For Online Shops Since Language Server

    OS Development OS Framework Delphi Win 3.11 Win 3.11 - Perl Linux Linux - PHP Linux Linux and macOS - Ruby Linux macOS Ruby on Rails Elixir Linux macOS Phoenix Framework
  7. Biggest Pain = Paradigm Changes Language Programming paradigm Delphi Procedural

    Perl Procedural PHP Procedural Ruby Object-oriented Elixir Functional
  8. Ruby Elixir vs

  9. Ruby was published in 1995 by Yukihiro Matsumoto for developer’s

  10. Elixir was created in 2011 by José Valim to be

    a real concurrent language.
  11. Titlelize Code Example "ExMachina Hits 1.0 - More Flexible, More

    Useful and Support for Ecto 2.0" => "exmachina-hits-1-0-more-flexible-more-useful-and-support-for-ecto-2-0! Ruby Elixir https://thoughtbot.com/blog/elixir-for-rubyists
  12. Don’t let the easy to read Elixir syntax fool you

    into believing it’s painless to learn. Functional is a totally different ball game!
  13. Regular Switching Between Elixir And Ruby Back And Forth Results

    In Technical Jet Lag.
  14. We all know about Ruby. But what do people do

    with Elixir?
  15. Nerves Is An Astonishing Elixir Project Craft and deploy bulletproof

    embedded software in Elixir. • Raspberry Pi • BeagleBone • Generic x86_64 https://www.nerves-project.org
  16. Nerves Example: FarmBot https://farm.bot

  17. vs But 99% Of The Discussion is Rails vs. Phoenix

  18. Fun fact: All players have a solid Ruby on Rails

    background. @josevalim @dhh @chris_mccord
  19. Ruby on Rails Doctrine "Optimize for programmer happiness" Me thinking:

    But I have been very unhappy with some gems and very happy with Phoenix. https://rubyonrails.org/doctrine/
  20. Phoenix Framework "Build rich, interactive web applications quickly, with less

    code and fewer moving parts" Me thinking: But I have done rich interactive web applications with Rails too. https://www.phoenixframework.org
  21. How does the 15 Minute Blog example hold on in

    2020? DHH’s 2005 grandfather screencast: https://www.youtube.com/watch?v=Gzj723LkRJY
  22. Ruby on Rails @dhh

  23. $ rails new my_blog $ cd my_blog $ rails g

    scaffold post title body:text $ rails db:migrate $ rails server # Open Fun fact: $ my_blog:> tree | wc -l 19572
  24. None
  25. None
  26. Phoenix Framework @chris_mccord

  27. $ mix phx.new my_blog $ cd my_blog # configure database

    in config/dev.exs (no SQLite ) $ mix ecto.create $ mix phx.gen.html Blog Post posts title body:text # add "resources "/posts", PostController" to router.ex $ mix ecto.migrate $ mix phx.server # Open
  28. None
  29. None
  30. None
  31. How Big Is The Community/Visibility?

  32. Twitter Followers 428 K 16 K @dhh @chris_mccord

  33. Stackoverflow Questions GitHub Contributors Ruby on Rails 319,073 4,252 Phoenix

    Framework 3,436 877
  34. Phoenix USPs Performance/Speed Scalability High-Availability Systems Hot Deployment

  35. "… Phoenix has delivered 15x better performance than Rails …"

  36. What should I use?

  37. Use Elixir/Phoenix if performance is paramount. Technically it is the

    best choice!
  38. Use Elixir/Phoenix if your team doesn’t have (much) Ruby knowledge

    yet. Technically it is the best choice!
  39. Use Ruby/Rails for all other cases.

  40. A bad programmer can write a slow program in Assembler.

    A good programmer can write a fast program in Visual Basic. Jon von Tetzchner told me that some 20 years ago.
  41. Do or do not. There is no try. Stefan Wintermeyer

    [email protected] @wintermeyer