Schedule

Valentin Fondaratov
Valentin Fondaratov
  • @rubymine
Having spent some time in ACM ICPC competitions, social network development and bioinformatics, Valentin finally fulfilled himself helping other developers write a better code. Now he is a RubyMine (Ruby/Rails IDE) team lead, but, more importantly, JetBrains employee. Knows Java a little. Learning Kotlin and unicyclcing.

Automated Type Contracts Generation for Ruby

Beauty and power of Ruby and Rails pays us back when it comes to finding bugs in large codebases. Static analysis is hindered by magic DSLs and patches. We may annotate the code with YARD which also enables improved tooling such as code completion. Sadly, the benefits of this process rarely compensate for the effort.

In this session we’ll see a new approach to type annotations generation. We'll learn how to obtain this data from runtime, to cope with DSLs and monkey patching, propose some tooling beyond YARD and create contracts like (String, T) -> T

YARV hacking and minimized DFAs included.

Presentation Materials

Recorded video