A. Davydov: It's vital not to stop and find new solutions

An Open Source enthusiast and one of the core developers of the Ruby-framework Hanami shares ideas about Hanami, Ruby and the developer's life
10 August

Anton Davydov
Anton Davydov

An Open Source enthusiast and one of the core developers of the Ruby-framework Hanami.

On the eve of RailsClub 2017, on which Anton will be one of the speaks, we questioned him about the job and his views on Ruby development.

What are you working on right now?

I am working for a Healthcare start-up, which can improve the lives of so many people in the US. Unfortunately, I can't tell you more about it as I have signed the NDA. Talking about Open Source projects, now we are working on the version of Hanami 1.1. Besides, Sergey and I create a library for Event Sourcing in Hanami. It already works without a global state as well as does subscribe & broadcast for events, supports multiple adapters and allows you to easily add your own ones. The library is to have much more cool features in the future, such as retries, the construction of the event tree and eventbox documentation.

Isn't there something similar in Ruby with the Wisper gem...

Yes, it is very similar, but Wisper implements pub/sub only in the memory of one instance, while we want to allow the developer to choose how to process such messages: in one instance or to scale a few.

What about new adapters? How will they be added?

You just have to resolve them into a container. For now, we have in-memory and Redis adapters which you can play with. Kafka, RabbitMQ and, probably, PostgreSQL will show up in the future. 

What is your view on the development of Hanami in the next four years?

As now there's definitely a monopoly of Rails, I would like to see a worthy alternative in Hanami. This will allow all frameworks to develop. Thus, Hanami already solves business problems and many developers are inspired by this tool. I hope that in the future we will manage to view on Ruby as a dying language and popularize new ideas.

Do you think Hanami can become a mainstream in the future?

I've noticed some significant changes in the attitude towards the framework and its ecosystem over the last year. To measure it you have to take a look at the gems downloading scale, the frequency of the posts publishing, the conferences'references. A year ago, when people heard about Hanami, they would circle a first finger by a temple, whereas now they come up and tell us that they enjoy the framework, and they are already using it.

Why do you think it was Rails that became the standard in Ruby development?

To my mind, there are several reasons for this. Firstly, everyone was tired of verbose Java- and PHP-frameworks, so there was a need to create a simple and operative solution. Secondly, the framework allows you to quickly launch products, the creation of which in other languages would take weeks and even months. For many of the developers it was like a breath of fresh air and Rails has quickly gained popularity.
Now, there is no other MVC-framework of full value except for Rails. There are Sinatra and other http-frameworks out there, but they do not provide the developers with the opportunity to start working on business tasks with just one command.

In your opinion, what are the problems the Ruby community is facing right now?

Well, a lot of my friends are saying or have said that they are too bored with Ruby. They do the same thing day after day, which, consequently, kills the motivation, that's why a lot of them begin to study other languages ​​and technologies. People lack something radically new, some ideas that will allow them to look at their work from the different perspective.
It is vital not to stop and find conceptually new solutions, which nowadays the guys from dry/rom are busy with. Unfortunately, any new approach - not only in Ruby - is almost always perceived with hostility. On the one hand, some criticality should definitely take place, however, it usually kills the motivation to move on and grow as a community.

What is the path of the Ruby developer for you in general?

There's no single answer for this question, I guess. In my opinion, a good developer is interested in the capabilities of different languages and systems. If so, the specialist himself is to decide what is good for him and what is not. Thus, they would be able to choose really useful approaches to be used in work in the future.

Which gem, in your opinion, can serve as an example of an ideal code?

I certainly would not point at Ruby core (laughs). it's  quite hard to talk about such ephemeral concepts as the quality and the beauty of the code as I myself can't say that I write a good, so I do not always like it. To me, the best gems are those that simply solve existing problems and do not create new ones.

How do you learn something new about Ruby? Do you read blogs or use other sources?

I like link aggregators, e.g. Reddit. I also use RSS, which allows you to get acquainted with different points of view on the same problem.
For example, an article appeared recently about why Hanami is bad. There was, in fact, the only one point: the call method is magically called in the framework. The majority of the community was trying hard to explain that this was normal: excessive explicitness hurts sometimes. It's very interesting to read such things as you start to look at things from a different angle.
I also have my own Telegram channel, and the followers often send me some interesting links.

You were doing a platform for a collaboration on the Open Source-projects of OSS Board, weren't you. Are you still working on this project?

That's correct, I continue working on it right now. It seems to me that I failed to promote the OSS Board properly. That's very difficult to find people who will create tasks there and do them, especially when the task is slightly more difficult than making changes to the form. The main problem of the project is the search for specialists who will be able to add a well-described task as you need to monitor it, update it and communicate with the developers, which is actually is a very great work. However, there are still people who help, which I am very grateful for.

What do you consider your greatest achievement in the career?

I received more than 80 comments with questions about each line on one of the pull request in Rails. I never finished it, but as a result I started take such things easier.
On top of that, I finished the project in Google Summer of Code, while a lot of people give up in the first month, even more - on the second, and only a few gets to the end.

What kind of project was it?

This was a plugin for Sidekiq, which shows the statistics for all the tasks. Unfortunately, I've abandoned it due to the lack of time, although it is a fairly popular library.

What are your main achievements in life?

To me, it is that I did not shy away from speaking in English for the first time in my life at the conference EuRuKo-2016 in Sofia in front of the audience of 700 people. It is way easier to make a report in Russian as this is your mother tongue. You can imagine that it is very anxiously when you do not know English well and do not have the experience of such performances.

In your opinion, who from the Open Source developers can be considered an example to follow?

It's definitely worth it to look at what other developers are doing. They generate and implement interesting ideas that you can help to develop or just take a good note. However, first of all you need to focus on yourself and not compare yourself with others.

What are you going to talk about at the conference and why is it worth listening to?

I am to talk about the experience. I've been working not only on the framework, but also on its ecosystem for the last year and a half. To some extent I can be called a developer advocate of the Hanami framework. Thus, I will talk about why this work is needed, what mistakes I've made along the way and how to take this experience and apply it to another framework or technology.

P. Solnica: "I'm excited about Truffle Ruby"

Software engineer with over 10 years of experience, Tech Lead at Icelab, speaker at RailsClub
23 November

Piotr Solnica at RailsClub 2017
Piotr Solnica at RailsClub 2017

A software engineer with over 10 years of experience, working as Tech Lead at Icelab. Active OSS contributor and maintainer of various projects for over 5 years. Former DataMapper core team member, creator of the popular Virtus gem, lead developer of Ruby Object Mapper project, and dryrb core developer.

On the RailsClub 2017, we've managed to talk with Piotr about his work, dry stack and future of IT.

Please, tell me about yourself. Where do you work? What do you do?

I’m a software developer from Poland. I worked mainly with web apps for last 14 years. I’ve graduated as bachelor in computer science. I’ve studied a bunch of languages and found a job as PHP developer, then I’ve switched to Ruby in 2007. That was my life for almost 11 years. Mostly doing Ruby and worked a little bit with functional languages for few months and now I’m back with Ruby as my main language.

Is it your first time in Russia? How do you like it? How do you like RailsClub?

It’s my first time in Russia. I really like Moscow, it’s really nice city. I like that it’s big. There’s a lot of space. I live in Krakow, so, it has crowded, narrow streets, lots of buildings close to each other. We’ve got nice weather in Moscow! And it’s always raining in Krakow. I really like. People are nice, the conference is awesome. I’m really enjoying it. I also like that people have a lot of questions. I’ve been talking for less than three hours with like 20+ people. That’s really encouraging for me.

Can you give us keynotes from your report?

I’ve talked about the project with which I was working since 2011. I’m basically trying to build a new set of tools to work with databases in Ruby. To shift people to alternative approach, not a typical object-oriented approach, when it comes to working with databases. The talk was about upcoming version 3.0, which is expected to be realized in October. The main thing is to show that this library, despite it is much more advanced than existing solutions, it’s finally as easy to use as this existing solutions.

