📜 ⬆️ ⬇️

RailsClub 2017. Interview with Nikita Shilnikov, Dry-rb and Rom-rb core developer

The countdown to the RailsClub 2017 conference goes on for days, and we continue to publish conversations with our speakers. Pavel Argentov asked Nikita Shilnikov , developer of Dry-rb and Rom-rb, about his work, books and the state of affairs in the Ruby community.

image

How did you start programming in Ruby?

Everything was simple. I have not programmed for money before. At first I was a manager, and I was offered a job as a programmer. I went. There were Ruby and Oracle (they are there now). Since then, I have been working in one place for 7 years already, switching between tasks.

Do you have “vocational training” or did you study yourself?
')
I have a technical education. At the institute I studied C ++, Prolog and assembler. Before I got a job, I knew Javascript and C ++, insofar as.

Did you immediately start web development, or was there something else?

Where I came to work, there was a web, there were rails. The core of the system was in Oracle, and the interface on Rails, plus a bit of Javascript. Rails work well with “snoops”, that is, when there is no business logic in them :) (stored procedures — PA).

Are you still working in webdesign now?

In fact, yes.

And how did you get into open source?

At one conference — I don’t remember exactly — like DevConf, there was a section about Ruby. Kirill Mokevnin told about DDD there, and I realized that all that we do at work is Domain Driven Design. Cyril said that in ActiveRecord there are problems with the mapping of entities of the domain on a relational database, that there are guys who make ROM, but first they made DataMapper. This interested me, and from that time (2012) I began to monitor ROM. In 2015, version 1.0 was released. I just turned up a new project - I used Rails, because I already worked with them. I threw out ActiveRecord from there, inserted a ROM and started to deal with it. During this struggle, I came to commits to open-source ROM and dry-rb projects.

ROM and dry-rb are known for borrowing from FP. How do you think it’s important to add functional programming techniques to Ruby?

I am not a fan of any particular programming language. I am in favor of choosing the right tool for each task. There are general purpose languages ​​that can solve different problems, and they have strengths and weaknesses. Ruby itself, which appeared more than 20 years ago, was initially object-oriented. However, LISP had a very strong influence on him. Even Matz said he wanted to make a mixture of Perl and LISP. And LISP is the first functional language. So, if you dig deeper, Ruby has functional ancestors. It seems to me that we are so fixated on OOP that we didn’t allow other tools to develop in Ruby. I think you need to look at other programming languages ​​and borrow something that applies to Ruby. Is it possible to combine FP and OOP? We are trying.

Why dry gems are called DRY?

Generally, it is just a trademark. The essence of gems is to solve individual problems. For example, dry-types describes types, types can be reused in different ways in different places. This is one of the meanings of the name.

In what direction will Ruby develop in general and the rails in particular?

Standard question. Matz, for example, is afraid of what happened to python: from Python 2 to Python 3 there was too much of a leap, I would not want such a repetition in Ruby. But the transition from Ruby 1.8 to 1.9 was tangible, but not painful. I don’t think there will be major changes in Ruby that will break backward compatibility. I can't say anything specific about Rails.

What do you think is missing from Ruby?

Here I can say quite definitely what is missing for me: pattern matching. In addition to applications, I write library code - it would be great to use pattern matching there. From the point of view of applications, you can add primitives of multi-threaded programming, get rid of GIL. There are still not enough non-mutable structures: the idea of ​​non-mutability makes it possible to reflect on the code much easier, and this would be useful for beginners. In dry-struct, for example, we emulated unencryptibility. It would probably be great if such tools were in the language itself.

In your opinion, the most notable phenomena in the Ruby ecosystem except dry and rom?

Hanami is a very interesting project. This is a necessary tool with good documentation, which is clear where and how to use. It is very great that we have an alternative to rails, and it does not consist in creating a home-grown framework.

Why do we need the next rails?

I have seen everyone working on one big project. I started with throwing out SQL from templates. In general, there are many unanswered questions on the tracks - how to develop a large and long project. We learned how to work with it, but did not come to the same standards, so it would be cool to have a framework where everything that is needed is standardized. A major problem in Rails is ActiveRecord, a controversial pattern with certain flaws. For example, it is difficult to get off. And also, the more you hide the business logic from it, the better it works.

What could you recommend sites \ courses \ books for beginners and experienced rubists?

I would advise beginners to work with complex books like this: read the first time, so that something is deposited in my head, and as I work, return to it as a reference book. A great example is Martin Fowler's “Patterns for designing application architecture”. The book was written in 2002 and is still relevant, many classes in the rails implement some patterns from it. Personally, another book for experienced programmers, Martin Kleppmann, “Designing Data-Intensive Applications” has now come out on top. This is not a very deep, but well written book, with a bunch of links on topics of interest. The author is mainly engaged in the study of distributed systems, he wrote this book for 4 years, and she is devoted to working with data in various systems. There is a clear, good description of many aspects of working with data, and it is not tied to a specific language. If you want to raise your level as a developer, this is the thing.

What is the biggest problem in the Ruby community?

We need to show that we still have not revealed the full potential of the language, and although it is already over 20 years old, we can apply new approaches both in old problems and in new, developing areas!

Interesting? And in Nikita's report about types in Ruby will be even more interesting! There is nowhere to postpone the purchase of the ticket, the last places are left! Registration is here , the ticket price is 9000 rubles.
Conference organizer: Evrone

Thanks to the best companies that support us! For example, Revo is an international company fintech, which for more than 5 years has been creating an advanced payment service in parts in partnership with the largest retail chains and online stores. No plastic. No papers. Simply. Quickly. Up to date

We are waiting for you at the conference, see you soon!

Source: https://habr.com/ru/post/338208/


All Articles