Ruby logo

The RubyMine Blog

The Ruby on Rails IDE


Our Congratulations to Ruby Contest Winners!

Hello everyone,

No matter how tricky a problem is, there is always a solution, and sometimes multiple ones. Indeed, the UTF-8 regular expressions problem we proposed for the recent RubyMine Contest inspired many solutions!

The Ruby community answered our call right away and lent us a helping hand, which was great to see. We got over 100 pull requests! After carefully considering all of them, we finally selected the contest winner.


And that winner is… Tobias L. Maier!

Tobias, we heartily congratulate you on winning the main prize and thank you for the most elegant way to convert the regular expression to pass the test. A $500 Amazon certificate and your free RubyMine license are waiting for you!

In addition, these other interesting solutions cannot go unmentioned:

Each of these five contestants also receives a free RubyMine license from us. Congratulations!

A personal message will be sent to each of the winners, with details on how to redeem their prizes. If you see your name in this post and you don’t receive any email from us within the next day, please ping us by commenting on this post.

Again, we thank all the developers who took part on the contest. It’s awesome to know there is no Ruby problem the community cannot solve. And with your help, RubyMine improves as well. We encourage you to try RubyMine Tsubaki if you haven’t already, and do give us your feedback to help make it even more intelligent.

Develop with pleasure!
JetBrains RubyMine Team

Comments below can no longer be edited.

12 Responses to Our Congratulations to Ruby Contest Winners!

  1. Leonid Svyatov says:

    August 12, 2014

    The organiser wrote “I’m ok with fixing the test but I’m also interesting in solution which will work with dummy encodings too“. People was trying to achieve that, and then the winning solution is the one that skips all dummy encodings. I’m confused.

    Nonetheless, congrats to the winner!

    My little suggestion to Jetbrains: next time, please, formalize challenge rules better. Many people are simply wasted their time trying to solve your problem (considering your comments from the issue) for all possible encodings, when, as it turns out, you just needed the simplest one-liner and skipping dummy encodings in the test.

    Maybe you could explain your logic behind picking the winners a bit? I’m just curious.

    • Oleg Sukhodolsky says:

      August 13, 2014

      Hi Leonid,

      we were interesting in a “complete” solution for the problem (complete for us doesn’t mean it works ok for dummy encodings and non_empty? method but something which will guaranteed to work with more complicated regexp’s) after reading all PRs we’ve got we came to conclusion that there is no such a solution 🙁 Thus we have decided to not select from all solution whether they work or don’t work with dummy encodings.
      Hope this clarify the decision a bit.

      Regards, Oleg.

      • Leonid Svyatov says:

        August 13, 2014

        Can you give me an example of “more complicated regexp”, with a string example, if it’s possible? I can’t sleep well without solving that problem 🙂

        • Oleg Sukhodolsky says:

          August 14, 2014

          Well, I will try to explain the problem: from time to time we have to use regeps in our helpers and we do not have control over strings against which we try to match the regexps. “More complicated regexp” means almost any regexp which contains latin symbols (e.g. “a.*\(.c.\).+z”)
          So, there are two problems: how to convert regexp’s string and how to prove that this will work correctly with arbitrary input string.
          Hope I was able to answer your question 😉

          Regards, Oleg.

          • Leonid Svyatov says:

            August 14, 2014

            Ok. As I understand from your first comment, you have some real examples on which all solutions have failed. Can you give me some of those? I mean, specific string in specific language and specific encoding and specific regex, which is failing? Gist with failing tests would be perfect!

          • Oleg Sukhodolsky says:

            August 15, 2014

            For some reasons I can not reply to your message (looks like the nesting is too deep)
            As for problems:
            original one is (which is about UTF-8 and ASCII, but as you can imagine users may have different encodings)
            Also there are similar problems with string interpolation (,

      • Patrick says:

        August 13, 2014

        As you mentioned on contest’s webpage: “One day we faced a tricky Ruby problem: UTF-8 regular expressions fail when working with non UTF-8 strings.” – so UTF-8 regular expressions are allowed.

        What if in “more complicated regexp” scenario, regex will contain utf-8 character like: /π/ or /\u03c0/ to detect if Pi exists in string and string will be for example ‘iso-8859-1’ encoded – will that (won one) solution work for that scenario ? 🙂

  2. Rafaël Gonzalez says:

    August 12, 2014

    I pretty much agree with Leonid Svyatov.

    Most of us bothered finding a solution for dummy encodings because it was expressed that there was an interest for it. So, shouldn’t this be taken into consideration?

    In my opinion, it would have been clearer if you either stated “we want a solution for dummy encodings” or “we don’t care about dummy encodings”.
    I would give the same suggestion as above; next time make the rules a bit clearer.

    In any case, congrats to the winners.

    • Oleg Sukhodolsky says:

      August 14, 2014

      I agree that we need to make more accurate rules next time.
      Sorry for our (honestly my own) mistake 🙁 We will try to do better next time.
      And thank you for participation.


  3. Alexey Shcherbakov says:

    August 14, 2014

    Congratulation to the winner!

    P.S. Ping 🙂

    • Tatiana Vasilyeva says:

      August 18, 2014

      Alexey, I’ve sent your request for our sales team. They are to contact you, please let me know if you don’t receive any e-mail.

  4. Nikita Paluszkov says:

    August 14, 2014

    What about UTF-8 regular expressions ? There is information on the contest page: “UTF-8 regular expressions fail when working with non UTF-8 strings” – so looking at selected solution: using any UTF-8 related character in regular expression will cause Ruby conversion error when using it against string with encoding which hasn’t got such character!

    Placing such information on contest page (about UTF-8 regular expression) and choosing the solution which fails with ‘real’ UTF-8 regular expressions is misunderstanding in my opinion.
    Such information suggests that regular expression can allow utf-8 related characters, so lot of people was trying to solve the problem which was not considered.


Discover more