Ruby Day Conf was an exciting event full of inspiring talks and takeaways for all Ruby developers! Our dev team visited Turin and brought back some insightful tips to share with you. We also allowed ourselves to share some less tech-related impressions :)
Ruby Day was my first technical conference (I don’t count PRUG - Poznań Ruby User Group). To be honest, it was my first major tech event, but not as huge as I thought it would be - this wasn't a problem at all! The conference took place in Turin, Italy.
This was no festive event, but very well organized, in my humble opinion. Everything ran according to the agenda and we didn't need to ask for any extra information because we were kitted out with a terrific welcome pack. We were even given a small stylish bag with a few nice gifts, like brochures, stickers, notes, pens, and a t-shirt.
The sessions were split down the middle by a lunch-break. Time to toodle off to a nice little restaurant nearby! As you can imagine, the food was pretty darn scrumptious (I’m a bit of an Italian cuisine aficionado).
You’re probably keen to read something about the sessions - they were intriguing and covered a gamut of different topics, like:
Each of them contained something of interest which, for me at least, brought something new to the party. If I really had to choose the most fascinating, I would go for: debugging staff and json_api because I do reckon this stuff could come in very handy indeed. Teaching kids with Music and by creating games was also a particular highlight as was the Lotus session at the end.
The one of most memorable sessions for me was the one about how to teach kids by showing them how to write music in Ruby. If your kid knows English, then I think this tool (Sonic PI) could be very exciting. You begin with a simple play :a which then gives you the sound of the musical note ‘A’. Next up, you can start creating loops and functions etc. I would imagine that this is fantastic way to get kids interested - to be honest, I was hooked too :) You can create what you are capable of imagining. There are no limits. There are also a lot of great examples included of entire songs. During the session, the presenter demonstrated a really cool short script which converts strings to dulcet tones of an old NOKIA 3310.
My interest was piques by a talk about Continuous Integration and Continuous delivery. The presentation was delivered by Pierluigi Riti from Italy who mentioned the numerous steps necessary to keep a healthy relationship between devs and operations staff, where both of those groups work together. Devops trends are definitely focused on automation and shifting some infrastructure changes over to the developer, so the developer is then able to do most of the work (writing and delivering features). The ops role is to help in edge cases or architecture challenges. It was nice to hear that our core concepts at netguru are aligned with modern development and we can benefit from CI and CD on a daily basis.
During his presentation, Marco Otte-Witte talked about the JSON API specification. JSON API is an attempt to unify and bring consistency into APIs across the web. It provides a set of rules dealing with: content negotiation, the structure of JSON objects, dealing with CRUD operations, the format of query parameters and rules governing the handling of errors.
A proper JSON API document must start with a header: Content-Type: application/vnd.api+json defining that particular resource as a JSON API compliant. At its top-level, a JSON API document must include at least one of the following: data, errors or meta fields. A resource object must contain at least the id and type fields and optionally it can also specify: attributes, relationships, links, and meta.
Here is a sample resource taken from the official specification:
JSON API is intended to be backwards compatible and is designed to be extendable in the future. At the moment there are a few extensions (treated as a work in progress) which include Bulk extensions (for operations on data collection) and JSON Patch extension providing support for resource modification with HTTP PATCH.
Simone Carletti introduced us to a sample problem and showed a few algorithms to solve it, thereby demonstrating that a well-designed algorithm can visibly improve code efficiency. But the main point was this: even small improvements can greatly increase performance.
During the talk, Simone posed an interesting and important question: shouldn’t I simply use a faster language? This was especially valuable for Rubyists, since Ruby is not the fastest language out there. And the answer was: it depends. But in most cases, the speed of the language is not the main problem; most of the time inefficient performance happens due to inefficient algorithms.
The talk was designed to inspire and motivate the audience to delve deeper into the world of algorithm design.
It certainly did the trick for me.
Enrico Carlesso dispelled the myth that debugging has to be boring. His talk was intended to prove that in Ruby there are tools that can significantly improve our efficiency during the debugging process. Enrico introduced the Pry gems family as an easy and fun way to debug Ruby scripts and Rails apps.
Pry is an alternative to IRB with plenty of additional features such as syntax highlighting, source & documentation browsing and much more. It also comes with full and easy-to-follow documentation and a console manual. All you need to do is to install pry-rails gem and it will replace your IRB with Pry.
From this point, for example, you can use the binding.pry command which allows you to call on pry right in the middle of running a program and then start debugging.
It’s quite likely that some of the Ruby and Rails developers are already familiar with pry-rails gem. That’s why Enrico showed us also a bunch of other Pry gems - pry-inline, pry-rescue, pry-byebug and pry-remote:
It’s surprising how fast and efficiently it is possible to debug with the help of Pry. Enrico Carlesso definitely encouraged the audience to take a closer look at some of the pry gems and start exploring Pry Universe.
Check out the presentation:
We hope you enjoyed our little recap and approach the presentations with as much interest as we did. What’s your favourite pick? Tell us in a comment! Or, if you’d like to get regular bits on Ruby on Rails straight into your inbox, sign up for Ruby Brief now and enjoy your first issue soon!