Category: Ruby

Grill.rb 2016 – Poland’s first outdoor conference review

grillrbIt's about time to summarize some of the conferences that I've recently attended to. This post will be about Grill.rb that organizers claim to be "Poland's first outdoor conference". I was quite skeptical about that claim, but after I couldn't find any other Poland's outdoor conferences, I must admit that :).

And as many "first of a kind" conferences, this one was quite intimate. 60 attendees, 6 talks, open space, lightning talks, 35 kg of meet and a huge amount of great attitude.

Location

Day 1

On Saturday, we had a great weather. More than 30 Celsius degrees and gentle breeze. Anders Hill was definitely a great choice - peaceful and quiet place, with some trees giving us a bit of shadow to hide from the sun.

20160625_191809

Day 2

Organizers on Facebook called it the "Dungeon.rb" and I couldn't agree more. The weather was not too kind for us the next day and we had to move to an indoor location. But even then, you could still feel the outdoor, "non commercial" vibe.

13495094_1705525553034950_1080983640665734947_n

Speakers/presentations/talks

One could say, that 6 presentations for 2 days is not enough. And it would be true, if it wasn't for the Poland vs Switzerland game, barbecue time, open space and some other activities that were presented. If you ask me, I would say, that it was well-balanced. Especially, that it was suppose to be an outdoor, chill conference, not the "most professional, top knowledge !!!1111oneone" IT event ever. It's not that it didn't have pro talks ;), it's more that its main goal was to provide a solid technical base in an open and friendly environment, where one could easily talk with one another. Think of it as a constant 2 day afterparty ;)

I've enjoyed all the talks and what strikes me is that more and more speakers seem to notice and speak about software quality (even when their talks are not directly related to it). I believe that it is a great trend. Achieving (at least) a decent quality is really important and unfortunately especially unexperienced programmers don't see huge advantages that they gain reaching a certain point. The most interesting talk for me, was Krzysztof's Tarnowski "Functional programming in Ruby". It showed a different approach that aims to solve some of the Ruby programmers issues with an Erlang/Elixir approach.

If you're interested in more details about the talks, ping organizers, hopefully they will publish presentations at some point, because it is definitely worth reviewing them, if you haven't attended.

Open space - freedom of choice

What if you could propose a subject on which all the attendees can discuss? What if many people would do that, and you could pick about what you want to talk with others? This is exactly what happened during the 1st day. 3 groups, 3 topics, 3 rounds. Open Source gems vs Law and licences, ReactJS + Rails, Code Quality, DDD and many more. The only downside is that you cannot attend more than 1 at the same time. The more people, the more points of view you can see and understand. Great idea and great execution.

Food/grill

See for yourself :-) Yummy!

13497982_1705825163004989_5415868372842741787_o

Organization

It is hard to describe something that is good. There were only minor things that I could whine about, but it didn't change my  perception of the whole conference so I consider  them irrelevant. Good job, guys!

Summary

Was it worth attending? Yes! Definitely yes! Was it good? Even more. Does the outdoor approach fits into IT conferences? I would say, that we need way more people with that approach (and attitude) than indoor, strict meetings. IT community is a community of people with open minds, and I feel that we integrate and feel way better in this type of environment, than inside of tiny, dark rooms with only projectors light.

Dry-Configurable lazy evaluated default settings

Dry-configurable isĀ  a simple mixin to make Ruby classes configurable. It is quite nice, uses Struct and allows you to have default values. Unfortunately, it does not support (yet hopefully) default values that are evaluated upon each setting key request.

When would that be useful? Let's take a simple example: Kafka + Zookeeper. Zookeeper stores informations about Kafka cluster. They may vary in time, so unless you take them in real time, you might have problem if the cluster were reconfigured. The best option is to set a proc that will be evaluated on each setting request. This is how to obtain such a behavior (note that this will evaluate only default values - if you assign proc in configure block, it will be returned):

# Patch that will allow to use proc based lazy evaluated settings with Dry Configurable
class Dry::Configurable::Config
  # @param [Array] All arguments that a Struct accepts
  def initialize(*args)
    super
    setup_dynamics
  end

  private

  # Method that sets up all the proc based lazy evaluated dynamic config values
  def setup_dynamics
    self.to_h.each do |key, value|
      next unless value.is_a?(Proc)

      rebuild(key)
    end
  end

  # Method that rebuilds a given accessor, so when it consists a proc value, it will
  # evaluate it upon return
  # @param method_name [Symbol] name of an accessor that we want to rebuild
  def rebuild(method_name)
    metaclass = class << self; self; end

    metaclass.send(:define_method, method_name) do
      super().is_a?(Proc) ? super().call : super()
    end
  end
end

Example usage:

class Application
  extend Dry::Configurable

  setting :standard_setting
  setting :lazy_assigned
  setting :lazy_default, -> { "lazy_default-#{rand}" }

  # Note that this works for nested values as well
  setting :namespaced do
    setting :lazy, -> { "namespaced.lazy-#{rand}" }
  end
end

Application.configure do |config|
  config.standard_setting = 1
  config.lazy_assigned = -> { "lazy_assigned-#{rand}" }
end

Application.config.standard_setting #=> 1
Application.config.standard_setting #=> 1
Application.config.lazy_assigned #=> <Proc>
Application.config.lazy_default #=> "lazy_default-0.9601194173446863"
Application.config.lazy_default #=> "lazy_default-0.9450471949405372"
Application.config.namespaced.lazy #=> "namespaced.lazy-0.6938534114443213"
Application.config.namespaced.lazy #=> "namespaced.lazy-0.747101587617097"

Copyright © 2026 Closer to Code

Theme by Anders NorenUp ↑