📜 ⬆️ ⬇️

RailsClub 2017: Interview with Nick Sutterer. Rails dies (Ruby doesn't)

Hello! Today we are publishing an interview with Nick Saterer . Nick is the creator of Trailblazer , the author of several gems and new layers of abstraction in Rails, Rails contributor. On the eve of RailsClub 2017 , where Nick will make a report, Dmitry Matveyev talked with him about his work and views on the development of Rails.

image

Where are you now?

Now I am in Germany, I work and live in Hanover, and before that I lived in Australia for 4 years. I never planned to stay in Australia, but staying there has changed a lot in my life: I got hooked on surfing! Cool to break the surf and sit down to program again. But I returned to Europe, because a lot of important things happen here, so at the moment I find it more interesting to live here.
')
How did you decide to become a programmer, why, where and when?

When I was 8 years old, I loved to play PC games, I wanted to create them myself - that was my dream. My father bought me some books, and I started to “play” programming. My father is also a programmer, one might say, now this is our family tradition.

The first language I started learning is C ++. So I have been writing code without interruption since eight years old :)

And what about education in computer science?

I began to earn programming in high school, without any university. Then I worked at an Internet cafe as a waiter, and my boss wanted to make a database for accounting yachts and asked for my help. So I came to PHP.

Why switch to Ruby on Rails?

I programmed in PHP and Perl in due form. I liked OOP, and I tried to create small objects with a simple and clear interface. Once my colleague showed me Ruby on Rails. I was intrigued, but immediately saw some architectural flaws. My friend could not clearly explain to me exactly where I should write the code, and why. But I started messing with Rails 1.1 and Active Record, and I liked the language itself. I began to use Ruby for my personal project, but PHP was still in operation.

Do you still work in hiring?

No, I have a few years my own company. We develop Trailblazer and advise companies that Trailblazer use in their commercial projects, helping them to solve architectural problems.

What advice can you give to those who want to combine work for money and open source?

Work on open source a few hours a day and don't tell the manager :)

Just kidding It is important to work both for money and help solve the problems of the whole community, support it. Well, if your open source product will be used by other companies, you will be in demand as a consultant. Thus, work in OSS can become financially viable.

Why is your report on RailsClub 2017 called “Ruby is dead”?

I have the official permission from Matza to call Ruby a dead tongue :) Of course, this is a provocation. Not the news that I always criticize Ruby and Rails. I like Ruby, but I always compare it with other languages. In the report I will show examples from Java and PHP, tell you how they have evolved and how they have greatly improved over the past decade. But Ruby has remained the same as 20 years ago, and this should be a warning to us. I want to stay in Ruby, but it must evolve! Many people switch to another stack because they want to work with a language that solves their problems. My problem is how to create a stable and reliable commercial application. Yes, in Ruby, the process of adding new features, such as, for example, typing support, is very difficult, largely due to backward compatibility. But after all other languages ​​managed to do it!

I will also tell in the report on mruby. This is a very interesting topic. Matz is now working on it. I already said that the main problem of Ruby, in my opinion, is that it is difficult to achieve stable behavior from the application. Almost impossible!!! I always get “method not found”, this is a major production error. I find Matz’s plans to add type definition support (“duck inference”) to Ruby are very promising. Typing is really useful.

Another problem with rails is poorly structured code.

Rails allows you to create simple applications in two hours, but for a large application it simply does not fit. You are happy the first two weeks, but then you get angry. Rails is great for demonstration - in one day the newbie is writing a working application, and he is very pleased. But the problem is that if you want to write stable things on Rails, you will not go far. I want to write both simply and reliably at the same time, but using Rails this will be difficult to do.

The main problem in OOP is too much functionality in one object. I do not think that an object should have 300 methods. In functional languages, one has to write a separate function for everything, and this, in my opinion, is better. Then you do not have to worry about the internal state, namely, because of it, problems often arise in the PLO.

Why did you decide to visit Russia, what do you expect to see?

This is my first trip here. On Rails Club there will be a lot of cool people and a lot of cool speakers, and I also heard plenty of stories about Russian aftepaty ... :)

I also want to see St. Petersburg, so I plan to stay in Russia for about a week and a half and I hope to get a huge portion of inspiration!

Tell me more about Trailblazer?

Funny fact - in Russia the largest user base of Trailblazer! This is a set of abstractions that can be used in frameworks such as Rails or Hanami, and add new concepts, such as from object and policies, and end up linking your business logic and workflows together.

Now I work in a project for the police, in it 60% of the code is a set of if-else conditions that control access rights. Trailblazer 2.1 will add support for BPMN and workflow diagrams. This will allow to remove the conditional code from the application code. I will show examples at the conference!

What is your forecast for the future of Ruby / Ruby on Rails?

Tricky question! In my opinion, Rails is dying, and I'm not very optimistic about this framework. No new abstractions, no innovations in the last 10 years! There are enthusiasts who are trying to do something new, but the core development team of the framework is not particularly interested in this. Rails are stuck.

But there is hope about Ruby: there are many new implementations, for example, JRuby. So I think that Ruby will live for at least the next 20-30 years.

However, for me there is good news about Rails - the more people use them, the more people are faced with their shortcomings, and therefore they start using Trailblazer :)

Do you have a set of gems for a new project?

Of course! In Trailblazer, we use a stack, which we called Tamarama. It consists of:

- Sinatra for routing
- Trailblazer for business logic
- Sequel or Active Record for databases
- Cells for presentation layer

What can you say about Ruby being slow?

I know there are many faster languages. But I think that there is no problem. You can make your Ruby application faster, for example, using Tamarama or Trailblazer. And yes, Ruby is slow, but Rails makes it even slower! Personally, I have never had a performance problem with Ruby applications, because I don't use Rails :)
In addition, Ruby is constantly improving in this direction, and the latest versions of the language have become much faster.

Advise blogs or websites that you like?

I do not read any blogs or news sites on a regular basis, I live like in the last century :) Maybe I’ll miss something valuable, but I’ll get rid of a lot of unnecessary information. Here are my tips:

- Do not trust what other people say, trust yourself.
- Make the code simple.
- Do not try to reinvent the wheel.

What about programming books?

I have read only two books on programming - this is Martin Fowler Refactoring and TCP / IP Illustrated, Vol. 1. That was more than 10 years ago. From TCP / IP Illustrated, Vol. 1. I learned a lot of basic knowledge about programming, layering and encapsulation. Recommend. And Martin Fowler is generally my Jesus in the world of software development, I even have a picture of him on the wall.

How do you manage not to lose interest in programming?

I have a great balance between life and work :) Many interests, besides programming - food, cooking, sports. And most importantly, I work on what I really love. Working in open source and consulting is something that I really like. So now I'm more than ever from burnout.

You can ask your questions personally (and on the legendary Russian afterparty :) on September 23 at the RailsClub conference. Program and registration on Railsclub.ru

And read the original in English - on hype.codes

image Traditional thanks to the conference partners! VoltMobi , our bronze partner, makes excellent mobile applications with a Ruby and Rails backend. And Alexander Shcheglov and Stanislav Tyutin will talk about their experience in using the Trailblazer. So, we will see on a concrete example how you can come to a legacy project and not start producing the same outdated code, and start doing it well, without losing much of time and not arranging global refactoring.

We are waiting for everyone! RailsClub.ru

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


All Articles