Creator of Trailblazer that introduces several new abstraction layers into Rails, Rails contributor and gem author.
On the eve of RailsClub 2017, on which Nick will be one of the speaks, we questioned him about the job and his views on Ruby development.
Where are you located right now?
At the moment, I’m in Germany. I’m working and living in Hanover. Used to live in Australia for last 4 years. It’s different to be back in Germany. I never planned to stay in Australia. It’s really changed a lot in my life - I became addicted to surfing! It’s great to do a surfing break for few hours and then go back to coding. Now I’m in Europe, because a lot of stuff is happening here. For me, life is better here at the moment.
How did you decide to become a programmer? Why, where and when?
It’s very simple. I was 8 y.o. and I was into playing computer games and I wanted to create my own game, it was really my dream. Dad bought me some books and I started to “play” programming at Mac. He is also a programmer, so, it’s like a family tradition. My first language was С++. When I started to write my first code I never stopped programming since I was 8.
When did you decide to go to university for a computer science?
I was working at the internet cafe as a waiter. And my boss wanted to create a “database“ for selling boats and yachts. So he asked me to help. That’s how I got to php. And in high school, I was working as a developer. I started my career without university.
Why did you move to Ruby on Rails?
I was doing PHP and Perl in a strict way. I loved OOP, try to have everything as an object with a little tiny API. And my friend from my company showed me Ruby on Rails. I was intrigued but found it was lacking structure. My friend was struggling to tell me where to put code, and why. I started to play with Rails 1.1 and Active Record, and I liked the language, so I started doing Ruby in my private project, but still was working with PHP for money.
So are you still working as an employer?
No, I run my own company for a couple of years now. Working full time on Trailblazer. At the same time, I do consulting at companies that use Trailblazer and help to solve architectural problems.
What advice can you give on how to combine work for money and work for open source?
Do open source for couple of hours a day and don’t tell your manager! Ha-ha! It is important to work both for money and on problems that developers have, to support the community and to learn what are actual problems when writing code. Also, if your open source product is used at some companies, your services as a consultant might be in demand, so your OSS work pays back.
Why is your speech at the RailsClub 2017 conference called “Ruby’s dead”?
I have an official authorization from Matz to call Ruby a dead language. Just kidding. It’s more like a provocation. I always criticize Ruby and Rails, it’s nothing new. I like Ruby but I’m aware of other languages. I will show some others like Java and Php and I will show how they evolved and improved for last decade. But Ruby is basically what it was 20 years ago. It is a wake-up call. I want to stay at Ruby, but it has to evolve. Many people move to other languages because they wanna get a language that addresses their problems. My problem is how to build a stable, solid application. In Ruby, backward-compatibility makes it hard to introduce new features, like typing. Other languages manage to get that stuff done.
I will also talk about mruby in my presentation. It is very interesting, Matz is working on it right now. I think the main Ruby problem is how to write a stable app. It is impossible right now. I always get “method not found” exception. It’s a main error in production. I am excited about Matz’ plans for “duck inference” typing in Ruby. Typing is really helpful.
The other problem is lack of structure in Rails. You can write simple apps in two hours, but for a big app, it is not very suitable. It makes you happy in first 2 weeks, but then you start to be angry. Rails is great for a demonstration - in a one day a newbie can go home with thoughts like “cool, I’ve wrote an app”. But the problem is that if you want to write stable stuff you will not get far with Rails. Developers want to write easy and rock solid apps at the same time. And we don’t have such tools in Rails.
The main issue in OOP - too much functionality in an object. I don’t think an object has to have 300 methods. But in functional languages, you have to have a function for everything. This is better in my opinion. You don’t have problem with internal state. We have many problems with designing APIs due to this issue.
Why did you decide to visit us in Russia? What do you expect to see?
It’s my first time in Russia. I will get my visa on 31st of August, hopefully. A lot of cool people and a lot of cool speakers will be there at RailsClub. I also heard some stories about Russian afterparties! Also I would love to visit Saint Petersburg. I will stay at Russia for 1.5 week. Hope to get giant dose of inspiration!
Can you please tell me more about Trailblazer?
Funny fact - Russia has the biggest users base of Trailblazer. It’s a set of abstractions that can be used in frameworks like Rails or Hanami, and brings form objects, policies, and wiring all that together, to compose your business logic and the workflows.
At the moment, I work for a police project and 60% of a code is a control flow code. Trailblazer 2.1 introduces BPMN and workflows diagram and helps to take away control flow code from your applications. I will show you examples at the conference.
What is your forecast for Ruby/Ruby on Rails?
Mean question! In my opinion - Rails is dying. No new abstractions, no innovations for 10 years. There are enthusiasts who try to bring innovations, but most the core team are simply not interested. Rails is stuck. But I have hopes for Ruby - a lot of different implementations are coming out, JRuby for example, so i think Ruby won’t be dead for next 20-30 years. Innovation process still running. A lot of good things happening.
Unfortunately, you can’t say this about Rails. But there is a good thing about Rails - the more people use it, the more people find its disadvantages, and start using Trailblazer ha-ha. To sum it up: I’m more optimistic about Ruby than Rails.
Do you have a common set up gems to advice for a new project?
At Trailblazer, we use the Tamarama stack. It consists of
- Sinatra for routing,
- Trailblazer for business logic,
- Sequel or Active Record for database
- Cells for views
What do you think about the slowness of Ruby?
I know there are a lot of faster languages. But i think it’s not a problem. You can make it really fast, for example, with this Tamarama stack. Ruby is slow, but Rails is slower. I never have a performance problem, because I don’t use Rails! Additionally, recent Ruby versions are much faster.
What blogs or websites do you like?
I don’t read any blogs or news website on a regular basis, I live under a rock! Maybe I lose some valuable info, but also there are a lot of unnecessary information. Also, I got an advice - don’t trust everything that other people provide, trust yourself. And try to code simple. Don’t try to re-invent the wheel!
Can you recommend any programming books?
The only books I read about programming were Refactoring by Martin Fowler and TCP/IP Illustrated, Vol. 1. That was like 10 years ago. From TCP/IP I've learnt the basics of programming, layering and encapsulation, and I recommend it to everyone. Martin Fowler is like my Jesus, I have a picture of him on the wall.
How do you manage not to get burnout?
I have a good work/life balance. I focus on a lot of normal life - food, cooking, sports. Also, I work on something I love, every day. All this OSS work combined with consulting is great for me. I’m far away from burnout.
RailsClub conference on which we managed to communicate with Claudio will take place this year in Moscow 23th of September.
Get your ticket here.