RailsClub is a conference that AT Consulting has attended almost since its inception. This year we became its gold partner and decided to come up with something more interesting for the participants than a prize draw, and wrote an interactive quest that includes 15 tasks. Most of them are knowledgeable in Ruby and somewhat creative. The experience turned out to be interesting, since it was our first quest for events. As a result of the quest, we collected a lot of feedback and questions on individual tasks. In this article we will talk about how to create the quest, and analyze the answers.

The team consisted of one front-end, two back-end developers and a designer.
What's inside?
We wrote a project, of course, on Ruby on Rails. What else can a program for RailsClub be written on? Since there was not enough time, we decided to do everything without excesses, simply, but at the same time impenetrable: the standard MVC architecture of Ruby on Rails (it’s hard to add Trailblazer, but it quickly became clear that the extra layers of abstraction would only confuse and won’t project), yes a pack of time-tested gems. The Nginx web server with Let's SSL Encrypt SSL certificate (in 2016 it’s embarrassing to run any project without HTTPS) and the PostgreSQL database server, in general, is all that the application needs to work. The server, by the way, has become one of the virtual machines that we usually use to run tests (gitlab-ci-runners) of other company projects. Since the conference was a weekend, we decided that the facilities were still idle, and used it, stopping all unnecessary processes)
')
Deploy, too, everything was easy - this is a familiar to every “railman” Capistrano. For a fairly simple project, nothing more sophisticated and not required.
Front line
Initially, we wanted to use React and redux on the front end, however, having understood the essence of the problem, we decided that there should not be a dynamic UI in the quest, so we made everything as simple as possible. Front-end on Turbolinks, jQuery, jquery-ujs.
When developing such tasks, more time is needed for the development itself in order to take into account all the nuances in the front end, namely: check the project on different devices under different platforms, modify the validation when sending the quest, etc.
Design
A month before the start of the quest, a new designer came to us, so they immediately decided to test it in combat conditions, which he seems to have coped well with. The main task was to design mobile first, since not all participants had laptops with them, and everyone has a telephone.
The first psd-file appeared on October 10, and the final layouts were given on October 21 in the morning (a day before the RailsClub). In parallel, together with HR, they thought about the overall concept of the quest: stages, scoring, determining winners. We also chose prizes - we decided to give a hoverboard for the first place.
Right answers
The quest consisted of 15 tasks, directly or indirectly related to Ruby. The most difficult was the question about Array # compact: we asked to implement the shortest version of this method. It looks like this:
a - [p]
Many then asked us for the correct answer. The majority knew the option
a - [nil]
, but few knew that
p (alias puts)
returns
nil
if it is run without parameters, and this can be used in this context.
The most unfortunate, in our opinion, was the question: “What did Matz say about GC in Ruby?”. To answer correctly, it was necessary to look at the Russian-language version of the site about ruby: "It is more useful for your health." But still two people managed to answer this question)
The simplest tasks were to fill out a questionnaire during registration and write what language was inspired by Matz when choosing a name for his language (the answer is perl).
Other questions and "keys" to them:
Question
| "Key"
| How many people managed
|
What year was AT Consulting founded?
| 2001 (you had to go to the company's website in the history section)
| 26
|
22520 is the smallest number that is divided into all numbers from 1 to 10 without a remainder. What is the smallest number that will be divided into all numbers from 1 to 20 without a remainder?
| 232792560
| 25
|
Take a photo in the social networks with the hashtag: #atconsultingrailsclub and in the answer box, copy the link to it. The photo must contain the AT Consulting logo and 2 conference participants
| - | 20
|
The sum of all natural numbers less than 10 and a multiple of 3, or 5 is 23, what is the sum of numbers less than 1000?
| 233168
| 20
|
Given: a, b - arrays. Our intern wrote the following code: a = a + b a.uniq! Help him make the code a little better.
| a | = b
| 20
|
Write the last 10 digits of the sum 1 ^ 1 + 2 ^ 2 + 3 ^ 3 + ... + 1000 ^ 1000
| 9110846700
| nineteen
|
How can I write the number 1,000,000 in Ruby? "
| 1e6
| sixteen
|
Write code that shows whether there is a substring "ng", "String" .include in the string "String".
"Ng" does not offer% -)
| "String" ["ng"]
| 12
|
Show me how you can find out that in the array “a” there are strictly more than 5 elements?
| a [5], but at the conference we found out that if you fill the array with all nil, then this method does not work, so the question was not entirely correct
| eleven
|
How does the Range (1 ... 10) turn into an array?
| [* 1 ... 10]
| 7
|
Thanks to colleagues who helped prepare the article:
kolin_good and
Envek . Great weekend to everyone!