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
Tweet

More Decks by Stefan Wintermeyer

Other Decks in Programming

Transcript

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

    The 5 most active programming languages on GitHub: JavaScript, Python, Java, Rust, PHP
  2. My First Online Shop was written in Delphi (1997) http://www.website.com

    https://web.archive.org/web/19970413021718/http://www.swreisedienst.de/
  3. 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
  4. Biggest Pain = Paradigm Changes Language Programming paradigm Delphi Procedural

    Perl Procedural PHP Procedural Ruby Object-oriented Elixir Functional
  5. 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
  6. 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!
  7. 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
  8. Fun fact: All players have a solid Ruby on Rails

    background. @josevalim @dhh @chris_mccord
  9. 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/
  10. 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
  11. How does the 15 Minute Blog example hold on in

    2020? DHH’s 2005 grandfather screencast: https://www.youtube.com/watch?v=Gzj723LkRJY
  12. $ rails new my_blog $ cd my_blog $ rails g

    scaffold post title body:text $ rails db:migrate $ rails server # Open http://0.0.0.0:3000/posts Fun fact: $ my_blog:> tree | wc -l 19572
  13. $ 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 http://0.0.0.0:4000/posts
  14. "… Phoenix has delivered 15x better performance than Rails …"

    https://medium.com/@elviovicosa/phoenix-vs-rails-benchmark-2019-f0e68336d557
  15. 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.