As far as I understand, your library is designed to replace Active Record. What is main advantage and disadvantage of your product?

The main advantage that it is much more flexible than active record because you don’t have to module your app domain in the same way as your module database tables. You can have different sets of attributes for certain modules and certain modules don’t have to be one-to-one mapping between the tables and their representation in Ruby. This means that when your application growing and you starting to see more and more domain specific concepts you will be able to module them just by using API that we have. It’s also easier to make changes in databases because you have chainset API that we introduced recently. We can use it transfer data from representation that your application receives into a structure that is compatible with your database. We don’t have it in Active Record - concept of data transformation. And, second advantage - it’s kinda lightweight, because the data structures that we load, the objects, that we load, they are smaller than Active Record objects. They take less memory and they are faster. As a result , Rom is faster, it can work with different databases. people are using Rom with data that they pull from YAMA files or csv files or HTTP API and then they combine these data and with what they have in their database, maybe store in their database after some transformation. It’s just much more flexible and support.
Disadvantages are mostly related to the fact that it’s still young project. First few years of my work was mostly experimentation and project started at 2013 and 1.0 version was released in November. That’s not a lot for open source project. 3 years for open source is like 3 months in case for a normal project. As a result, we’re lacking the documentation, which is in big priority right now, our community is much smaller, we use less 3rd party tools and extensions than in case of Active Record. We don’t have 3rd party solutions for stuff like file uploads or authorization.  We are on our own in a lot of common cases. That’s the biggest disadvantage. If you don’t feel like build a plugin for a file upload, it’s not gonna be good fit for you.

How do you see the world of programming in 10 and 50 years and will Ruby and Rails have place in it?

I have no idea, really. That’s hard question. I don’t know. I can't see the future. I think Ruby is doing well. I’m excited about alternative Ruby implementations like Truffle Ruby, which is getting more and more attention. I’m also looking forward to Ruby 3. I think it’s gonna be easier to predict the future once Ruby 3 is realized. But I think that we have a strong community. Language is not everything, ecosystem built around language is also important. And I think we have very strong community which is evolving very fast these days. We see more and more new projects. It’s doing well. There are other languages, such as Elixir, which is getting a lot of attention these days. But it’s a young language with very young ecosystem so it’s gonna take a while for younger languages to get where we are already in terms of our experience and our knowledge and how we work together. I think Ruby is doing fine and it’s gonna be quite good for next few years.

In your opinion, what is the hypest technology in programming these days?

I don’t know. To be honest, I’m not really following hype. It’s to distracting. I would like to check out everything. But I think Elixir is a big hype. In a good way.

What advice can you give to “average programmer” to stand out the crowd?

Write and read a lot of code. That’s my advice for many years. I think people spend too much time discussing code and reading books instead of sitting together and coding. You can learn a lot from just this and discussing it afterwards. The more write and read - the better you become. For me, the fact that i’ve started contributing to open source helped me to learn so much. I’m sure that I’ve spend 10 times more if I was just relying on my job. So, contributing to open source is also a great way to learn not just how to write code, but also - how to work with people. You learn how to communicate, you meet a lot of different people, you work how to work in team, it helps you a lot. These two things are very important.

What makes you excited about your daily work?

I really enjoy using things that I’ve written. It’s because it motivates me to continue working on them and improving them and it’s such a joy for me to build them and use in a project as a tool. I also really like just working with people. I hate to be lone wolf, just writing stuff that nobody will see. Writing stuff that other people can use gives me a lot of joy and fun.

Do you have any plans to write a book?

I have a plan to write a book about my project - rom rb. This will be not too detailed book. It will explain rom rb in very basic way. Short introduction without going too much in the details because it’s big project. I don’t have time to write a big book and I want people to be able to quickly learn the basics and understand how it works. The cool part is it is possible to understand how rom works. It’s good to understand how tools that you use works.

Do you have nightmares related to your job?

I don’t remember any nightmares related to my work. I’m a happy man!