Interview with Markus Schirp, RubyRussia Conference Speaker

    Hello! A little more than a week later in Moscow there will be a RubyRussia conference . In an interview today, Evrone developer Mikhail Morgunov spoke with one of our speakers, Marcus Schirp , the creator of the popular Ruby Mutation Testing tool .


    The first question is about Mutant . What do we need to know about this tool? What will be the report on RubyRussia?

    I will tell the story of creating a tool for mutation testing - Mutant. I want to introduce the audience with key concepts: people will learn about different levels of coverage, their meaning and value.

    This will shed light on the things in Ruby that we are used to and we believe are correct, but in fact they have problems. Because Ruby very often gives us a great opportunity to shoot yourself in the foot.

    How did you start developing Mutant?

    This story is related to my work on DataMapper and its next implementation, DataMapper 2, which eventually became known as ROM. Project Dan Kubb wrote a relational algebra library called axiomto support these new developments. When he wrote axiom, he used the strategy of "development with limitations." It includes many tools for working with metrics and mutation testing.

    The tool we used for mutation testing was called Hackle. He had certain operational and conceptual flaws. Once I thought, “Damn it, I won’t even try to fix it! Let's just write a new one and solve all the scaling problems of mutation testing that we have in DataMapper2. ”

    That was 5 or 6 years ago, since Mutant has gone through several iterations. All of them are connected not with my desire to write open source, but with the requirements of commercial projects I worked on. So the development of Mutant is highly dependent on my consulting activities.

    Every time I start a new Ruby project, I need to be confident in every piece of code. And Mutant is the tool that I use for this.

    That is, commercial customers want to use Mutant?

    Yes. This is confirmed by the fact that all the features that you see are features that commercial customers have asked me to add in recent years. There are some functions that are not in the public version, because the client did not give me the right to open their source code. But sometimes the client says, “No problem if someone benefits from this,” which I really like.

    At the moment I left DataMapper2. Never wrote features just for fun. These are just side effects of commercial use.

    I personally am not in love with Ruby, it's just a tool for me. Mutant is a way to make Ruby more efficient. The entrance threshold for Mutant is very high, but when you start it helps a lot. The need for learning is something to be reconciled with.

    It is in the order of things when you use the free gem :)

    95% of free gems are just hobby projects. They are not suitable for commercial use. Authors make them from personal interests. I do not blame them. But I advise teams of developers of commercial projects to remember this when they take something from RubyGems.

    I only read the Mutant's README file on GitHub. But so far little understood.

    It is for this reason that I need to spend some more time writing the readme and additional entry level documentation.

    For personal reasons, I was silent in the community for 3 years: I had two more children, I moved to another country.
    RubyRussia is the first conference after the break, when I can talk with the community. And I want to use the time that I spend on preparing my report and workshop as a source of materials for additional documentation.

    What awaits us?

    October 6 will be a report on Mutant, and October 7 - workshop. It will be based on real-world examples taken from an open source project that uses rails and rspec.

    As far as I understand, you use another programming language, not Ruby?

    This is not entirely true. I often use Ruby, but only if there is a good reason for this. Usually, this is the salvation of legacy applications that are about to collapse under the weight of their own code.

    In this embodiment, you can not just come and replace Ruby in one step. Incremental refactoring / choking Ruby code is my main job. And during this process, my hands are elbowed into Ruby, and here Mutant is my main tool for bundling refactoring / changing cycles.

    What languages ​​do you prefer?

    Basically Haskell. Now for me it is the most balanced language in terms of usability and suitability for developing programs of commercial value. Haskell Type Checker guarantees many properties right away; properties for which I would have to fight in Ruby.

    There are a few other cool languages ​​and extensions on the horizon. I think that dependent types will transfer “correctness after passing a type check” to a new level.

    Do you think Ruby and Rails have a future?

    Ruby and Rails have a low entry threshold, which helps people quickly reach a point when an application makes money. As long as people believe that Ruby and Rails have this quality - these technologies have a future.

    Small heretical statement: Rails applications cannot grow due to the complexity inherited from the framework, due to the choices made by the creators of the language and the framework. But this technical duty is OK, if you have a business reason to do so. Just have a ready repayment plan for this debt.

    What do you think about Rust?

    I really like him. Now I do not use it often - there was no good reason, since the working projects could not get anything from the advantages of Rust compared to other options that I had.

    I mainly do backend development. Or call it "massive RPC with subject logic." Here, first of all, it is important to ensure the correctness of the program, and only the second - its performance. Rust is computationally very efficient, but for this it requires manual control of low-level details. This takes time, which is better spent on optimizing high-level I / O patterns (RPC grouping, minimizing round trips, verifying transaction properties, etc.). It is better to do this before optimizing individual primitives at the expense of the language, which gives me more opportunities for optimization.

    If I were doing something more computationally heavy, for example, a video codec for example, Rust would be the tool I chose.

    And the last question. What can you advise novice programmers?

    As a novice programmer, find a pet project and integrate it with interests beyond programming. This is necessary to be passionate about long enough until the study of programming starts to bring in money.

    Very interesting! That should work!

    Yes, that's how I started :)

    Excellent advice! Thanks for the interview! See you at Ruby Russia.

    We are also waiting for you at the conference! By the way, there are less than 30 tickets left, so we do not recommend postponing registration if you decide to go. And if you want to immerse yourself in Mutant more thoroughly, then we wait at the workshop of Marcus on October 7. All the details on the site .

    You can read the original in English at hype.codes .

    And here is a place to thank the excellent companies that support the main Ruby event in Russia:

    General Partner - Toptal
    Gold Partners - Gett and Cookpad
    Silver Partners - Instamart , UCHi.ru , JetBrains and Qlean
    Bronze Partners - Bookmate and InSales

    Also popular now: