Thoughts on DHH interview on Ruby Rogues podcast? Rails, Front end and (briefly) Phoenix discussed

True, plus it’s the syntax and culture. Python excels at static analysis because of the culture of exlicit imports along with language support for it. Rubyists don’t view it as necessary.

For me Elixir is the realization of Ruby maglev described on this post from igvita.

Phoenix combines the performance of Go and the productivity of Rails, so why not prefer it over both? If someone don’t consider it more productive than Rails, s/he can’t even consider it less productive than Rails, and who won’t love that extra performance and ease of scalability for free?

1 Like

… and the mindset of Erlang …

You should not under estimate the learning curve, as it is significantly higher.

Because You need to shift paradigm from OO to FP. And learn what OTP is all about before getting the most of the language.

Also, coming from Rails too, I became lazy with the multitude of available gems, giving me kind of magic super power. Something what would be granted in Rails, might need other tools, or rewrite some parts.

The shift from ActiveRecord to Ecto can be also difficult :slight_smile: For example, no callback in Ecto, no acts as list or acts as whatever.

That said, after learning a lot, not only I changed my way of thinking, but also started to question the way I was programming before. Now it would be painful for me not to use FP, OTP and the rest.

2 Likes

I think you’re to some extent confusing unfamiliarity with how hard something is to learn.

Opinion: Conceptually, FP is by far the simpler paradigm because it really only boils down to functions that take and return values. It’s only by familiarity with something else that this becomes “hard”.

OO has never made sense to me the way it was presented in Java, C++, etc., and that was after using C++ for about 7 years and not even touching anything else in the meantime. It’s a personal take, of course, but C++ was my first language, so I had nothing to unlearn. All in all, practical OO seems to be 75% about repairing the fact that you’re using OO.

What I’m sort of arguing is the reality that most people start out with something that’s mostly (in my opinion) bad and complicated. They then confuse their familiarity with it as its own ease of use and simplicity. It’s the old “someone who’s never programmed has an easier time learning Lisp than people who already know C#” thing and I think it makes perfect sense.

Edit:

Just as an addendum to this:

I think this applies to Erlangy things as well. One process per request is way more simple, but people would never think to do it in any other language because it wouldn’t make sense there. The Erlang way is the conceptually simpler way, but you’re still going to have to unlearn your “sockets + select” (or whatever variation) thinking.

5 Likes

True, I was speaking of personal experience, from someone coming from Rails :slight_smile:

1 Like

So true!
I initially thought FP was the hardest, but now when i learnt Elixir, I think it is more digestible than imperative languages. I miss a lot of things when I go back to Ruby or Go.

Similar was the case with me while learning OOP in PHP, though it might be different than OOP in java or C++, but still the basic concepts are the same.
We spent years in Imperative Paradigm, now we forgot that time, and we want to be as fluent in Functional Paradigm in only some months as we became in that Imperative Paradigm in years (or for some programmers in decades).

1 Like

Coming from the perspective of someone fairly green to both Elixir and Ruby I have definitely found Elixir and Phoenix simpler to grasp, and absolutely where my future efforts will be invested. There’s too much magic in Ruby and Rails; it’s not explicit. Developing in Rails takes a lot of trial and error to learn the ins and outs of how the framework is working behind the scenes. In Elixir and Phoenix it’s just Modules, Functions, Messages, and Pipelines. It’s a lot clearer where I need to put a piece of logic in Phoenix because it’s explicit where each transformation takes place.

The gap I find between Elixir and Ruby is in the ecosystem disparity. I feel like I can Google any question about Ruby and Rails and find a plethora of content with many different implementation options to choose from. There’s probably a gem for what I need that solves the problem better than what I could hack together in a short time-frame. In Ruby there are mature API libraries for most every popular web-service built in the last 10 years, and when I’m trying to move fast and deliver on a project, this is a big consideration.

The recent structure change of Phoenix with Contexts (which I love BTW), and the still somewhat volatile state of many libraries has the unfortunate side-affect of deprecating a fair amount of entry-level content available online. I understand this is just the nature of software development ecosystems at this stage, and while it has some drawbacks in Google Driven Development practices, I can tell the tipping point is just a few months of daily study away. In fact - learning Elixir and Phoenix has significantly helped in my understanding of Rails.

That being said, I’m impatient. I want to work with clean Elixir rather than spend time debugging the magically obfuscated state and behavior in Ruby.

5 Likes